summaryrefslogtreecommitdiffstats
path: root/kbabel
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel')
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.cpp20
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.h2
-rw-r--r--kbabel/addons/preview/pothumbcreator.cpp42
-rw-r--r--kbabel/addons/preview/pothumbcreator.h2
-rw-r--r--kbabel/catalogmanager/catalogmanager.cpp440
-rw-r--r--kbabel/catalogmanager/catalogmanager.h54
-rw-r--r--kbabel/catalogmanager/catalogmanagerapp.h8
-rw-r--r--kbabel/catalogmanager/catalogmanageriface.h6
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.cpp532
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.h122
-rw-r--r--kbabel/catalogmanager/catmanlistitem.cpp164
-rw-r--r--kbabel/catalogmanager/catmanlistitem.h60
-rw-r--r--kbabel/catalogmanager/findinfilesdialog.cpp32
-rw-r--r--kbabel/catalogmanager/findinfilesdialog.h16
-rw-r--r--kbabel/catalogmanager/libcvs/cvsdialog.cpp128
-rw-r--r--kbabel/catalogmanager/libcvs/cvsdialog.h36
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.cpp124
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.h38
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.cpp120
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.h34
-rw-r--r--kbabel/catalogmanager/libsvn/svnhandler.cpp152
-rw-r--r--kbabel/catalogmanager/libsvn/svnhandler.h52
-rw-r--r--kbabel/catalogmanager/main.cpp26
-rw-r--r--kbabel/catalogmanager/markpatterndialog.cpp26
-rw-r--r--kbabel/catalogmanager/markpatterndialog.h10
-rw-r--r--kbabel/catalogmanager/multiroughtransdlg.cpp16
-rw-r--r--kbabel/catalogmanager/multiroughtransdlg.h4
-rw-r--r--kbabel/catalogmanager/validateprogress.cpp56
-rw-r--r--kbabel/catalogmanager/validateprogress.h32
-rw-r--r--kbabel/catalogmanager/validateprogresswidget.ui.h4
-rw-r--r--kbabel/common/argextractor.cpp18
-rw-r--r--kbabel/common/argextractor.h18
-rw-r--r--kbabel/common/catalog.cpp570
-rw-r--r--kbabel/common/catalog.h106
-rw-r--r--kbabel/common/catalog_private.h54
-rw-r--r--kbabel/common/catalogfileplugin.h30
-rw-r--r--kbabel/common/catalogitem.cpp96
-rw-r--r--kbabel/common/catalogitem.h48
-rw-r--r--kbabel/common/catalogitem_private.h16
-rw-r--r--kbabel/common/catalogsettings.cpp58
-rw-r--r--kbabel/common/catalogsettings.h60
-rw-r--r--kbabel/common/diff.cpp56
-rw-r--r--kbabel/common/diff.h20
-rw-r--r--kbabel/common/editcmd.cpp10
-rw-r--r--kbabel/common/editcmd.h8
-rw-r--r--kbabel/common/exportplugin.cpp8
-rw-r--r--kbabel/common/findoptions.h10
-rw-r--r--kbabel/common/importplugin.cpp22
-rw-r--r--kbabel/common/importplugin_private.h12
-rw-r--r--kbabel/common/kbabeldatatool.h4
-rw-r--r--kbabel/common/kbmailer.cpp58
-rw-r--r--kbabel/common/kbmailer.h22
-rw-r--r--kbabel/common/kbproject.cpp14
-rw-r--r--kbabel/common/kbproject.h16
-rw-r--r--kbabel/common/kbprojectmanager.cpp10
-rw-r--r--kbabel/common/kbprojectmanager.h12
-rw-r--r--kbabel/common/msgfmt.cpp44
-rw-r--r--kbabel/common/msgfmt.h12
-rw-r--r--kbabel/common/poinfo.cpp172
-rw-r--r--kbabel/common/poinfo.h34
-rw-r--r--kbabel/common/projectsettings.cpp12
-rw-r--r--kbabel/common/projectsettings.h38
-rw-r--r--kbabel/common/regexpextractor.cpp64
-rw-r--r--kbabel/common/regexpextractor.h46
-rw-r--r--kbabel/common/stringdistance.cpp10
-rw-r--r--kbabel/common/stringdistance.h16
-rw-r--r--kbabel/common/tagextractor.cpp4
-rw-r--r--kbabel/commonui/cmdedit.cpp80
-rw-r--r--kbabel/commonui/cmdedit.h28
-rw-r--r--kbabel/commonui/context.cpp88
-rw-r--r--kbabel/commonui/context.h20
-rw-r--r--kbabel/commonui/finddialog.cpp104
-rw-r--r--kbabel/commonui/finddialog.h48
-rw-r--r--kbabel/commonui/kactionselector.cpp146
-rw-r--r--kbabel/commonui/kactionselector.h64
-rw-r--r--kbabel/commonui/klisteditor.ui.h14
-rw-r--r--kbabel/commonui/projectpref.cpp22
-rw-r--r--kbabel/commonui/projectpref.h2
-rw-r--r--kbabel/commonui/projectprefwidgets.cpp468
-rw-r--r--kbabel/commonui/projectprefwidgets.h142
-rw-r--r--kbabel/commonui/projectwizard.cpp24
-rw-r--r--kbabel/commonui/projectwizard.h12
-rw-r--r--kbabel/commonui/roughtransdlg.cpp160
-rw-r--r--kbabel/commonui/roughtransdlg.h22
-rw-r--r--kbabel/commonui/toolaction.cpp40
-rw-r--r--kbabel/commonui/toolaction.h12
-rw-r--r--kbabel/commonui/toolselectionwidget.cpp32
-rw-r--r--kbabel/commonui/toolselectionwidget.h10
-rw-r--r--kbabel/datatools/accelerators/main.cc22
-rw-r--r--kbabel/datatools/accelerators/main.h10
-rw-r--r--kbabel/datatools/arguments/main.cc54
-rw-r--r--kbabel/datatools/arguments/main.h8
-rw-r--r--kbabel/datatools/context/main.cc4
-rw-r--r--kbabel/datatools/context/main.h6
-rw-r--r--kbabel/datatools/equations/main.cc6
-rw-r--r--kbabel/datatools/equations/main.h8
-rw-r--r--kbabel/datatools/length/main.cc22
-rw-r--r--kbabel/datatools/length/main.h8
-rw-r--r--kbabel/datatools/not-translated/main.cc20
-rw-r--r--kbabel/datatools/not-translated/main.h8
-rw-r--r--kbabel/datatools/pluralforms/main.cc6
-rw-r--r--kbabel/datatools/pluralforms/main.h6
-rw-r--r--kbabel/datatools/punctuation/main.cc22
-rw-r--r--kbabel/datatools/punctuation/main.h4
-rw-r--r--kbabel/datatools/regexp/main.cc42
-rw-r--r--kbabel/datatools/regexp/main.h22
-rw-r--r--kbabel/datatools/setfuzzy/main.cc4
-rw-r--r--kbabel/datatools/setfuzzy/main.h4
-rw-r--r--kbabel/datatools/whitespace/main.cc28
-rw-r--r--kbabel/datatools/whitespace/main.h10
-rw-r--r--kbabel/datatools/xml/main.cc42
-rw-r--r--kbabel/datatools/xml/main.h16
-rw-r--r--kbabel/filters/gettext/gettextexport.cpp58
-rw-r--r--kbabel/filters/gettext/gettextexport.h10
-rw-r--r--kbabel/filters/gettext/gettextimport.cpp208
-rw-r--r--kbabel/filters/gettext/gettextimport.h22
-rw-r--r--kbabel/filters/linguist/linguistexport.cpp62
-rw-r--r--kbabel/filters/linguist/linguistexport.h18
-rw-r--r--kbabel/filters/linguist/linguistimport.cpp40
-rw-r--r--kbabel/filters/linguist/linguistimport.h14
-rw-r--r--kbabel/filters/xliff/xliffexport.cpp64
-rw-r--r--kbabel/filters/xliff/xliffexport.h16
-rw-r--r--kbabel/filters/xliff/xliffimport.cpp42
-rw-r--r--kbabel/filters/xliff/xliffimport.h14
-rw-r--r--kbabel/kbabel/charselectview.cpp36
-rw-r--r--kbabel/kbabel/charselectview.h6
-rw-r--r--kbabel/kbabel/commentview.cpp34
-rw-r--r--kbabel/kbabel/commentview.h10
-rw-r--r--kbabel/kbabel/contextview.cpp46
-rw-r--r--kbabel/kbabel/contextview.h4
-rw-r--r--kbabel/kbabel/errorlistview.cpp16
-rw-r--r--kbabel/kbabel/errorlistview.h4
-rw-r--r--kbabel/kbabel/gotodialog.cpp6
-rw-r--r--kbabel/kbabel/gotodialog.h4
-rw-r--r--kbabel/kbabel/headereditor.cpp20
-rw-r--r--kbabel/kbabel/headereditor.h2
-rw-r--r--kbabel/kbabel/hidingmsgedit.cpp52
-rw-r--r--kbabel/kbabel/hidingmsgedit.h42
-rw-r--r--kbabel/kbabel/kbabel.cpp574
-rw-r--r--kbabel/kbabel/kbabel.h50
-rw-r--r--kbabel/kbabel/kbabeliface.h38
-rw-r--r--kbabel/kbabel/kbabelpref.cpp18
-rw-r--r--kbabel/kbabel/kbabelpref.h6
-rw-r--r--kbabel/kbabel/kbabelsplash.cpp32
-rw-r--r--kbabel/kbabel/kbabelsplash.h6
-rw-r--r--kbabel/kbabel/kbabelview.cpp560
-rw-r--r--kbabel/kbabel/kbabelview.h118
-rw-r--r--kbabel/kbabel/kbabelview2.cpp126
-rw-r--r--kbabel/kbabel/kbbookmarkhandler.cpp28
-rw-r--r--kbabel/kbabel/kbbookmarkhandler.h22
-rw-r--r--kbabel/kbabel/kbcatalog.cpp2
-rw-r--r--kbabel/kbabel/kbcatalog.h2
-rw-r--r--kbabel/kbabel/kbcataloglistview.cpp24
-rw-r--r--kbabel/kbabel/kbcataloglistview.h16
-rw-r--r--kbabel/kbabel/kbcataloglistviewitem.cpp32
-rw-r--r--kbabel/kbabel/kbcataloglistviewitem.h26
-rw-r--r--kbabel/kbabel/kbcatalogview.cpp8
-rw-r--r--kbabel/kbabel/kbcatalogview.h6
-rw-r--r--kbabel/kbabel/kbcharselect.cpp24
-rw-r--r--kbabel/kbabel/kbcharselect.h8
-rw-r--r--kbabel/kbabel/kbhighlighting.cpp44
-rw-r--r--kbabel/kbabel/kbhighlighting.h32
-rw-r--r--kbabel/kbabel/main.cpp138
-rw-r--r--kbabel/kbabel/mymultilineedit.cpp300
-rw-r--r--kbabel/kbabel/mymultilineedit.h92
-rw-r--r--kbabel/kbabel/sourceview.cpp12
-rw-r--r--kbabel/kbabel/sourceview.h2
-rw-r--r--kbabel/kbabel/spelldlg.cpp10
-rw-r--r--kbabel/kbabel/spelldlg.h2
-rw-r--r--kbabel/kbabel/taglistview.cpp22
-rw-r--r--kbabel/kbabel/taglistview.h4
-rw-r--r--kbabel/kbabeldict/aboutmoduledlg.cpp4
-rw-r--r--kbabel/kbabeldict/aboutmoduledlg.h4
-rw-r--r--kbabel/kbabeldict/dictchooser.cpp76
-rw-r--r--kbabel/kbabeldict/dictchooser.h28
-rw-r--r--kbabel/kbabeldict/dictionarymenu.cpp44
-rw-r--r--kbabel/kbabeldict/dictionarymenu.h26
-rw-r--r--kbabel/kbabeldict/kbabeldict.cpp10
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.cpp386
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.h126
-rw-r--r--kbabel/kbabeldict/kbabeldictiface.h8
-rw-r--r--kbabel/kbabeldict/kbabeldictview.cpp108
-rw-r--r--kbabel/kbabeldict/kbabeldictview.h24
-rw-r--r--kbabel/kbabeldict/kbabelsplash.cpp32
-rw-r--r--kbabel/kbabeldict/kbabelsplash.h6
-rw-r--r--kbabel/kbabeldict/main.cpp10
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp322
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.cpp122
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.h74
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp30
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp28
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h4
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp118
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h48
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp52
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.h64
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.cpp166
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.h82
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp38
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h62
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp44
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h18
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h2
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp84
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h56
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp20
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp52
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.h44
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp196
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.h58
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp100
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp94
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp164
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.h42
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp64
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h52
-rw-r--r--kbabel/kbabeldict/searchengine.cpp40
-rw-r--r--kbabel/kbabeldict/searchengine.h144
236 files changed, 6511 insertions, 6511 deletions
diff --git a/kbabel/addons/kfile-plugins/kfile_po.cpp b/kbabel/addons/kfile-plugins/kfile_po.cpp
index 190d81fc..457e4bd9 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.cpp
+++ b/kbabel/addons/kfile-plugins/kfile_po.cpp
@@ -30,7 +30,7 @@
#include "kfile_po.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "poinfo.h"
#include <kgenericfactory.h>
@@ -40,8 +40,8 @@ using namespace KBabel;
typedef KGenericFactory<KPoPlugin> POFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_po, POFactory("kfile_po"))
-KPoPlugin::KPoPlugin(QObject *parent, const char *name,
- const QStringList& args)
+KPoPlugin::KPoPlugin(TQObject *parent, const char *name,
+ const TQStringList& args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo("application/x-gettext");
@@ -50,18 +50,18 @@ KPoPlugin::KPoPlugin(QObject *parent, const char *name,
addGroupInfo(info, "CatalogInfo", i18n("Catalog Information"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Total", i18n("Total Messages"), QVariant::Int);
- item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), QVariant::Int);
- item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), QVariant::Int);
- item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), QVariant::String);
- item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), QVariant::String);
- item = addItemInfo(group, "Revision", i18n("Revision"), QVariant::String);
+ item = addItemInfo(group, "Total", i18n("Total Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), TQVariant::Int);
+ item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), TQVariant::String);
+ item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), TQVariant::String);
+ item = addItemInfo(group, "Revision", i18n("Revision"), TQVariant::String);
}
bool KPoPlugin::readInfo(KFileMetaInfo& metaInfo, uint)
{
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
ConversionStatus status = PoInfo::info(metaInfo.path(), poInfo, wordList, false, false, false);
if (status == OK) {
KFileMetaInfoGroup group = appendGroup(metaInfo, "CatalogInfo");
diff --git a/kbabel/addons/kfile-plugins/kfile_po.h b/kbabel/addons/kfile-plugins/kfile_po.h
index 8e69a0ce..9b707a8f 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.h
+++ b/kbabel/addons/kfile-plugins/kfile_po.h
@@ -42,7 +42,7 @@ class KPoPlugin : public KFilePlugin
Q_OBJECT
public:
- KPoPlugin(QObject *parent, const char *name, const QStringList& args);
+ KPoPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint);
};
diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp
index f067948a..0883025c 100644
--- a/kbabel/addons/preview/pothumbcreator.cpp
+++ b/kbabel/addons/preview/pothumbcreator.cpp
@@ -33,9 +33,9 @@
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -67,35 +67,35 @@ PoThumbCreator::~PoThumbCreator()
delete m_splitter;
}
-bool PoThumbCreator::create(const QString &path, int width, int height, QImage &img)
+bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if ( !m_splitter )
{
m_splitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( !pixmap.isEmpty() )
{
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
bool ok = false;
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
// We do not call msgfmt, as a thumbnail must be created fast.
if( PoInfo::info( path, poInfo, wordList, false, true, false ) == OK )
{
ok = true;
- QPixmap pix;
+ TQPixmap pix;
if (height * 3 > width * 4)
pix.resize(width, width * 4 / 3);
else
pix.resize(height * 3 / 4, height);
- pix.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ pix.fill( TQColor( 245, 245, 245 ) ); // light-grey background
@@ -114,7 +114,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
xBorder = (pix.width()-d)/2;
yBorder = (pix.height()*2/3-d)/2;
- QPainter p(&pix);
+ TQPainter p(&pix);
if(fuzzyAngle>0)
{
@@ -163,9 +163,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
- QRect rect;
+ TQRect rect;
- QSize chSize = m_splitter->itemSize(); // the size of one char
+ TQSize chSize = m_splitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -186,7 +186,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// end centering
- QString text;
+ TQString text;
if(numCharsPerLine < 30)
{
@@ -250,9 +250,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
text = locale->formatNumber(p,0)+'%';
*/
// find the maximum string length to center the text
- QStringList lineList=QStringList::split('\n',text);
+ TQStringList lineList=TQStringList::split('\n',text);
uint max=0;
- for( QStringList::Iterator it = lineList.begin(); it != lineList.end()
+ for( TQStringList::Iterator it = lineList.begin(); it != lineList.end()
; ++it )
{
if((*it).length() > max)
@@ -269,7 +269,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
int posLastLine = pix.height() - (chSize.height() + yBorder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(m_splitter->pixmap());
+ const TQPixmap *fontPixmap = &(m_splitter->pixmap());
for ( uint i = 0; i < text.length(); i++ )
@@ -295,7 +295,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -311,7 +311,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &pix, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &pix, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
@@ -321,7 +321,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// in this seldom cases they are usually hidden ;-)
if(pix.width() > 40 && KApplication::random()%2000 == 0)
{
- QPixmap kbabelPix;
+ TQPixmap kbabelPix;
if(pix.width() < 80)
{
kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel"
@@ -342,7 +342,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
x = QMAX(x,0);
if(!kbabelPix.isNull())
{
- bitBlt(&pix, QPoint(x,4), &kbabelPix, kbabelPix.rect()
+ bitBlt(&pix, TQPoint(x,4), &kbabelPix, kbabelPix.rect()
, Qt::CopyROP);
}
}
diff --git a/kbabel/addons/preview/pothumbcreator.h b/kbabel/addons/preview/pothumbcreator.h
index 401e9431..25a1f7ab 100644
--- a/kbabel/addons/preview/pothumbcreator.h
+++ b/kbabel/addons/preview/pothumbcreator.h
@@ -44,7 +44,7 @@ class PoThumbCreator : public ThumbCreator
public:
PoThumbCreator();
virtual ~PoThumbCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private:
diff --git a/kbabel/catalogmanager/catalogmanager.cpp b/kbabel/catalogmanager/catalogmanager.cpp
index 6cbe964d..1292c0cf 100644
--- a/kbabel/catalogmanager/catalogmanager.cpp
+++ b/kbabel/catalogmanager/catalogmanager.cpp
@@ -45,8 +45,8 @@
#include "msgfmt.h"
#include "toolaction.h"
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -72,24 +72,24 @@
#include <ktoolbar.h>
#include <kwin.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
using namespace KBabel;
WId CatalogManagerApp::_preferredWindow = 0;
-QStringList CatalogManager::_foundFilesList;
-QStringList CatalogManager::_toBeSearched;
+TQStringList CatalogManager::_foundFilesList;
+TQStringList CatalogManager::_toBeSearched;
-CatalogManager::CatalogManager(QString configFile )
+CatalogManager::CatalogManager(TQString configFile )
:KMainWindow(0,0)
{
if ( configFile.isEmpty() )
@@ -114,8 +114,8 @@ void CatalogManager::init()
_totalFound = 0;
_foundFilesList.clear();
_toBeSearched.clear();
- _timerFind = new QTimer( this );
- connect(_timerFind, SIGNAL( timeout() ), this, SLOT(findNextFile()) );
+ _timerFind = new TQTimer( this );
+ connect(_timerFind, TQT_SIGNAL( timeout() ), this, TQT_SLOT(findNextFile()) );
_searchStopped = false;
_prefDialog=0;
@@ -132,11 +132,11 @@ void CatalogManager::init()
_project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName());
}
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
- QWidget *view = new QWidget(this);
- QVBoxLayout* layout= new QVBoxLayout(view);
+ TQWidget *view = new TQWidget(this);
+ TQVBoxLayout* layout= new TQVBoxLayout(view);
layout->setMargin(0);
layout->setSpacing(KDialog::spacingHint());
@@ -144,26 +144,26 @@ void CatalogManager::init()
layout->addWidget(_catalogManager);
layout->setStretchFactor(_catalogManager,1);
- connect(this,SIGNAL(settingsChanged(KBabel::CatManSettings))
- ,_catalogManager,SLOT(setSettings(KBabel::CatManSettings)));
- connect(_catalogManager,SIGNAL(openFile(QString,QString))
- ,this,SLOT(openFile(QString,QString)));
- connect(_catalogManager,SIGNAL(openFileInNewWindow(QString,QString))
- ,this,SLOT(openFileInNewWindow(QString,QString)));
- connect(_catalogManager,SIGNAL(openTemplate(QString,QString,QString))
- ,this,SLOT(openTemplate(QString,QString,QString)));
- connect(_catalogManager,SIGNAL(openTemplateInNewWindow(QString,QString,QString))
- ,this,SLOT(openTemplateInNewWindow(QString,QString,QString)));
- connect(_catalogManager,SIGNAL(gotoFileEntry(QString,QString,int))
- ,this,SLOT(openFile(QString,QString,int)));
- connect(_catalogManager, SIGNAL(selectedChanged(uint)),
- this, SLOT(selectedChanged(uint)));
+ connect(this,TQT_SIGNAL(settingsChanged(KBabel::CatManSettings))
+ ,_catalogManager,TQT_SLOT(setSettings(KBabel::CatManSettings)));
+ connect(_catalogManager,TQT_SIGNAL(openFile(TQString,TQString))
+ ,this,TQT_SLOT(openFile(TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openFileInNewWindow(TQString,TQString))
+ ,this,TQT_SLOT(openFileInNewWindow(TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openTemplate(TQString,TQString,TQString))
+ ,this,TQT_SLOT(openTemplate(TQString,TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openTemplateInNewWindow(TQString,TQString,TQString))
+ ,this,TQT_SLOT(openTemplateInNewWindow(TQString,TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(gotoFileEntry(TQString,TQString,int))
+ ,this,TQT_SLOT(openFile(TQString,TQString,int)));
+ connect(_catalogManager, TQT_SIGNAL(selectedChanged(uint)),
+ this, TQT_SLOT(selectedChanged(uint)));
KWin::setIcons(winId(),BarIcon("catalogmanager",32)
,SmallIcon("catalogmanager"));
- QHBoxLayout* hBoxL = new QHBoxLayout(layout);
- _progressLabel = new QLabel(view);
+ TQHBoxLayout* hBoxL = new TQHBoxLayout(layout);
+ _progressLabel = new TQLabel(view);
hBoxL->addWidget(_progressLabel);
_progressBar=new KProgress(view);
hBoxL->addWidget(_progressBar);
@@ -172,20 +172,20 @@ void CatalogManager::init()
_progressLabel->hide();
_progressBar->hide();
- connect(_catalogManager,SIGNAL(prepareProgressBar(QString,int))
- , this, SLOT(prepareProgressBar(QString,int)));
- connect(_catalogManager,SIGNAL(clearProgressBar())
- , this, SLOT(clearProgressBar()));
- connect(_catalogManager,SIGNAL(progress(int))
- , _progressBar, SLOT(setProgress(int)));
-// connect(_catalogManager, SIGNAL(signalBuildTree(bool))
-// , this, SLOT(enableMenuForFiles(bool)));
- connect(_catalogManager, SIGNAL(signalBuildTree(bool))
- , this, SLOT(enableActions(bool)));
- connect(this, SIGNAL(searchStopped())
- , _catalogManager, SLOT(stopSearch()));
- connect(_catalogManager, SIGNAL(prepareFindProgressBar(int))
- , this, SLOT(prepareStatusProgressBar(int)));
+ connect(_catalogManager,TQT_SIGNAL(prepareProgressBar(TQString,int))
+ , this, TQT_SLOT(prepareProgressBar(TQString,int)));
+ connect(_catalogManager,TQT_SIGNAL(clearProgressBar())
+ , this, TQT_SLOT(clearProgressBar()));
+ connect(_catalogManager,TQT_SIGNAL(progress(int))
+ , _progressBar, TQT_SLOT(setProgress(int)));
+// connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool))
+// , this, TQT_SLOT(enableMenuForFiles(bool)));
+ connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool))
+ , this, TQT_SLOT(enableActions(bool)));
+ connect(this, TQT_SIGNAL(searchStopped())
+ , _catalogManager, TQT_SLOT(stopSearch()));
+ connect(_catalogManager, TQT_SIGNAL(prepareFindProgressBar(int))
+ , this, TQT_SLOT(prepareStatusProgressBar(int)));
setCentralWidget(view);
resize( 600,300);
@@ -194,20 +194,20 @@ void CatalogManager::init()
setupActions();
- QPopupMenu* popup;
- popup = (QPopupMenu*)(factory()->container("rmb_file", this));
+ TQPopupMenu* popup;
+ popup = (TQPopupMenu*)(factory()->container("rmb_file", this));
if(popup)
{
_catalogManager->setRMBMenuFile(popup);
}
- popup = (QPopupMenu*)(factory()->container("rmb_dir", this));
+ popup = (TQPopupMenu*)(factory()->container("rmb_dir", this));
if(popup)
{
_catalogManager->setRMBMenuDir(popup);
}
- connect(_catalogManager, SIGNAL(signalSearchedFile(int))
- , _statusProgressBar, SLOT(advance(int)));
+ connect(_catalogManager, TQT_SIGNAL(signalSearchedFile(int))
+ , _statusProgressBar, TQT_SLOT(advance(int)));
restoreView();
}
@@ -220,60 +220,60 @@ void CatalogManager::setupActions()
// the file menu
action = new KAction( i18n("&Open"), CTRL+Key_O, _catalogManager,
- SLOT(slotOpenFile()),actionCollection(), "open");
+ TQT_SLOT(slotOpenFile()),actionCollection(), "open");
action->setEnabled(false);
action = new KAction(i18n("&Open Template"),Key_Space,_catalogManager,
- SLOT(slotOpenTemplate()),actionCollection(), "open_template");
+ TQT_SLOT(slotOpenTemplate()),actionCollection(), "open_template");
action->setEnabled(false);
action = new KAction(i18n("Open in &New Window"),CTRL+SHIFT+Key_O,_catalogManager,
- SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window");
+ TQT_SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window");
action->setEnabled(false);
- action = KStdAction::quit(kapp, SLOT (closeAllWindows()), actionCollection());
+ action = KStdAction::quit(kapp, TQT_SLOT (closeAllWindows()), actionCollection());
actionMap["open_template"] = NEEDS_POT;
// the edit menu
action = new KAction( i18n("Fi&nd in Files..."), CTRL+Key_F, this,
- SLOT(find()), actionCollection(), "find_in_files");
+ TQT_SLOT(find()), actionCollection(), "find_in_files");
action->setEnabled(false);
action = new KAction( i18n("Re&place in Files..."), CTRL+Key_R, this,
- SLOT(replace()), actionCollection(), "replace_in_files");
+ TQT_SLOT(replace()), actionCollection(), "replace_in_files");
action->setEnabled(false);
action = new KAction( i18n("&Stop Searching"), "stop", Key_Escape, this,
- SLOT(stopSearching()), actionCollection(), "stop_search");
+ TQT_SLOT(stopSearching()), actionCollection(), "stop_search");
action->setEnabled(false);
action = new KAction( i18n("&Reload"), "reload", KStdAccel::reload(), _catalogManager,
- SLOT(updateCurrent()), actionCollection(), "reload");
+ TQT_SLOT(updateCurrent()), actionCollection(), "reload");
action->setEnabled(false);
// the marking menu
action = new KAction( i18n("&Toggle Marking"), CTRL+Key_M, _catalogManager,
- SLOT(toggleMark()), actionCollection(), "toggle_marking");
+ TQT_SLOT(toggleMark()), actionCollection(), "toggle_marking");
action->setEnabled(false);
action = new KAction( i18n("Remove Marking"), 0, _catalogManager,
- SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking");
+ TQT_SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking");
action->setEnabled(false);
action = new KAction( i18n("Toggle All Markings"), 0, _catalogManager,
- SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking");
+ TQT_SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking");
action->setEnabled(false);
action = new KAction( i18n("Remove All Markings"), 0, _catalogManager,
- SLOT(clearAllMarks()), actionCollection(), "remove_all_marking");
+ TQT_SLOT(clearAllMarks()), actionCollection(), "remove_all_marking");
action->setEnabled(false);
action = new KAction( i18n("Mark Modified Files"), 0, _catalogManager,
- SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files");
+ TQT_SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files");
// fixme to enabling this when loading is done using updateFinished() signal
action->setEnabled(true);
action = new KAction( i18n("&Load Markings..."), 0, _catalogManager,
- SLOT(loadMarks()), actionCollection(), "load_marking");
+ TQT_SLOT(loadMarks()), actionCollection(), "load_marking");
action->setEnabled(false);
action = new KAction( i18n("&Save Markings..."), 0, _catalogManager,
- SLOT(saveMarks()), actionCollection(), "save_marking");
+ TQT_SLOT(saveMarks()), actionCollection(), "save_marking");
action->setEnabled(false);
(void)new KAction(i18n("&Mark Files..."), 0, _catalogManager,
- SLOT(slotMarkPattern()), actionCollection(), "mark_pattern");
+ TQT_SLOT(slotMarkPattern()), actionCollection(), "mark_pattern");
(void)new KAction(i18n("&Unmark Files..."), 0, _catalogManager,
- SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern");
+ TQT_SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern");
actionMap["remove_marking"] = NEEDS_MARK;
actionMap["remove_all_marking"] = NEEDS_MARK;
@@ -282,102 +282,102 @@ void CatalogManager::setupActions()
// go menu
action = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated", ALT+Key_Next,
- _catalogManager, SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
+ _catalogManager, TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
action->setEnabled(false);
action = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated", ALT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans");
+ _catalogManager, TQT_SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans");
action->setEnabled(false);
action = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy", CTRL+Key_Next,
- _catalogManager, SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
+ _catalogManager, TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
action->setEnabled(false);
action = new KAction(i18n("Pre&vious Fuzzy"), "prevfuzzy", CTRL+Key_Prior,
- _catalogManager, SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy");
+ _catalogManager, TQT_SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy");
action->setEnabled(false);
action = new KAction(i18n("N&ext Fuzzy or Untranslated"), "nextfuzzyuntrans", CTRL+SHIFT+Key_Next,
- _catalogManager, SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr");
+ _catalogManager, TQT_SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr");
action->setEnabled(false);
action = new KAction(i18n("P&revious Fuzzy or Untranslated"), "prevfuzzyuntrans", CTRL+SHIFT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr");
+ _catalogManager, TQT_SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr");
action->setEnabled(false);
action = new KAction(i18n("Next Err&or"), "nexterror", ALT+SHIFT+Key_Next,
- _catalogManager, SLOT(gotoNextError()),actionCollection(), "go_next_error");
+ _catalogManager, TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error");
action->setEnabled(false);
action = new KAction(i18n("Previo&us Error"), "preverror", ALT+SHIFT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousError()),actionCollection(), "go_prev_error");
+ _catalogManager, TQT_SLOT(gotoPreviousError()),actionCollection(), "go_prev_error");
action->setEnabled(false);
action = new KAction(i18n("Next Te&mplate Only"), "nexttemplate", CTRL+Key_Down,
- _catalogManager, SLOT(gotoNextTemplate()),actionCollection(), "go_next_template");
+ _catalogManager, TQT_SLOT(gotoNextTemplate()),actionCollection(), "go_next_template");
action->setEnabled(false);
action = new KAction(i18n("Previous Temp&late Only"), "prevtemplate", CTRL+Key_Up,
- _catalogManager, SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template");
+ _catalogManager, TQT_SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template");
action->setEnabled(false);
action = new KAction(i18n("Next Tran&slation Exists"), "nextpo", ALT+Key_Down,
- _catalogManager, SLOT(gotoNextPo()),actionCollection(), "go_next_po");
+ _catalogManager, TQT_SLOT(gotoNextPo()),actionCollection(), "go_next_po");
action->setEnabled(false);
action = new KAction(i18n("Previous Transl&ation Exists"), "prevpo", ALT+Key_Up,
- _catalogManager, SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po");
+ _catalogManager, TQT_SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po");
action->setEnabled(false);
action = new KAction(i18n("Previous Marke&d"), "prevmarked", SHIFT+Key_Up,
- _catalogManager, SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked");
+ _catalogManager, TQT_SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked");
action->setEnabled(false);
action = new KAction(i18n("Next &Marked"), "nextmarked", SHIFT+Key_Down,
- _catalogManager, SLOT(gotoNextMarked()),actionCollection(), "go_next_marked");
+ _catalogManager, TQT_SLOT(gotoNextMarked()),actionCollection(), "go_next_marked");
action->setEnabled(false);
// project menu
// the project menu
action = new KAction(i18n("&New..."), "filenew"
- , this, SLOT(projectNew()),actionCollection()
+ , this, TQT_SLOT(projectNew()),actionCollection()
,"project_new");
action = new KAction(i18n("&Open..."), "fileopen"
- , this, SLOT(projectOpen()),actionCollection()
+ , this, TQT_SLOT(projectOpen()),actionCollection()
,"project_open");
action = new KAction(i18n("C&lose"), "fileclose"
- , this, SLOT(projectClose()),actionCollection()
+ , this, TQT_SLOT(projectClose()),actionCollection()
,"project_close");
action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() );
action = new KAction(i18n("&Configure..."), "configure"
- , this, SLOT(projectConfigure()),actionCollection()
+ , this, TQT_SLOT(projectConfigure()),actionCollection()
,"project_settings");
// tools menu
action = new KAction( i18n("&Statistics"), "statistics", CTRL+Key_S,
- _catalogManager, SLOT(statistics()), actionCollection(), "statistics");
+ _catalogManager, TQT_SLOT(statistics()), actionCollection(), "statistics");
action->setEnabled(false);
action = new KAction( i18n("S&tatistics in Marked"), "statistics", CTRL+ALT+Key_S,
- _catalogManager, SLOT(markedStatistics()), actionCollection(), "statistics_marked");
+ _catalogManager, TQT_SLOT(markedStatistics()), actionCollection(), "statistics_marked");
action->setEnabled(false);
action = new KAction( i18n("Check S&yntax"), "syntax", CTRL+Key_Y,
- _catalogManager, SLOT(checkSyntax()), actionCollection(), "syntax");
+ _catalogManager, TQT_SLOT(checkSyntax()), actionCollection(), "syntax");
action->setEnabled(false);
action = new KAction( i18n("S&pell Check"), "spellcheck", CTRL+Key_I,
- this, SLOT(spellcheck()), actionCollection(), "spellcheck");
+ this, TQT_SLOT(spellcheck()), actionCollection(), "spellcheck");
action->setEnabled(false);
action = new KAction( i18n("Spell Check in &Marked"), "spellcheck", CTRL+ALT+Key_I,
- this, SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked");
+ this, TQT_SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked");
action->setEnabled(false);
action = new KAction( i18n("&Rough Translation"), CTRL+Key_T,
- _catalogManager, SLOT(roughTranslation()), actionCollection(), "rough_translation");
+ _catalogManager, TQT_SLOT(roughTranslation()), actionCollection(), "rough_translation");
action->setEnabled(false);
action = new KAction( i18n("Rough Translation in M&arked"), CTRL+ALT+Key_T,
- _catalogManager, SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked");
+ _catalogManager, TQT_SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked");
action->setEnabled(false);
action = new KAction( i18n("Mai&l"), "mail_send", CTRL+Key_A,
- _catalogManager, SLOT(mailFiles()), actionCollection(), "mail_file");
+ _catalogManager, TQT_SLOT(mailFiles()), actionCollection(), "mail_file");
action->setEnabled(false);
action = new KAction( i18n("Mail Mar&ked"), "mail_send", CTRL+ALT+Key_A,
- _catalogManager, SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked");
+ _catalogManager, TQT_SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked");
action->setEnabled(false);
action = new KAction( i18n("&Pack"), "tar", CTRL+Key_B,
- _catalogManager, SLOT(packageFiles()), actionCollection(), "package_file");
- action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked");
+ _catalogManager, TQT_SLOT(packageFiles()), actionCollection(), "package_file");
+ action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, TQT_SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked");
action->setEnabled(false);
actionMap["statistics_marked"] = NEEDS_DIR | NEEDS_MARK;
@@ -390,10 +390,10 @@ void CatalogManager::setupActions()
actionMap["package_file_marked"] = NEEDS_PO | NEEDS_MARK;
// dynamic tools
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QPtrList<KAction> actions = ToolAction::dataToolActionList(
- tools, _catalogManager, SLOT(validateUsingTool( const KDataToolInfo &, const QString& ))
+ TQPtrList<KAction> actions = ToolAction::dataToolActionList(
+ tools, _catalogManager, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString& ))
,"validate", false, actionCollection() );
KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(),
@@ -407,7 +407,7 @@ void CatalogManager::setupActions()
}
actions = ToolAction::dataToolActionList(
- tools, _catalogManager, SLOT(validateMarkedUsingTool( const KDataToolInfo &, const QString& ))
+ tools, _catalogManager, TQT_SLOT(validateMarkedUsingTool( const KDataToolInfo &, const TQString& ))
,"validate", false, actionCollection(), "marked_" );
m_menu = new KActionMenu(i18n("V&alidation Marked"), actionCollection(),
"dynamic_validation_marked");
@@ -423,19 +423,19 @@ void CatalogManager::setupActions()
// CVS submenu
// Actions for PO files
(void)new KAction( i18n( "Update" ), "down", 0, _catalogManager,
- SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" );
+ TQT_SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" );
(void)new KAction( i18n( "Update Marked" ), 0, _catalogManager,
- SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" );
+ TQT_SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" );
(void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager,
- SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" );
+ TQT_SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" );
(void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager,
- SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" );
+ TQT_SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" );
(void)new KAction( i18n( "Status" ), 0, _catalogManager,
- SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" );
+ TQT_SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" );
(void)new KAction( i18n( "Status for Marked" ), 0, _catalogManager,
- SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" );
+ TQT_SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" );
(void)new KAction( i18n( "Show Diff" ), 0, _catalogManager,
- SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" );
+ TQT_SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" );
// CVS
actionMap["cvs_update"] = NEEDS_PO | NEEDS_PO_CVS;
@@ -449,27 +449,27 @@ void CatalogManager::setupActions()
// SVN submenu
// Actions for PO files
(void)new KAction( i18n( "Update" ), "down", 0, _catalogManager,
- SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" );
+ TQT_SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" );
(void)new KAction( i18n( "Update Marked" ), 0, _catalogManager,
- SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" );
+ TQT_SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" );
(void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager,
- SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" );
+ TQT_SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" );
(void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager,
- SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" );
+ TQT_SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" );
(void)new KAction( i18n( "Status (Local)" ), 0, _catalogManager,
- SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" );
+ TQT_SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" );
(void)new KAction( i18n( "Status (Local) for Marked" ), 0, _catalogManager,
- SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" );
+ TQT_SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" );
(void)new KAction( i18n( "Status (Remote)" ), 0, _catalogManager,
- SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" );
+ TQT_SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" );
(void)new KAction( i18n( "Status (Remote) for Marked" ), 0, _catalogManager,
- SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" );
+ TQT_SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" );
(void)new KAction( i18n( "Show Diff" ), 0, _catalogManager,
- SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" );
+ TQT_SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" );
(void)new KAction( i18n( "Show Information" ), 0, _catalogManager,
- SLOT( svnInfo() ), actionCollection( ), "svn_info" );
+ TQT_SLOT( svnInfo() ), actionCollection( ), "svn_info" );
(void)new KAction( i18n( "Show Information for Marked" ), 0, _catalogManager,
- SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" );
+ TQT_SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" );
// SVN
actionMap["svn_update"] = NEEDS_PO | NEEDS_PO_SVN;
@@ -486,13 +486,13 @@ void CatalogManager::setupActions()
// CVS Actions for POT files
(void)new KAction( i18n( "Update Templates" ), 0, _catalogManager,
- SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" );
+ TQT_SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" );
(void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager,
- SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" );
+ TQT_SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" );
(void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager,
- SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" );
+ TQT_SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" );
(void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager,
- SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" );
+ TQT_SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" );
actionMap["cvs_update_template"] = NEEDS_POT | NEEDS_POT_CVS;
actionMap["cvs_update_marked_template"] = NEEDS_POT | NEEDS_POT_CVS | NEEDS_MARK;
@@ -501,13 +501,13 @@ void CatalogManager::setupActions()
// SVN Actions for POT files
(void)new KAction( i18n( "Update Templates" ), 0, _catalogManager,
- SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" );
+ TQT_SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" );
(void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager,
- SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" );
+ TQT_SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" );
(void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager,
- SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" );
+ TQT_SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" );
(void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager,
- SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" );
+ TQT_SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" );
actionMap["svn_update_template"] = NEEDS_POT | NEEDS_POT_SVN;
actionMap["svn_update_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK;
@@ -515,7 +515,7 @@ void CatalogManager::setupActions()
actionMap["svn_commit_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK;
// settings menu
- // FIXME: KStdAction::preferences(this, SLOT( optionsPreferences()), actionCollection());
+ // FIXME: KStdAction::preferences(this, TQT_SLOT( optionsPreferences()), actionCollection());
createStandardStatusBarAction();
@@ -530,7 +530,7 @@ void CatalogManager::setupActions()
actionCollection(), "file_commands");
_catalogManager->setFileCommandsMenu( actionMenu->popupMenu());
- action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,SLOT(slotDeleteFile()),actionCollection(), "delete");
+ action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,TQT_SLOT(slotDeleteFile()),actionCollection(), "delete");
action->setEnabled(false);
#if KDE_IS_VERSION( 3, 2, 90 )
@@ -542,19 +542,19 @@ void CatalogManager::setupActions()
void CatalogManager::setupStatusBar()
{
- _foundLabel = new QLabel( " ", statusBar());
+ _foundLabel = new TQLabel( " ", statusBar());
statusBar()->addWidget(_foundLabel,0);
- QHBox* progressBox = new QHBox(statusBar(), "progressBox" );
+ TQHBox* progressBox = new TQHBox(statusBar(), "progressBox" );
progressBox->setSpacing(2);
- _statusProgressLabel = new QLabel( "", progressBox );
+ _statusProgressLabel = new TQLabel( "", progressBox );
_statusProgressBar = new KProgress( progressBox, "progressBar");
_statusProgressBar->hide();
statusBar()->addWidget(progressBox,1);
statusBar()->setMinimumHeight(_statusProgressBar->sizeHint().height());
- QWhatsThis::add(statusBar(),
+ TQWhatsThis::add(statusBar(),
i18n("<qt><p><b>Statusbar</b></p>\n"
"<p>The statusbar displays information about progress of"
" the current find or replace operation. The first number in <b>Found:</b>"
@@ -570,7 +570,7 @@ void CatalogManager::enableMenuForFiles(bool enable)
void CatalogManager::selectedChanged(uint actionValue)
{
- QMap<QString,uint>::Iterator it;
+ TQMap<TQString,uint>::Iterator it;
for (it = actionMap.begin( ); it != actionMap.end( ); ++it) {
KAction * action = actionCollection()->action(it.key( ).latin1( ));
if (action) action->setEnabled((actionValue & it.data( )) == it.data( ));
@@ -589,7 +589,7 @@ void CatalogManager::updateSettings()
_openNewWindow=_settings.openWindow;
}
-void CatalogManager::saveSettings( QString configFile )
+void CatalogManager::saveSettings( TQString configFile )
{
_settings = _catalogManager->settings(); // restore settings from the view
@@ -615,12 +615,12 @@ void CatalogManager::setPreferredWindow(WId window)
kdDebug(KBABEL_CATMAN) << "setPrefereedWindow set to :" << _preferredWindow << endl;
}
-void CatalogManager::updateFile(QString fileWithPath)
+void CatalogManager::updateFile(TQString fileWithPath)
{
_catalogManager->updateFile(fileWithPath,true); //force update
}
-void CatalogManager::updateAfterSave(QString fileWithPath, PoInfo &info)
+void CatalogManager::updateAfterSave(TQString fileWithPath, PoInfo &info)
{
_catalogManager->updateAfterSave(fileWithPath, info);
}
@@ -630,16 +630,16 @@ CatalogManagerView *CatalogManager::view()
return _catalogManager;
}
-void CatalogManager::openFile(QString filename, QString package)
+void CatalogManager::openFile(TQString filename, TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << CatalogManagerApp::_preferredWindow;
@@ -647,11 +647,11 @@ void CatalogManager::openFile(QString filename, QString package)
kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl;
- QCString callfunc="openURL(QCString, QCString, WId,int)";
+ TQCString callfunc="openURL(TQCString, TQCString, WId,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openURL(QCString, QCString, WId,int,QCString)";
+ callfunc="openURL(TQCString, TQCString, WId,int,TQCString)";
}
kdDebug(KBABEL_CATMAN) << callfunc << endl;
@@ -665,26 +665,26 @@ void CatalogManager::openFile(QString filename, QString package)
}
}
-void CatalogManager::openFile(QString filename, QString package, int msgid)
+void CatalogManager::openFile(TQString filename, TQString package, int msgid)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << msgid;
kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl;
- QCString callfunc="gotoFileEntry(QCString, QCString, int)";
+ TQCString callfunc="gotoFileEntry(TQCString, TQCString, int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="gotoFileEntry(QCString, QCString,int,QCString)";
+ callfunc="gotoFileEntry(TQCString, TQCString,int,TQCString)";
}
kdDebug(KBABEL_CATMAN) << callfunc << endl;
@@ -698,26 +698,26 @@ void CatalogManager::openFile(QString filename, QString package, int msgid)
}
}
-void CatalogManager::openFileInNewWindow(QString filename, QString package)
+void CatalogManager::openFileInNewWindow(TQString filename, TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << CatalogManagerApp::_preferredWindow;
arg << ((int)1);
- QCString callfunc="openURL(QCString, QCString, WId,int)";
+ TQCString callfunc="openURL(TQCString, TQCString, WId,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openURL(QCString, QCString, WId,int,QCString)";
+ callfunc="openURL(TQCString, TQCString, WId,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -729,25 +729,25 @@ void CatalogManager::openFileInNewWindow(QString filename, QString package)
}
}
-void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QString package)
+void CatalogManager::openTemplate(TQString openFilename,TQString saveFilename,TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() ) {
- QByteArray data;
- QCString url = openFilename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = openFilename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
url = saveFilename.utf8();
arg << url;
arg << package.utf8();
arg << (_openNewWindow ? 1 : 0 );
- QCString callfunc="openTemplate(QCString,QCString,QCString,int)";
+ TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openTemplate(QCString,QCString,QCString,int,QCString)";
+ callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -759,25 +759,25 @@ void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QStr
}
}
-void CatalogManager::openTemplateInNewWindow(QString openFilename,QString saveFilename,QString package)
+void CatalogManager::openTemplateInNewWindow(TQString openFilename,TQString saveFilename,TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() ) {
- QByteArray data;
- QCString url = openFilename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = openFilename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
url = saveFilename.utf8();
arg << url;
arg << package.utf8();
arg << ((int)1);
- QCString callfunc="openTemplate(QCString,QCString,QCString,int)";
+ TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openTemplate(QCString,QCString,QCString,int,QCString)";
+ callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -793,17 +793,17 @@ void CatalogManager::spellcheck()
{
DCOPClient * client = kapp->dcopClient();
- QStringList fileList = _catalogManager->current();
+ TQStringList fileList = _catalogManager->current();
if( startKBabel() ) {
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << fileList;
// update the user timestamp for KBabel to get it a focus
kapp->updateRemoteUserTimestamp ("kbabel");
- if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) )
+ if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) )
KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n"
"Please check your installation of KDE."));
}
@@ -813,17 +813,17 @@ void CatalogManager::markedSpellcheck()
{
DCOPClient * client = kapp->dcopClient();
- QStringList fileList = _catalogManager->marked();
+ TQStringList fileList = _catalogManager->marked();
if( startKBabel() ) {
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << fileList;
// update the user timestamp for KBabel to get it a focus
kapp->updateRemoteUserTimestamp ("kbabel");
- if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) )
+ if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) )
KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n"
"Please check your installation of KDE."));
}
@@ -831,8 +831,8 @@ void CatalogManager::markedSpellcheck()
bool CatalogManager::startKBabel()
{
- QCString service;
- QString result;
+ TQCString service;
+ TQString result;
DCOPClient * client = kapp->dcopClient();
@@ -840,7 +840,7 @@ bool CatalogManager::startKBabel()
QCStringList apps = client->registeredApplications();
for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it )
{
- QString clientID = *it;
+ TQString clientID = *it;
if( clientID=="kbabel" )
{
service = *it;
@@ -851,8 +851,8 @@ bool CatalogManager::startKBabel()
// if there is no running kbabel, start one
if( service.isEmpty() )
{
- QString app = "kbabel";
- QString url = "";
+ TQString app = "kbabel";
+ TQString url = "";
if( kapp->startServiceByDesktopName(app,url, &result, &service))
{
KMessageBox::error( this, i18n("Unable to use KLauncher to start KBabel.\n"
@@ -866,7 +866,7 @@ bool CatalogManager::startKBabel()
}
-void CatalogManager::prepareProgressBar(QString msg, int max)
+void CatalogManager::prepareProgressBar(TQString msg, int max)
{
_progressBar->setTotalSteps(max);
_progressBar->setProgress(0);
@@ -884,7 +884,7 @@ void CatalogManager::clearProgressBar()
_progressLabel->hide();
}
-void CatalogManager::prepareStatusProgressBar(QString msg, int max)
+void CatalogManager::prepareStatusProgressBar(TQString msg, int max)
{
_totalFound = 0;
_foundToBeSent = 0;
@@ -932,7 +932,7 @@ void CatalogManager::find()
{
if( !_findDialog ) _findDialog = new FindInFilesDialog(false,this);
- if( _findDialog->exec("") == QDialog::Accepted )
+ if( _findDialog->exec("") == TQDialog::Accepted )
{
_timerFind->stop();
_searchStopped = false;
@@ -946,22 +946,22 @@ void CatalogManager::find()
_findOptions = _findDialog->findOpts();
// get from options the information for ignoring text parts
- _findOptions.contextInfo = QRegExp( _project->miscSettings().contextInfo );
+ _findOptions.contextInfo = TQRegExp( _project->miscSettings().contextInfo );
_findOptions.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::find" << endl;
- QString url = _catalogManager->find(_findOptions, _toBeSearched );
+ TQString url = _catalogManager->find(_findOptions, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
{
if( startKBabel() )
{
- QCString funcCall("findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int)");
+ TQCString funcCall("findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int)");
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << client->appId();
arg << url.utf8();
arg << _findOptions.findStr;
@@ -977,9 +977,9 @@ void CatalogManager::find()
arg << (_findOptions.askForSave ? 1 : 0);
if(_configFile != "kbabelrc" ) {
arg << _configFile.utf8();
- funcCall="findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int,QCString)";
+ funcCall="findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int,TQCString)";
}
- kdDebug(KBABEL) << "DCOP: " << QString(data.data()) << endl;
+ kdDebug(KBABEL) << "DCOP: " << TQString(data.data()) << endl;
if( !client->send("kbabel","KBabelIFace",
funcCall, data)
) {
@@ -1016,7 +1016,7 @@ void CatalogManager::replace()
if( !_replaceDialog ) _replaceDialog = new FindInFilesDialog(true,this);
- if( _replaceDialog->exec("") == QDialog::Accepted )
+ if( _replaceDialog->exec("") == TQDialog::Accepted )
{
_timerFind->stop();
_searchStopped = false;
@@ -1032,21 +1032,21 @@ void CatalogManager::replace()
_findOptions = options;
// get from options the information for ignoring text parts
- options.contextInfo = QRegExp( _project->miscSettings().contextInfo );
+ options.contextInfo = TQRegExp( _project->miscSettings().contextInfo );
options.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
- QString url = _catalogManager->find(options, _toBeSearched );
+ TQString url = _catalogManager->find(options, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
{
if( startKBabel() )
{
- QCString funcCall("replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int)");
+ TQCString funcCall("replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int)");
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << client->appId();
arg << url.utf8();
@@ -1065,7 +1065,7 @@ void CatalogManager::replace()
arg << (options.askForSave ? 1 : 0);
if(_configFile != "kbabelrc" ) {
arg << _configFile.utf8();
- funcCall="replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int,QCString)";
+ funcCall="replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int,TQCString)";
}
if( !client->send("kbabel","KBabelIFace",
funcCall, data)
@@ -1105,7 +1105,7 @@ void CatalogManager::findNextFile()
stopSearching();
return;
}
- QString file = _toBeSearched.first();
+ TQString file = _toBeSearched.first();
_toBeSearched.pop_front();
if( PoInfo::findInFile( file, _findOptions ) )
{
@@ -1188,11 +1188,11 @@ void CatalogManager::projectNew()
KBabel::Project::Ptr p = KBabel::ProjectWizard::newProject();
if( p )
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = p;
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = _project->filename();
restoreSettings();
@@ -1204,12 +1204,12 @@ void CatalogManager::projectNew()
void CatalogManager::projectOpen()
{
- QString oldproject = _project->filename();
+ TQString oldproject = _project->filename();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
- oldproject = QString();
+ oldproject = TQString();
}
- const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this);
+ const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this);
if (file.isEmpty())
{
return;
@@ -1217,11 +1217,11 @@ void CatalogManager::projectOpen()
KBabel::Project::Ptr p = KBabel::ProjectManager::open(file);
if( p )
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = p;
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = p->filename();
restoreSettings();
@@ -1238,11 +1238,11 @@ void CatalogManager::projectOpen()
void CatalogManager::projectClose()
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName());
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = _project->filename();
restoreSettings();
updateSettings();
@@ -1250,7 +1250,7 @@ void CatalogManager::projectClose()
emit settingsChanged(_settings);
}
-void CatalogManager::changeProjectActions(const QString& project)
+void CatalogManager::changeProjectActions(const TQString& project)
{
bool def = ( project == KBabel::ProjectManager::defaultProjectName() ) ;
@@ -1262,8 +1262,8 @@ void CatalogManager::projectConfigure()
{
KBabel::ProjectDialog* _projectDialog = new ProjectDialog(_project);
- connect (_projectDialog, SIGNAL (settingsChanged())
- , this, SLOT (updateSettings()));
+ connect (_projectDialog, TQT_SIGNAL (settingsChanged())
+ , this, TQT_SLOT (updateSettings()));
// settings are updated via signals
_projectDialog->exec();
diff --git a/kbabel/catalogmanager/catalogmanager.h b/kbabel/catalogmanager/catalogmanager.h
index 67f871fa..11927bd7 100644
--- a/kbabel/catalogmanager/catalogmanager.h
+++ b/kbabel/catalogmanager/catalogmanager.h
@@ -34,18 +34,18 @@
#ifndef CATALOGMANAGER_H
#define CATALOGMANAGER_H
-#include <qdict.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
#include <kdeversion.h>
#include <kmainwindow.h>
#include <kdirwatch.h>
#include <kprocess.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "projectsettings.h"
#include "kbproject.h"
@@ -71,7 +71,7 @@ class CatalogManager : public KMainWindow
{
Q_OBJECT
public:
- CatalogManager(QString configfile = QString() );
+ CatalogManager(TQString configfile = TQString() );
~CatalogManager();
KBabel::CatManSettings settings() const;
@@ -82,15 +82,15 @@ public:
void setPreferredWindow(WId id);
/** updates the file fileWithPath in the @ref CatalogManagerView */
- void updateFile(QString fileWithPath);
- void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info);
+ void updateFile(TQString fileWithPath);
+ void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info);
CatalogManagerView *view();
void pause(bool flag) { if( _catalogManager ) _catalogManager->pause (flag); }
- static QStringList _foundFilesList;
- static QStringList _toBeSearched;
+ static TQStringList _foundFilesList;
+ static TQStringList _toBeSearched;
public slots:
/** updates the settings from the project */
@@ -110,13 +110,13 @@ public slots:
void projectOpen();
void projectClose();
void projectConfigure();
- void changeProjectActions(const QString& project);
+ void changeProjectActions(const TQString& project);
virtual void clearProgressBar();
- virtual void prepareProgressBar(QString msg, int max);
+ virtual void prepareProgressBar(TQString msg, int max);
virtual void clearStatusProgressBar();
- virtual void prepareStatusProgressBar(QString msg, int max);
+ virtual void prepareStatusProgressBar(TQString msg, int max);
virtual void prepareStatusProgressBar(int max);
virtual void setNumberOfFound( int toBeSent, int total );
@@ -137,7 +137,7 @@ private:
void restoreView();
void saveView();
- void saveSettings( QString configFile = QString::null );
+ void saveSettings( TQString configFile = TQString::null );
void setupActions();
void setupStatusBar();
@@ -150,16 +150,16 @@ private slots:
* is used. If this is deleted meanwhile, the first window in
* @ref KMainWindow::memberList is used.
*/
- void openFile(QString filename,QString package);
- void openFile(QString filename,QString package, int msgid);
- void openFileInNewWindow(QString filename,QString package);
+ void openFile(TQString filename,TQString package);
+ void openFile(TQString filename,TQString package, int msgid);
+ void openFileInNewWindow(TQString filename,TQString package);
/**
* calls @ref KBabel::openTemplate where as preferred windos _preferredWindow
* is used. If this is deleted meanwhile, the first window in
* @ref KMainWindow::memberList is used.
*/
- void openTemplate(QString openFilename,QString saveFileName,QString package);
- void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package);
+ void openTemplate(TQString openFilename,TQString saveFileName,TQString package);
+ void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package);
void markedSpellcheck();
void spellcheck();
@@ -187,16 +187,16 @@ private:
/// update progress bar
KProgress* _progressBar;
- QLabel* _progressLabel;
+ TQLabel* _progressLabel;
/// statusbar progress bar
KProgress* _statusProgressBar;
- QLabel* _statusProgressLabel;
- QLabel* _foundLabel;
+ TQLabel* _statusProgressLabel;
+ TQLabel* _foundLabel;
int _foundToBeSent;
int _totalFound;
- QTimer* _timerFind;
+ TQTimer* _timerFind;
bool _searchStopped;
KBabel::CatManSettings _settings;
@@ -207,12 +207,12 @@ private:
/// project configuration file
- QString _configFile;
+ TQString _configFile;
KBabel::Project::Ptr _project;
KConfig* config;
- QMap<QString,uint> actionMap;
+ TQMap<TQString,uint> actionMap;
};
#endif // CATALOGMANAGER_H
diff --git a/kbabel/catalogmanager/catalogmanagerapp.h b/kbabel/catalogmanager/catalogmanagerapp.h
index e0762e5b..3534a516 100644
--- a/kbabel/catalogmanager/catalogmanagerapp.h
+++ b/kbabel/catalogmanager/catalogmanagerapp.h
@@ -49,8 +49,8 @@ public:
CatalogManagerInterface();
virtual void setPreferredWindow( WId id );
- virtual QCString findNextFile();
- virtual void updatedFile( QCString url );
+ virtual TQCString findNextFile();
+ virtual void updatedFile( TQCString url );
};
class CatalogManagerApp : public KApplication
@@ -62,8 +62,8 @@ public:
virtual int newInstance();
static void setPreferredWindow( WId id );
- static QCString findNextFile();
- static void updatedFile( QCString url );
+ static TQCString findNextFile();
+ static void updatedFile( TQCString url );
static WId _preferredWindow;
private:
CatalogManagerInterface *kbInterface;
diff --git a/kbabel/catalogmanager/catalogmanageriface.h b/kbabel/catalogmanager/catalogmanageriface.h
index 232a694c..037aa7c0 100644
--- a/kbabel/catalogmanager/catalogmanageriface.h
+++ b/kbabel/catalogmanager/catalogmanageriface.h
@@ -52,16 +52,16 @@ k_dcop:
* Returns a next file containing the searched string. Invoked from
* KBabel in case the FindNext() finishes a file and wants to continue in
* the next one.
- * @returns a URL to the next file, QString:null if there is no more
+ * @returns a URL to the next file, TQString:null if there is no more
* files to be searched or empty string if the search string
* is not found yet, but there is more files to be searched in.
*/
- virtual QCString findNextFile() = 0;
+ virtual TQCString findNextFile() = 0;
/**
* If you care about this file, you should update information shown.
*/
- virtual void updatedFile( QCString url) = 0;
+ virtual void updatedFile( TQCString url) = 0;
};
#endif // CATALOGMANAGERIFACE_H
diff --git a/kbabel/catalogmanager/catalogmanagerview.cpp b/kbabel/catalogmanager/catalogmanagerview.cpp
index 6bb4c88f..991e1899 100644
--- a/kbabel/catalogmanager/catalogmanagerview.cpp
+++ b/kbabel/catalogmanager/catalogmanagerview.cpp
@@ -50,10 +50,10 @@
#include "markpatterndialog.h"
#include "validationoptions.h"
-#include <qcheckbox.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqcheckbox.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <kcmenumngr.h>
#include <kcursor.h>
@@ -73,15 +73,15 @@
#include <kdeversion.h>
#include <ktempfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
using namespace KBabel;
@@ -98,8 +98,8 @@ const char* columnNames[] = {
#define COLTEXT(a) (i18n(columnNames[a]))
-CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent,const char* name)
- : QListView(parent,name)
+CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent,const char* name)
+ : TQListView(parent,name)
, _dirWatch(0)
, _readInfoCount(0)
, _active(false)
@@ -131,8 +131,8 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
_dictBox = new KBabelDictBox(this, "dictbox");
_dictBox->hide();
- _updateTimer = new QTimer(this);
- connect(_updateTimer,SIGNAL(timeout()),this,SLOT(checkUpdate()));
+ _updateTimer = new TQTimer(this);
+ connect(_updateTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(checkUpdate()));
addColumn(COLTEXT(COL_NAME));
addColumn(COLTEXT(COL_MARKER),25);
@@ -143,7 +143,7 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
setColumnAlignment(2,AlignCenter);
addColumn(COLTEXT(COL_TOTAL));
setColumnAlignment(3,AlignCenter);
- addColumn(QString::null); // CVS/SVN column, header is set later
+ addColumn(TQString::null); // CVS/SVN column, header is set later
addColumn(COLTEXT(COL_REVISION));
addColumn(COLTEXT(COL_TRANSLATOR));
@@ -154,21 +154,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
if(KContextMenuManager::showOnButtonPress())
{
- connect(this,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &, int))
- ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int)));
+ connect(this,TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &, int))
+ ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int)));
}
else
{
- connect(this,SIGNAL(rightButtonClicked(QListViewItem*,const QPoint &, int))
- ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int)));
+ connect(this,TQT_SIGNAL(rightButtonClicked(TQListViewItem*,const TQPoint &, int))
+ ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int)));
}
- connect(this, SIGNAL(returnPressed(QListViewItem*))
- ,this, SLOT(activateItem(QListViewItem*)));
- connect(this, SIGNAL(doubleClicked(QListViewItem*))
- ,this, SLOT(activateItem(QListViewItem*)));
- connect(this,SIGNAL(selectionChanged()),this,SLOT(checkSelected()));
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint &, int)),
- this, SLOT( columnClicked(QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*))
+ ,this, TQT_SLOT(activateItem(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*))
+ ,this, TQT_SLOT(activateItem(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(checkSelected()));
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT( columnClicked(TQListViewItem *, const TQPoint &, int)));
_dirCommandsMenu = 0;
_fileCommandsMenu = 0;
@@ -178,20 +178,20 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
_logWindow = new KDialogBase(0,"log window",false,i18n("Log Window")
,KDialogBase::Close | KDialogBase::User1,KDialogBase::Close);
_logWindow->setButtonText(KDialogBase::User1,i18n("C&lear"));
- _logWindow->setInitialSize(QSize(300,200));
+ _logWindow->setInitialSize(TQSize(300,200));
- QWhatsThis::add(_logWindow,i18n("<qt><p><b>Log window</b></p>\n"
+ TQWhatsThis::add(_logWindow,i18n("<qt><p><b>Log window</b></p>\n"
"<p>In this window the output of "
"the executed commands are shown.</p></qt>"));
- _logView = new QTextEdit(_logWindow);
+ _logView = new TQTextEdit(_logWindow);
_logView->setReadOnly(true);
_logWindow->setMainWidget(_logView);
- connect(_logWindow,SIGNAL(user1Clicked()),_logView,SLOT(clear()));
+ connect(_logWindow,TQT_SIGNAL(user1Clicked()),_logView,TQT_SLOT(clear()));
- QWhatsThis::add(this,i18n("<qt><p><b>Catalog Manager</b></p>\n"
+ TQWhatsThis::add(this,i18n("<qt><p><b>Catalog Manager</b></p>\n"
"<p>The Catalog Manager merges two folders into one tree and displays all\n"
"PO and POT files in these folders. This way you can easily see if a\n"
"template has been added or removed. Also some information about the files\n"
@@ -205,21 +205,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
// CVS
cvshandler = new CVSHandler( );
- connect( cvshandler, SIGNAL( signalIsPORepository( bool ) ),
- this, SLOT( slotValidPOCVSRepository( bool ) ) );
- connect( cvshandler, SIGNAL( signalIsPOTRepository( bool ) ),
- this, SLOT( slotValidPOTCVSRepository( bool ) ) );
- connect( cvshandler, SIGNAL( signalFilesCommitted( const QStringList& ) ),
- this, SLOT( updateFiles( const QStringList& ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalIsPORepository( bool ) ),
+ this, TQT_SLOT( slotValidPOCVSRepository( bool ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ),
+ this, TQT_SLOT( slotValidPOTCVSRepository( bool ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ),
+ this, TQT_SLOT( updateFiles( const TQStringList& ) ) );
// SVN
svnhandler = new SVNHandler( );
- connect( svnhandler, SIGNAL( signalIsPORepository( bool ) ),
- this, SLOT( slotValidPOSVNRepository( bool ) ) );
- connect( svnhandler, SIGNAL( signalIsPOTRepository( bool ) ),
- this, SLOT( slotValidPOTSVNRepository( bool ) ) );
- connect( svnhandler, SIGNAL( signalFilesCommitted( const QStringList& ) ),
- this, SLOT( updateFiles( const QStringList& ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalIsPORepository( bool ) ),
+ this, TQT_SLOT( slotValidPOSVNRepository( bool ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ),
+ this, TQT_SLOT( slotValidPOTSVNRepository( bool ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ),
+ this, TQT_SLOT( updateFiles( const TQStringList& ) ) );
KConfig *config = KGlobal::config();
restoreView(config);
@@ -271,26 +271,26 @@ void CatalogManagerView::restoreView( KConfig *config)
_ignoreFuzzy = config->readBoolEntry( "ValidateIgnoreFuzzy", false );
}
-void CatalogManagerView::setRMBMenuFile( QPopupMenu *m )
+void CatalogManagerView::setRMBMenuFile( TQPopupMenu *m )
{
_fileContentsMenu = m;
}
-void CatalogManagerView::setRMBMenuDir( QPopupMenu *m )
+void CatalogManagerView::setRMBMenuDir( TQPopupMenu *m )
{
_dirContentsMenu = m;
}
-void CatalogManagerView::setDirCommandsMenu( QPopupMenu *m )
+void CatalogManagerView::setDirCommandsMenu( TQPopupMenu *m )
{
_dirCommandsMenu = m;
- connect(_dirCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotDirCommand(int)));
+ connect(_dirCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotDirCommand(int)));
}
-void CatalogManagerView::setFileCommandsMenu( QPopupMenu *m )
+void CatalogManagerView::setFileCommandsMenu( TQPopupMenu *m )
{
_fileCommandsMenu = m;
- connect(_fileCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotFileCommand(int)));
+ connect(_fileCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotFileCommand(int)));
}
void CatalogManagerView::checkUpdate()
@@ -298,7 +298,7 @@ void CatalogManagerView::checkUpdate()
_updateNesting++;
pause(true);
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
while ( it.current() && !_stop)
{
@@ -353,24 +353,24 @@ void CatalogManagerView::clear()
delete _dirWatch;
_dirWatch= new KDirWatch();
- connect(_dirWatch,SIGNAL(deleted(const QString&)),this
- ,SLOT(directoryDeleted(const QString&)));
- connect(_dirWatch,SIGNAL(dirty(const QString&)),this
- ,SLOT(directoryChanged(const QString&)));
- connect(_dirWatch,SIGNAL(created(const QString&)),this
- ,SLOT(directoryChanged(const QString&)));
+ connect(_dirWatch,TQT_SIGNAL(deleted(const TQString&)),this
+ ,TQT_SLOT(directoryDeleted(const TQString&)));
+ connect(_dirWatch,TQT_SIGNAL(dirty(const TQString&)),this
+ ,TQT_SLOT(directoryChanged(const TQString&)));
+ connect(_dirWatch,TQT_SIGNAL(created(const TQString&)),this
+ ,TQT_SLOT(directoryChanged(const TQString&)));
_dirList.clear();
_fileList.clear();
- QListView::clear();
+ TQListView::clear();
}
void CatalogManagerView::toggleAllMarks()
{
_markerList.clear();
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
CatManListItem* item;
for ( ; it.current(); ++it )
@@ -397,7 +397,7 @@ void CatalogManagerView::toggleAllMarks()
void CatalogManagerView::clearAllMarks()
{
_markerList.clear();
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
while ( it.current() )
{
@@ -415,7 +415,7 @@ void CatalogManagerView::clearAllMarks()
void CatalogManagerView::markModifiedFiles()
{
- QDictIterator<CatManListItem> it( _fileList );
+ TQDictIterator<CatManListItem> it( _fileList );
while ( it.current() )
{
CatManListItem* item=it.current();
@@ -434,10 +434,10 @@ void CatalogManagerView::markModifiedFiles()
void CatalogManagerView::loadMarks()
{
- const KURL url = KFileDialog::getOpenURL( QString(),"*.marklist", this );
+ const KURL url = KFileDialog::getOpenURL( TQString(),"*.marklist", this );
if( url.isEmpty() ) return;
- QString filename;
+ TQString filename;
#if KDE_IS_VERSION( 3, 2, 90 )
if (!KIO::NetAccess::download( url, filename, this ) )
#else
@@ -450,13 +450,13 @@ void CatalogManagerView::loadMarks()
}
// now load from file
- QStringList newMarkerList; // better create new list in case of problems
- QFile f( filename );
+ TQStringList newMarkerList; // better create new list in case of problems
+ TQFile f( filename );
if( f.open( IO_ReadOnly) )
{
- QTextStream s(&f);
+ TQTextStream s(&f);
- QString input;
+ TQString input;
s >> input ;
if( input == "[Markers]" )
@@ -486,8 +486,8 @@ void CatalogManagerView::loadMarks()
KIO::NetAccess::removeTempFile( filename );
// test validity of list items
- QStringList testedList;
- QStringList::const_iterator it;
+ TQStringList testedList;
+ TQStringList::const_iterator it;
for( it=newMarkerList.constBegin() ; it!=newMarkerList.constEnd() ; ++it )
if( _fileList[(*it)] != 0 ) testedList.append( (*it) );
@@ -510,13 +510,13 @@ void CatalogManagerView::loadMarks()
void CatalogManagerView::saveMarks()
{
- const KURL url2 = KFileDialog::getSaveURL( QString(), "*.marklist", this );
+ const KURL url2 = KFileDialog::getSaveURL( TQString(), "*.marklist", this );
if( url2.isEmpty() ) return;
// ### FIXME: why is the file dialog not doing this?
if ( KIO::NetAccess::exists( url2, false, this ) )
{
- if(KMessageBox::warningContinueCancel(this,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url2.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
{
return;
@@ -531,19 +531,19 @@ void CatalogManagerView::saveMarks()
#endif
kdDebug() << "Saving marks: " << url2.prettyURL() << " most-local: " << url.prettyURL() << endl;
- QFile* file = 0;
+ TQFile* file = 0;
KTempFile* tempFile = 0;
- QTextStream* stream = 0;
+ TQTextStream* stream = 0;
bool error = false;
const bool localFile = url.isLocalFile();
if ( localFile )
{
// We have a local file
- file = new QFile( url.path() );
+ file = new TQFile( url.path() );
if ( file->open (IO_WriteOnly) )
{
- stream = new QTextStream( file );
+ stream = new TQTextStream( file );
}
else
{
@@ -561,7 +561,7 @@ void CatalogManagerView::saveMarks()
{
// ### TODO: try to get a better file format for KDE4 (XML?), one working with real relative paths (no / at start) and working with UTF-8
*stream << "[Markers]" << endl;
- for( QStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it )
+ for( TQStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it )
*stream << (*it) << endl;
}
if ( error )
@@ -622,20 +622,20 @@ void CatalogManagerView::setPatternMarks(bool mark)
if (markPatternDialog->exec( ) != KDialog::Accepted)
return;
- QRegExp rx(markPatternDialog->pattern( ));
+ TQRegExp rx(markPatternDialog->pattern( ));
rx.setWildcard(!markPatternDialog->useRegExp( ));
rx.setCaseSensitive(markPatternDialog->isCaseSensitive( ));
- QStringList fileList = item->allChildrenList(true);
- for (QStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) {
+ TQStringList fileList = item->allChildrenList(true);
+ for (TQStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) {
CatManListItem * i = _fileList[*it];
- QString matchName;
+ TQString matchName;
if (i->hasPo( ))
matchName = i->poFile( );
else if (i->hasPot( ) && markPatternDialog->includeTemplates( ))
matchName = i->potFile( );
- matchName = QFileInfo(matchName).baseName( );
+ matchName = TQFileInfo(matchName).baseName( );
if (mark) {
if (!matchName.isEmpty( ) && rx.exactMatch(matchName) && !i->marked( )) {
@@ -670,7 +670,7 @@ void CatalogManagerView::statistics()
}
}
- QStringList doList;
+ TQStringList doList;
if( i->isFile() ) doList.append(i->package());
else doList = i->allChildrenList(true);
@@ -697,13 +697,13 @@ void CatalogManagerView::markedStatistics()
}
}
- QStringList doList;
+ TQStringList doList;
if( i->isFile() ) doList.append(i->package());
else doList = i->allChildrenList(true);
- QStringList markedDoList;
- QStringList::const_iterator it;
+ TQStringList markedDoList;
+ TQStringList::const_iterator it;
for( it = doList.constBegin(); it != doList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -713,11 +713,11 @@ void CatalogManagerView::markedStatistics()
showStatistics( i, markedDoList );
}
-void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childrenList )
+void CatalogManagerView::showStatistics( CatManListItem *i, TQStringList &childrenList )
{
KLocale *locale = KGlobal::locale();
- QString msg;
+ TQString msg;
int totalPackages=0;
int totalPo=0;
int totalNoPot=0;
@@ -726,7 +726,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr
int totalFuzzy=0;
int totalUntranslated=0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -764,7 +764,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr
double percent;
- const QString name=i->package(false);
+ const TQString name=i->package(false);
if(name.isEmpty())
msg = i18n("Statistics for all:\n");
else
@@ -808,7 +808,7 @@ void CatalogManagerView::checkSyntax()
return;
Msgfmt::Status status;
- QString output;
+ TQString output;
Msgfmt msgfmt;
status=msgfmt.checkSyntax(item->poFile(),output);
@@ -851,18 +851,18 @@ void CatalogManagerView::checkSyntax()
else
{
Msgfmt::Status status;
- QString output;
+ TQString output;
Msgfmt msgfmt;
status=msgfmt.checkSyntaxInDir(item->poFile(), "*.po", output);
- QString name=item->package(false);
+ TQString name=item->package(false);
switch(status)
{
case Msgfmt::Ok:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("All files in folder %1 are syntactically correct.\n"
@@ -878,7 +878,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::SyntaxError:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("At least one file in folder %1 has syntax errors.\n"
@@ -894,7 +894,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::HeaderError:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("At least one file in folder %1 has header syntax errors.\n"
@@ -910,7 +910,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::Error:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("An error occurred while processing \"msgfmt --statistics *.po\" "
@@ -940,12 +940,12 @@ void CatalogManagerView::checkSyntax()
void CatalogManagerView::roughTranslation()
{
- QPtrList<CatManListItem> result;
+ TQPtrList<CatManListItem> result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -966,9 +966,9 @@ void CatalogManagerView::markedRoughTranslation()
{
if( _markerList.count() == 0 ) return;
- QPtrList<CatManListItem> result;
+ TQPtrList<CatManListItem> result;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -984,10 +984,10 @@ void CatalogManagerView::mailFiles()
{
CatManListItem* item = (CatManListItem*)currentItem();
if(item->isDir()) {
- QStringList filesToSend;
- QStringList childrenList = item->allChildrenList(true);
+ TQStringList filesToSend;
+ TQStringList childrenList = item->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1007,8 +1007,8 @@ void CatalogManagerView::mailMarkedFiles()
if (_markerList.count() == 0)
return;
- QStringList filesToSend;
- QStringList::const_iterator it;
+ TQStringList filesToSend;
+ TQStringList::const_iterator it;
for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1022,24 +1022,24 @@ void CatalogManagerView::packageFiles( )
{
CatManListItem* item = (CatManListItem*)currentItem();
if(item->isDir()) {
- QStringList filesToPackage;
- QStringList childrenList = item->allChildrenList(true);
+ TQStringList filesToPackage;
+ TQStringList childrenList = item->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToPackage << i->poFile();
}
}
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( filesToPackage, packageFileName, QString::null, false );
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false );
}
else {
if (item->hasPo()) {
- QStringList fileToPackage(item->poFile());
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( fileToPackage, packageFileName, QString::null, false );
+ TQStringList fileToPackage(item->poFile());
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( fileToPackage, packageFileName, TQString::null, false );
}
}
}
@@ -1048,8 +1048,8 @@ void CatalogManagerView::packageMarkedFiles( )
if (_markerList.count() == 0)
return;
- QStringList filesToPackage;
- QStringList::const_iterator it;
+ TQStringList filesToPackage;
+ TQStringList::const_iterator it;
for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1057,8 +1057,8 @@ void CatalogManagerView::packageMarkedFiles( )
}
}
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( filesToPackage, packageFileName, QString::null, false );
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false );
}
// CVS
@@ -1122,8 +1122,8 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ
KSharedConfig* config = _project->sharedConfig();
if ( marked ) {
if ( _markerList.isEmpty() ) return;
- QStringList fileList;
- QStringList::const_iterator it;
+ TQStringList fileList;
+ TQStringList::const_iterator it;
for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) {
CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
@@ -1133,12 +1133,12 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ
}
cvshandler->execCVSCommand( this, cmd, fileList, templates, config );
} else {
- const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
- QString cvsItem;
+ const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
+ TQString cvsItem;
CatManListItem * item = (CatManListItem*)currentItem( );
if ( ( cmd == CVS::Commit || cmd == CVS::Diff ) && item->isDir( ) ) {
// all children including directories
- QStringList cvsItems = item->allChildrenFileList (true, false, true);
+ TQStringList cvsItems = item->allChildrenFileList (true, false, true);
if ( !cvsItems.isEmpty( ) )
cvshandler->execCVSCommand( this, cmd, cvsItems, templates, config );
} else {
@@ -1234,8 +1234,8 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ
KSharedConfig* config = _project->sharedConfig();
if ( marked ) {
if ( _markerList.isEmpty() ) return;
- QStringList fileList;
- QStringList::const_iterator it;
+ TQStringList fileList;
+ TQStringList::const_iterator it;
for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) {
CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
@@ -1245,12 +1245,12 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ
}
svnhandler->execSVNCommand( this, cmd, fileList, templates, config );
} else {
- const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
- QString svnItem;
+ const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
+ TQString svnItem;
CatManListItem * item = (CatManListItem*)currentItem( );
if ( ( cmd == SVN::Commit || cmd == SVN::Diff ) && item->isDir( ) ) {
// all children including directories
- QStringList svnItems = item->allChildrenFileList (true, false, true);
+ TQStringList svnItems = item->allChildrenFileList (true, false, true);
if ( !svnItems.isEmpty( ) )
svnhandler->execSVNCommand( this, cmd, svnItems, templates, config );
} else {
@@ -1270,26 +1270,26 @@ void CatalogManagerView::showLog()
_logWindow->show();
}
-QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
+TQString CatalogManagerView::find( FindOptions &options, TQStringList &rest )
{
CatManListItem* i=(CatManListItem*) currentItem();
if(!i || options.inAllFiles)
i=(CatManListItem*)_dirList["/"];
- QValueList<QString> foundFiles;
+ TQValueList<TQString> foundFiles;
_stopSearch = false;
- const QString search = options.findStr.lower().simplifyWhiteSpace();
- QStringList searchWords = QStringList::split(' ', search);
+ const TQString search = options.findStr.lower().simplifyWhiteSpace();
+ TQStringList searchWords = TQStringList::split(' ', search);
- QStringList childrenList;
+ TQStringList childrenList;
if( i->isFile() ) childrenList.append(i->name());
else childrenList =i->allChildrenList(true);
emit prepareFindProgressBar(childrenList.size());
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1314,7 +1314,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
else doSearch = true; // we do not have index, we need to search
if( doSearch )
{
- QString itemFile;
+ TQString itemFile;
if( options.inTemplates )
{
if( item->hasPot() ) itemFile=item->potFile();
@@ -1338,14 +1338,14 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
_stopSearch = false;
return itemFile;
}
- const QString foundItemFile = itemFile;
+ const TQString foundItemFile = itemFile;
it++;
while( it != childrenList.constEnd() )
{
CatManListItem *item = _fileList[(*it)];
- itemFile = QString::null;
+ itemFile = TQString::null;
if( options.inTemplates )
{
if( item->hasPot() ) itemFile=item->potFile();
@@ -1353,7 +1353,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
if( item->hasPo() )itemFile=item->poFile();
}
if( options.inMarkedFiles && !item->marked() )
- itemFile=QString::null;
+ itemFile=TQString::null;
if( !itemFile.isNull())
{
@@ -1380,23 +1380,23 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
_stopSearch = false;
rest.clear();
if( _updateNesting == 0 && !_stop ) emit updateFinished();
- return QString::null;
+ return TQString::null;
}
}
- return QString::null;
+ return TQString::null;
}
-bool CatalogManagerView::hasMatchingWords( QStringList &itemWords, QStringList &searchWords)
+bool CatalogManagerView::hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords)
{
- for( QStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
- for( QStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
+ for( TQStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
+ for( TQStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
if( *it1 == *it2
|| (*it1).contains(*it2)
|| (*it2).contains(*it1) ) return true;
return false;
}
-void CatalogManagerView::showContentsMenu(QListViewItem *i, const QPoint &point, int)
+void CatalogManagerView::showContentsMenu(TQListViewItem *i, const TQPoint &point, int)
{
CatManListItem* item = (CatManListItem*) i;
@@ -1427,7 +1427,7 @@ void CatalogManagerView::checkSelected()
emit selectedChanged(actionValue);
}
-void CatalogManagerView::activateItem(QListViewItem *)
+void CatalogManagerView::activateItem(TQListViewItem *)
{
CatManListItem* item=(CatManListItem*) currentItem();
@@ -1471,7 +1471,7 @@ void CatalogManagerView::slotOpenFileInNewWindow()
if(item && item->isFile())
{
- QString filename;
+ TQString filename;
if(item->hasPo())
{
emit openFileInNewWindow(item->poFile(),item->package());
@@ -1499,10 +1499,10 @@ void CatalogManagerView::slotDeleteFile()
if(item && item->isFile() && item->hasPo() && !item->hasPot())
{
- const QString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile());
+ const TQString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile());
if(KMessageBox::warningContinueCancel(this,msg,i18n("Warning"),KGuiItem( i18n("Delete"), "editdelete"))== KMessageBox::Continue)
{
- if(!QFile::remove(item->poFile()))
+ if(!TQFile::remove(item->poFile()))
{
KMessageBox::sorry(this,i18n("Was not able to delete the file %1!").arg(item->poFile()));
}
@@ -1545,9 +1545,9 @@ void CatalogManagerView::slotToggleMarksInDir()
if(i && i->isDir())
{
- const QStringList contentList = i->allChildrenList(true);
+ const TQStringList contentList = i->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1579,9 +1579,9 @@ void CatalogManagerView::slotClearMarksInDir()
if(i && i->isDir())
{
- const QStringList contentList=i->contentsList(true);
+ const TQStringList contentList=i->contentsList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1608,7 +1608,7 @@ void CatalogManagerView::slotDirCommand(int index)
if(index>=0 && item && item->isDir())
{
- QString cmd=*(_settings.dirCommands).at(index);
+ TQString cmd=*(_settings.dirCommands).at(index);
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@PODIR@",item->poFile());
cmd.replace("@POTDIR@",item->potFile());
@@ -1620,12 +1620,12 @@ void CatalogManagerView::slotDirCommand(int index)
KProcess* proc = new KShellProcess();
_pendingProcesses.append(proc);
- connect( proc,SIGNAL( processExited(KProcess *) ), this
- ,SLOT( processEnded(KProcess*) ) );
- connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
- connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this
+ ,TQT_SLOT( processEnded(KProcess*) ) );
+ connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
*proc << "cd" << item->poFile() << ";" << cmd;
proc->start(KProcess::NotifyOnExit,KProcess::AllOutput);
@@ -1640,7 +1640,7 @@ void CatalogManagerView::slotFileCommand(int index)
{
CatManListItem* parent = (CatManListItem*)item->parent();
- QString cmd=*(_settings.fileCommands).at(index);
+ TQString cmd=*(_settings.fileCommands).at(index);
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@POFILE@",item->poFile());
cmd.replace("@POTFILE@",item->potFile());
@@ -1653,12 +1653,12 @@ void CatalogManagerView::slotFileCommand(int index)
KProcess* proc = new KShellProcess();
_pendingProcesses.append(proc);
- connect( proc,SIGNAL( processExited(KProcess *) ), this
- ,SLOT( processEnded(KProcess*) ) );
- connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
- connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this
+ ,TQT_SLOT( processEnded(KProcess*) ) );
+ connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
*proc << "cd" << parent->poFile() << ";" << cmd;
proc->start(KProcess::NotifyOnExit,KProcess::AllOutput);
@@ -1667,9 +1667,9 @@ void CatalogManagerView::slotFileCommand(int index)
}
-void CatalogManagerView::updateFile(QString fileWithPath, bool force)
+void CatalogManagerView::updateFile(TQString fileWithPath, bool force)
{
- QString relFile;
+ TQString relFile;
if(fileWithPath.startsWith(_settings.poBaseDir))
{
relFile=fileWithPath.mid(_settings.poBaseDir.length());
@@ -1704,9 +1704,9 @@ void CatalogManagerView::updateFile(QString fileWithPath, bool force)
}
-void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo)
+void CatalogManagerView::updateAfterSave(TQString fileWithPath, PoInfo &newInfo)
{
- QString relFile;
+ TQString relFile;
if(fileWithPath.startsWith(_settings.poBaseDir))
{
relFile=fileWithPath.mid(_settings.poBaseDir.length());
@@ -1741,7 +1741,7 @@ void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo)
void CatalogManagerView::buildTree()
{
// in case we were called after settings update
- disconnect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) );
+ disconnect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) );
emit signalBuildTree(false); // announce start of building
@@ -1760,7 +1760,7 @@ void CatalogManagerView::buildTree()
_dirList.insert("/",root);
//root->setSelectable(false);
- QFileInfo fileInfo(_settings.poBaseDir);
+ TQFileInfo fileInfo(_settings.poBaseDir);
if(!fileInfo.isDir())
{
KMessageBox::error(this,i18n("You have not specified a valid folder "
@@ -1833,7 +1833,7 @@ void CatalogManagerView::buildTree()
}
// first read information about the files...
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
int i=0;
while ( it.current() && !_stop)
@@ -1844,7 +1844,7 @@ void CatalogManagerView::buildTree()
}
// ...then update directories
- QDictIterator<CatManListItem> dit( _dirList ); // iterator for dict
+ TQDictIterator<CatManListItem> dit( _dirList ); // iterator for dict
while ( dit.current() && !_stop)
{
@@ -1868,12 +1868,12 @@ void CatalogManagerView::buildTree()
}
}
-bool CatalogManagerView::buildDir(QString relDir,bool fast)
+bool CatalogManagerView::buildDir(TQString relDir,bool fast)
{
if( _stop ) return false;
bool haveTemplateDir=true;
- QFileInfo fileInfo;
+ TQFileInfo fileInfo;
fileInfo.setFile(_settings.potBaseDir);
if(!fileInfo.isDir())
@@ -1891,8 +1891,8 @@ bool CatalogManagerView::buildDir(QString relDir,bool fast)
}
-bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
- , const QString extension , bool fast)
+bool CatalogManagerView::buildDir(const TQString& baseDir,const TQString& relDir
+ , const TQString extension , bool fast)
{
if( _stop ) return false;
@@ -1905,14 +1905,14 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
return false;
}
- const QString poBaseDir=_settings.poBaseDir;
- const QString potBaseDir=_settings.potBaseDir;
+ const TQString poBaseDir=_settings.poBaseDir;
+ const TQString potBaseDir=_settings.potBaseDir;
// traverse directory in poBaseDir
- QDir dir(baseDir+relDir);
- QStringList entryList=dir.entryList("*"+extension,QDir::Files,QDir::Name);
+ TQDir dir(baseDir+relDir);
+ TQStringList entryList=dir.entryList("*"+extension,TQDir::Files,TQDir::Name);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it )
{
@@ -1920,8 +1920,8 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
havePoFiles=true;
- QString file=relDir+(*it);
- file.remove(QRegExp(extension+"$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(extension+"$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -1941,7 +1941,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
}
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it )
{
@@ -1952,7 +1952,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
continue;
}
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(baseDir+subDir))
{
_dirWatch->addDir(baseDir+subDir);
@@ -1987,7 +1987,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
}
-void CatalogManagerView::updateDir(QString relDir)
+void CatalogManagerView::updateDir(TQString relDir)
{
if( _stop ) return;
@@ -2002,16 +2002,16 @@ void CatalogManagerView::updateDir(QString relDir)
return;
}
- QStringList contentList = thisItem->contentsList(true);
+ TQStringList contentList = thisItem->contentsList(true);
- const QString poBaseDir=_settings.poBaseDir;
- const QString potBaseDir=_settings.potBaseDir;
+ const TQString poBaseDir=_settings.poBaseDir;
+ const TQString potBaseDir=_settings.potBaseDir;
// first lookup template directory
- QDir dir(potBaseDir+relDir);
- QStringList entryList=dir.entryList("*.pot",QDir::Files,QDir::Name);
+ TQDir dir(potBaseDir+relDir);
+ TQStringList entryList=dir.entryList("*.pot",TQDir::Files,TQDir::Name);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2019,8 +2019,8 @@ void CatalogManagerView::updateDir(QString relDir)
havePoFiles=true;
- QString file=relDir+(*it);
- file.remove(QRegExp(".pot$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(".pot$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -2042,7 +2042,7 @@ void CatalogManagerView::updateDir(QString relDir)
contentList.remove(file);
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2055,7 +2055,7 @@ void CatalogManagerView::updateDir(QString relDir)
bool newDirAdded=false;
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(potBaseDir+subDir))
{
_dirWatch->addDir(potBaseDir+subDir);
@@ -2093,7 +2093,7 @@ void CatalogManagerView::updateDir(QString relDir)
// now traverse directory in poBaseDir
dir.setPath(poBaseDir+relDir);
- entryList=dir.entryList("*.po",QDir::Files,QDir::Name);
+ entryList=dir.entryList("*.po",TQDir::Files,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2101,8 +2101,8 @@ void CatalogManagerView::updateDir(QString relDir)
if( _stop ) return;
- QString file=relDir+(*it);
- file.remove(QRegExp(".po$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(".po$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -2124,7 +2124,7 @@ void CatalogManagerView::updateDir(QString relDir)
contentList.remove(file);
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2137,7 +2137,7 @@ void CatalogManagerView::updateDir(QString relDir)
bool newDirAdded=false;
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(poBaseDir+subDir))
{
_dirWatch->addDir(poBaseDir+subDir);
@@ -2180,11 +2180,11 @@ void CatalogManagerView::updateDir(QString relDir)
// but only if we traversed also the template directory
if(contentList.count()>0)
{
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
- QFileInfo po(poBaseDir+(*it));
- QFileInfo pot(potBaseDir+(*it));
+ TQFileInfo po(poBaseDir+(*it));
+ TQFileInfo pot(potBaseDir+(*it));
if(!po.exists() && !pot.exists())
{
@@ -2217,11 +2217,11 @@ void CatalogManagerView::updateDir(QString relDir)
}
}
-void CatalogManagerView::directoryChanged(const QString& dir)
+void CatalogManagerView::directoryChanged(const TQString& dir)
{
pause(true);
- QString relDir, relDirPo, relDirPot;
+ TQString relDir, relDirPo, relDirPot;
if(dir.startsWith(_settings.poBaseDir))
{
relDirPo=dir.mid(_settings.poBaseDir.length());
@@ -2261,13 +2261,13 @@ void CatalogManagerView::directoryChanged(const QString& dir)
kdDebug(KBABEL_CATMAN) << "directory changed: " << relDir << endl;
- QFileInfo fileInfo(_settings.potBaseDir);
+ TQFileInfo fileInfo(_settings.potBaseDir);
CatManListItem* thisItem=_dirList[relDir];
if(!thisItem)
{
// if this item is not in the list search for next existing parent item
- QString prevRelDir;
+ TQString prevRelDir;
do
{
prevRelDir=relDir;
@@ -2312,11 +2312,11 @@ void CatalogManagerView::directoryChanged(const QString& dir)
}
-void CatalogManagerView::directoryDeleted(const QString& dir)
+void CatalogManagerView::directoryDeleted(const TQString& dir)
{
pause(true);
- QString relDir, relDirPo, relDirPot;
+ TQString relDir, relDirPo, relDirPot;
if(dir.startsWith(_settings.poBaseDir))
{
relDirPo=dir.mid(_settings.poBaseDir.length());
@@ -2371,10 +2371,10 @@ void CatalogManagerView::directoryDeleted(const QString& dir)
}
else
{
- QStringList childList = thisItem->contentsList();
+ TQStringList childList = thisItem->contentsList();
CatManListItem* item;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childList.constBegin();it != childList.constEnd(); ++it )
{
item=_fileList[(*it)];
@@ -2415,7 +2415,7 @@ void CatalogManagerView::directoryDeleted(const QString& dir)
pause(false);
}
-void CatalogManagerView::fileInfoRead( QString filename )
+void CatalogManagerView::fileInfoRead( TQString filename )
{
if( _readInfoFileList.find( filename ) != _readInfoFileList.end() ) {
emit progress( ++_readInfoCount);
@@ -2437,25 +2437,25 @@ void CatalogManagerView::setSettings(CatManSettings newSettings)
_dirCommandsMenu->clear();
int counter=0;
- for ( QStringList::const_iterator it = _settings.dirCommandNames.constBegin()
+ for ( TQStringList::const_iterator it = _settings.dirCommandNames.constBegin()
; it != _settings.dirCommandNames.constEnd(); ++it )
{
_dirCommandsMenu->insertItem((*it),counter);
counter++;
}
_dirCommandsMenu->insertSeparator();
- _dirCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog()));
+ _dirCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog()));
_fileCommandsMenu->clear();
counter=0;
- for ( QStringList::const_iterator it = _settings.fileCommandNames.constBegin()
+ for ( TQStringList::const_iterator it = _settings.fileCommandNames.constBegin()
; it != _settings.fileCommandNames.constEnd(); ++it )
{
_fileCommandsMenu->insertItem((*it),counter);
counter++;
}
_fileCommandsMenu->insertSeparator();
- _fileCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog()));
+ _fileCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog()));
const bool pathChanged = (oldSettings.poBaseDir!=_settings.poBaseDir)
|| (oldSettings.potBaseDir!=_settings.potBaseDir);
@@ -2463,10 +2463,10 @@ void CatalogManagerView::setSettings(CatManSettings newSettings)
if(pathChanged)
{
if( !isActive() ) {
- QTimer::singleShot(100,this,SLOT(buildTree()));
+ TQTimer::singleShot(100,this,TQT_SLOT(buildTree()));
} else {
stop();
- connect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) );
+ connect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) );
}
}
@@ -2487,7 +2487,7 @@ CatManSettings CatalogManagerView::settings() const
}
-void CatalogManagerView::hideEvent(QHideEvent*)
+void CatalogManagerView::hideEvent(TQHideEvent*)
{
pause(true);
@@ -2495,9 +2495,9 @@ void CatalogManagerView::hideEvent(QHideEvent*)
_dirWatch->stopScan();
}
-void CatalogManagerView::showEvent(QShowEvent*)
+void CatalogManagerView::showEvent(TQShowEvent*)
{
- QTimer::singleShot(1,this,SLOT(checkUpdate()));
+ TQTimer::singleShot(1,this,TQT_SLOT(checkUpdate()));
pause(false);
@@ -2505,15 +2505,15 @@ void CatalogManagerView::showEvent(QShowEvent*)
_dirWatch->startScan(true);
}
-void CatalogManagerView::contentsMousePressEvent(QMouseEvent* event)
+void CatalogManagerView::contentsMousePressEvent(TQMouseEvent* event)
{
if(event->button() == LeftButton)
_pressPos=event->pos();
- QListView::contentsMousePressEvent( event );
+ TQListView::contentsMousePressEvent( event );
}
-void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event)
+void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event)
{
if(event->state() & LeftButton)
{
@@ -2526,29 +2526,29 @@ void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event)
{
// always add the po-file and if existing the pot-file to the drag and
// let the user decide what to do, when dropping into kbabel
- QStrList uri;
- uri.append(QUriDrag::localFileToUri(item->poFile()));
+ TQStrList uri;
+ uri.append(TQUriDrag::localFileToUri(item->poFile()));
if(item->hasPot())
- uri.append(QUriDrag::localFileToUri(item->potFile()));
+ uri.append(TQUriDrag::localFileToUri(item->potFile()));
- QUriDrag* drag = new QUriDrag(uri,this);
- QPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop);
- drag->setPixmap(icon,QPoint(icon.width()/2,icon.height()/2));
+ TQUriDrag* drag = new TQUriDrag(uri,this);
+ TQPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop);
+ drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2));
drag->drag();
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
@@ -2568,7 +2568,7 @@ void CatalogManagerView::saveMarker( KConfig* config) const
}
-void CatalogManagerView::deleteDirItem(QString relDir)
+void CatalogManagerView::deleteDirItem(TQString relDir)
{
CatManListItem* thisItem=_dirList[relDir];
@@ -2577,9 +2577,9 @@ void CatalogManagerView::deleteDirItem(QString relDir)
_dirList.remove(relDir);
- QStringList childList = thisItem->allChildrenList();
+ TQStringList childList = thisItem->allChildrenList();
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childList.constBegin();it != childList.constEnd(); ++it )
{
if(!_fileList.remove((*it)))
@@ -2601,12 +2601,12 @@ void CatalogManagerView::processEnded(KProcess* proc)
void CatalogManagerView::showOutput(KProcess*, char *buffer, int buflen)
{
- const QCString output(buffer,buflen+1);
+ const TQCString output(buffer,buflen+1);
_logView->insert(output);
}
-void CatalogManagerView::columnClicked(QListViewItem * item, const QPoint &, int c)
+void CatalogManagerView::columnClicked(TQListViewItem * item, const TQPoint &, int c)
{
if( item && c == COL_MARKER )
{
@@ -2878,14 +2878,14 @@ void CatalogManagerView::gotoPreviousMarked()
}
}
-QStringList CatalogManagerView::current()
+TQStringList CatalogManagerView::current()
{
- QStringList result;
+ TQStringList result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2899,11 +2899,11 @@ QStringList CatalogManagerView::current()
return result;
}
-QStringList CatalogManagerView::marked()
+TQStringList CatalogManagerView::marked()
{
- QStringList result;
+ TQStringList result;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2943,9 +2943,9 @@ void CatalogManagerView::updateCurrent()
}
}
-void CatalogManagerView::updateFiles( const QStringList& files )
+void CatalogManagerView::updateFiles( const TQStringList& files )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.constBegin( ); it != files.constEnd( ); ++it ) {
updateFile( *it, true );
}
@@ -2961,14 +2961,14 @@ SVNHandler * CatalogManagerView::svnHandler( )
return svnhandler;
}
-void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QString& command )
+void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const TQString& command )
{
- QStringList result;
+ TQStringList result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- const QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ const TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2983,12 +2983,12 @@ void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QSt
validate_internal( result, tool, command );
}
-void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const QString& command )
+void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const TQString& command )
{
validate_internal( _markerList, tool, command );
}
-void CatalogManagerView::validate_internal( const QStringList& files, const KDataToolInfo &tool, const QString& )
+void CatalogManagerView::validate_internal( const TQStringList& files, const KDataToolInfo &tool, const TQString& )
{
if( files.isEmpty() ) return;
@@ -3015,7 +3015,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
_validateOptions->ignoreFuzzy->setChecked( _ignoreFuzzy );
}
- if( _validateOptionsDlg->exec() != QDialog::Accepted )
+ if( _validateOptionsDlg->exec() != TQDialog::Accepted )
{
delete t;
@@ -3025,8 +3025,8 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
if( !_validateDialog )
{
_validateDialog = new ValidateProgressDialog(_settings.ignoreURL, this);
- connect( _validateDialog, SIGNAL( errorDoubleClicked(const QString,const int)),
- this, SLOT(showError( const QString, const int )));
+ connect( _validateDialog, TQT_SIGNAL( errorDoubleClicked(const TQString,const int)),
+ this, TQT_SLOT(showError( const TQString, const int )));
}
_markAsFuzzy = _validateOptions->markAsFuzzy->isChecked();
@@ -3035,9 +3035,9 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
_validateDialog->setMarkAsFuzzy(_markAsFuzzy);
_validateDialog->setIgnoreFuzzy(_ignoreFuzzy);
- QPtrList<CatManListItem> fileitems;
+ TQPtrList<CatManListItem> fileitems;
- for( QValueListConstIterator<QString> it=files.begin() ; it!=files.end() ; ++it )
+ for( TQValueListConstIterator<TQString> it=files.begin() ; it!=files.end() ; ++it )
{
CatManListItem* item=_fileList[ (*it) ];
if( item ) {
@@ -3050,7 +3050,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
delete t;
}
-void CatalogManagerView::showError( const QString package, const int num )
+void CatalogManagerView::showError( const TQString package, const int num )
{
CatManListItem* item = _fileList[ package];
if( !item )
@@ -3064,9 +3064,9 @@ void CatalogManagerView::showError( const QString package, const int num )
void CatalogManagerView::updateMarkerList()
{
- QStringList newMarkers;
+ TQStringList newMarkers;
- for( QStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) {
+ for( TQStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) {
if( _fileList[ (*it) ] )
newMarkers.append( (*it) );
}
diff --git a/kbabel/catalogmanager/catalogmanagerview.h b/kbabel/catalogmanager/catalogmanagerview.h
index e4421973..9c93d195 100644
--- a/kbabel/catalogmanager/catalogmanagerview.h
+++ b/kbabel/catalogmanager/catalogmanagerview.h
@@ -35,17 +35,17 @@
#ifndef CATALOGMANAGERVIEW_H
#define CATALOGMANAGERVIEW_H
-#include <qdict.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
#include <kdialogbase.h>
#include <kdirwatch.h>
#include <kprocess.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kbproject.h"
#include "projectsettings.h"
@@ -78,7 +78,7 @@ class CatalogManagerView : public QListView
{
Q_OBJECT
public:
- CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent=0, const char* name=0);
+ CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent=0, const char* name=0);
virtual ~CatalogManagerView();
KBabel::CatManSettings settings() const;
@@ -89,9 +89,9 @@ public:
void pause(bool);
/** if file fileWithPath exists in the treeview, this is updated */
- void updateFile(QString fileWithPath, bool force = false);
+ void updateFile(TQString fileWithPath, bool force = false);
- void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info);
+ void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info);
bool isActive() const {return _active;}
bool isStopped() const {return _stop;}
@@ -99,10 +99,10 @@ public:
void restoreView(KConfig *config);
void saveView(KConfig *config) const;
- void setRMBMenuFile( QPopupMenu *m);
- void setRMBMenuDir( QPopupMenu *m);
- void setDirCommandsMenu( QPopupMenu *m);
- void setFileCommandsMenu( QPopupMenu *m);
+ void setRMBMenuFile( TQPopupMenu *m);
+ void setRMBMenuDir( TQPopupMenu *m);
+ void setDirCommandsMenu( TQPopupMenu *m);
+ void setFileCommandsMenu( TQPopupMenu *m);
CVSHandler * cvsHandler();
SVNHandler * svnHandler();
@@ -184,7 +184,7 @@ public slots:
void svnInfo();
void svnInfoMarked();
- QString find(KBabel::FindOptions &options, QStringList &rest);
+ TQString find(KBabel::FindOptions &options, TQStringList &rest);
void showLog();
@@ -193,7 +193,7 @@ public slots:
/**
* Stop searching, do not try to proceed to the next file
* @ref @find will return clear list of rest to be searched
- * and @ref QString::null, if search string was not is the last searched file
+ * and @ref TQString::null, if search string was not is the last searched file
*/
void stopSearch();
@@ -201,7 +201,7 @@ public slots:
* Information for this file has been read. If the file is in
* @ref @_readInfoFileList, it will update progress bar by emitting @ref @progress
*/
- void fileInfoRead( QString file );
+ void fileInfoRead( TQString file );
void gotoNextUntranslated();
void gotoPreviousUntranslated();
@@ -218,10 +218,10 @@ public slots:
void gotoNextMarked();
void gotoPreviousMarked();
- void validateUsingTool( const KDataToolInfo &, const QString& );
- void validateMarkedUsingTool( const KDataToolInfo &, const QString& );
+ void validateUsingTool( const KDataToolInfo &, const TQString& );
+ void validateMarkedUsingTool( const KDataToolInfo &, const TQString& );
- void showError( const QString package, const int num);
+ void showError( const TQString package, const int num);
void updateCurrent();
@@ -230,33 +230,33 @@ public slots:
* after 'cvs commit' or 'svn commit' the file contents have not changed
* but the CVS/SVN file status could have changed.
*/
- void updateFiles( const QStringList& files );
+ void updateFiles( const TQStringList& files );
/**
* Returns the list of all currently selected files. If current selection is dir,
* it returns list of all its children.
*/
- QStringList current();
+ TQStringList current();
/**
* Returns the list of all currently marked files.
*/
- QStringList marked();
+ TQStringList marked();
signals:
- void openFile(QString filename,QString package);
- void openFileInNewWindow(QString filename,QString package);
- void openTemplate(QString openFilename,QString saveFileName,QString package);
- void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package);
- void gotoFileEntry(QString filename,QString package,int msgid);
- void prepareProgressBar(QString msg,int max);
+ void openFile(TQString filename,TQString package);
+ void openFileInNewWindow(TQString filename,TQString package);
+ void openTemplate(TQString openFilename,TQString saveFileName,TQString package);
+ void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package);
+ void gotoFileEntry(TQString filename,TQString package,int msgid);
+ void prepareProgressBar(TQString msg,int max);
void progress(int);
void clearProgressBar();
void prepareFindProgressBar(int max);
void signalBuildTree(bool done);
void signalSearchedFile(int count);
- void newValidationFile(QString);
- void newValidationTool(QString);
+ void newValidationFile(TQString);
+ void newValidationTool(TQString);
void setValidationProgressBar(int);
void advanceValidationFileProgressBar(int);
void setMaxValidationProgressBar(int);
@@ -284,7 +284,7 @@ protected:
* @see CatalogManagerView::buildDir
* @see CatalogManagerView::updateDir
*/
- bool buildDir(QString relDir,bool fast=true);
+ bool buildDir(TQString relDir,bool fast=true);
/**
* This function is traversing the real directory on the
@@ -297,7 +297,7 @@ protected:
* @see CatalogManagerView::buildDir
* @see CatalogManagerView::updateDir
*/
- bool buildDir(const QString& baseDir,const QString& relDir, const QString extension,bool fast=true);
+ bool buildDir(const TQString& baseDir,const TQString& relDir, const TQString extension,bool fast=true);
/**
* updates dir relDir and if any new subdir is added
@@ -306,27 +306,27 @@ protected:
* This function doesn't enters subdirs except when a new subdir is added.
* @see CatalogManagerView::buildDir
*/
- void updateDir(QString relDir);
+ void updateDir(TQString relDir);
/**
* stops the update timer and the dirwatch
* @see KDirWatch::stop
- * @see QTimer::stop
+ * @see TQTimer::stop
*/
- virtual void hideEvent(QHideEvent*);
+ virtual void hideEvent(TQHideEvent*);
/**
* restarts the update timer and the dirwatch
* @see KDirWatch::start
- * @see QTimer::start
+ * @see TQTimer::start
*/
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
/** used for dragging */
- virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
/** used for dragging */
- virtual void contentsMouseMoveEvent(QMouseEvent* e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e);
- void showStatistics( CatManListItem *i, QStringList &packages);
+ void showStatistics( CatManListItem *i, TQStringList &packages);
protected slots:
/** rebuilds the tree*/
@@ -338,13 +338,13 @@ protected slots:
void checkUpdate();
/** this is called from KDirWatch when a directory has changed */
- void directoryChanged(const QString& dir);
+ void directoryChanged(const TQString& dir);
/** this is called from KDirWatch when a directory has been deleted */
- void directoryDeleted(const QString& dir);
+ void directoryDeleted(const TQString& dir);
- void showContentsMenu(QListViewItem *, const QPoint &, int col);
+ void showContentsMenu(TQListViewItem *, const TQPoint &, int col);
/** does the default action on the currently selected item*/
- void activateItem(QListViewItem *);
+ void activateItem(TQListViewItem *);
/** emits the state of the selected item using selectedChanged*/
void checkSelected();
/** calls @ref activateItem with the selected item as argument*/
@@ -366,7 +366,7 @@ protected slots:
private slots:
void showOutput(KProcess *proc, char *buffer, int buflen);
void processEnded(KProcess *proc);
- void columnClicked(QListViewItem * item, const QPoint & pnt, int c);
+ void columnClicked(TQListViewItem * item, const TQPoint & pnt, int c);
void slotToggleCVSOrSVNColumn( bool );
@@ -396,33 +396,33 @@ private:
* deletes item with package name (relative directory) relDir
* and makes sure, that all subitems are removed from the lists
*/
- void deleteDirItem(QString relDir);
+ void deleteDirItem(TQString relDir);
- bool hasMatchingWords( QStringList &itemWords, QStringList &searchWords);
+ bool hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords);
CatManListItem *itemBelow( CatManListItem *item );
CatManListItem *itemAbove( CatManListItem *item );
- void validate_internal( const QStringList&, const KDataToolInfo &, const QString& );
+ void validate_internal( const TQStringList&, const KDataToolInfo &, const TQString& );
void doCVSCommand( CVS::Command cmd, bool marked = false, bool templates = false );
void doSVNCommand( SVN::Command cmd, bool marked = false, bool templates = false );
private:
- QDict<CatManListItem> _dirList;
- QDict<CatManListItem> _fileList;
+ TQDict<CatManListItem> _dirList;
+ TQDict<CatManListItem> _fileList;
KDirWatch *_dirWatch;
- QTimer *_updateTimer;
+ TQTimer *_updateTimer;
// list of files for which was calculated the progress bar for reading file info
- QStringList _readInfoFileList;
+ TQStringList _readInfoFileList;
// current count of already read files in @ref @_readInfoFileList.
int _readInfoCount;
KBabel::CatManSettings _settings;
- QStringList _markerList;
+ TQStringList _markerList;
bool _active;
// stopping, application quit
@@ -431,17 +431,17 @@ private:
bool _stopSearch;
int _updateNesting;
- QPtrList<KProcess> _pendingProcesses;
+ TQPtrList<KProcess> _pendingProcesses;
- QTextEdit* _logView;
+ TQTextEdit* _logView;
KDialogBase* _logWindow;
- QPopupMenu* _fileContentsMenu;
- QPopupMenu* _dirContentsMenu;
- QPopupMenu* _dirCommandsMenu;
- QPopupMenu* _fileCommandsMenu;
+ TQPopupMenu* _fileContentsMenu;
+ TQPopupMenu* _dirContentsMenu;
+ TQPopupMenu* _dirCommandsMenu;
+ TQPopupMenu* _fileCommandsMenu;
/** used for starting a drag */
- QPoint _pressPos;
+ TQPoint _pressPos;
KBabelDictBox* _dictBox;
diff --git a/kbabel/catalogmanager/catmanlistitem.cpp b/kbabel/catalogmanager/catmanlistitem.cpp
index 249cb053..5613a0bd 100644
--- a/kbabel/catalogmanager/catmanlistitem.cpp
+++ b/kbabel/catalogmanager/catmanlistitem.cpp
@@ -42,29 +42,29 @@
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <cvshandler.h>
#include <svnhandler.h>
using namespace KBabel;
-CatManListItem::CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath,QString fullPotPath,QString package)
- : QListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath,TQString fullPotPath,TQString package)
+ : TQListViewItem(parent)
{
_view = view;
init(fullPath,fullPotPath,package);
}
-CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath,QString fullPotPath)
- : QListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath,TQString fullPotPath)
+ : TQListViewItem(parent)
{
- _primary=QFileInfo(fullPath);
- _template=QFileInfo(fullPotPath);
+ _primary=TQFileInfo(fullPath);
+ _template=TQFileInfo(fullPotPath);
_package="/";
_type=Dir;
_marked=false;
@@ -82,10 +82,10 @@ CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QStri
}
-void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, const QString& package)
+void CatManListItem::init(const TQString& fullPath, const TQString& fullPotPath, const TQString& package)
{
- _primary=QFileInfo(fullPath);
- _template=QFileInfo(fullPotPath);
+ _primary=TQFileInfo(fullPath);
+ _template=TQFileInfo(fullPotPath);
_package=package;
_marked=false;
@@ -97,7 +97,7 @@ void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, c
_template.setCaching(false);
// set
- _lastUpdated=QDate(1900,1,1);
+ _lastUpdated=TQDate(1900,1,1);
_wordList.clear();
_wordListUpdated = false;
@@ -141,11 +141,11 @@ bool CatManListItem::marked() const
void CatManListItem::setOpen(bool open)
{
bool needWork = needsWork();
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
if(open && _type==Dir)
{
- QPixmap icon;
+ TQPixmap icon;
icon = needWork ? ICON_FOLDER_OPEN_WORK : ICON_FOLDER_OPEN_OK;
if(!_template.exists())
@@ -164,7 +164,7 @@ void CatManListItem::setOpen(bool open)
}
else
{
- QPixmap icon;
+ TQPixmap icon;
if(needsWork())
icon = ICON_FOLDER_CLOSED_WORK;
@@ -181,14 +181,14 @@ void CatManListItem::setOpen(bool open)
}
-QStringList CatManListItem::allChildrenList(bool onlyFiles) const
+TQStringList CatManListItem::allChildrenList(bool onlyFiles) const
{
- QStringList childrenList;
+ TQStringList childrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
{
- QString name=myChild->package();
+ TQString name=myChild->package();
if(myChild->isFile())
{
@@ -209,9 +209,9 @@ QStringList CatManListItem::allChildrenList(bool onlyFiles) const
}
-QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const
+TQStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const
{
- QStringList childrenList;
+ TQStringList childrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
@@ -238,14 +238,14 @@ QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs,
}
-QStringList CatManListItem::contentsList(bool onlyFiles) const
+TQStringList CatManListItem::contentsList(bool onlyFiles) const
{
- QStringList childList;
+ TQStringList childList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
{
- QString name=myChild->package();
+ TQString name=myChild->package();
if(onlyFiles)
{
@@ -292,10 +292,10 @@ void CatManListItem::checkUpdate(bool noParents)
}
}
-QString CatManListItem::key(int col, bool) const
+TQString CatManListItem::key(int col, bool) const
{
// show directories first
- QString key=text(col);
+ TQString key=text(col);
if(col==COL_NAME)
{
@@ -356,7 +356,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
{
if(_primary.isDir())
{
- QDir dir=_primary.dir();
+ TQDir dir=_primary.dir();
setText(COL_NAME,dir.dirName());
// count the childen numbers
@@ -374,15 +374,15 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
ch = static_cast<CatManListItem*>(ch->nextSibling());
}
- setText(COL_FUZZY,QString::number(fuzzy));
- setText(COL_UNTRANS,QString::number(untrans));
- setText(COL_TOTAL,QString::number(total));
+ setText(COL_FUZZY,TQString::number(fuzzy));
+ setText(COL_UNTRANS,TQString::number(untrans));
+ setText(COL_TOTAL,TQString::number(total));
//setSelectable(false);
_type=Dir;
bool needWork = needsWork();
- QPixmap icon;
+ TQPixmap icon;
if(!isOpen())
{
if( needWork )
@@ -403,7 +403,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
}
else
{
- QPixmap folder = icon;
+ TQPixmap folder = icon;
icon=paintExclamation(&folder);
setPixmap(COL_NAME,folder);
@@ -412,18 +412,18 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else // primary is file
{
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
if(showPoInfo)
{
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
bool neededWork=needsWork();
bool needWork=false;
PoInfo poInfo;
- QPixmap icon = ICON_UPDATING;
+ TQPixmap icon = ICON_UPDATING;
setPixmap(COL_NAME,icon);
if ( PoInfo::info( _primary.absFilePath(), poInfo, _wordList, updateWordList, true, true ) == OK )
{
@@ -441,7 +441,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
_isModified = cvsHandler->isConsideredModified( cvsFileStatus )
|| svnHandler->isConsideredModified( svnFileStatus );
- QString versionControl;
+ TQString versionControl;
if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
versionControl = cvsHandler->fileStatus( cvsFileStatus );
else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
@@ -449,9 +449,9 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else
versionControl = i18n("No version control");
- setText(COL_FUZZY,QString::number(poInfo.fuzzy));
- setText(COL_UNTRANS,QString::number(poInfo.untranslated));
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_FUZZY,TQString::number(poInfo.fuzzy));
+ setText(COL_UNTRANS,TQString::number(poInfo.untranslated));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
setText( COL_CVS_OR_SVN, versionControl );
setText(COL_REVISION,poInfo.revision);
setText(COL_TRANSLATOR,poInfo.lastTranslator);
@@ -492,7 +492,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
{
if(_template.isDir())
{
- QDir dir=_template.dir();
+ TQDir dir=_template.dir();
setText(COL_NAME,dir.dirName());
//setSelectable(false);
_type=Dir;
@@ -508,10 +508,10 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
ch = static_cast<CatManListItem*>(ch->nextSibling());
}
- setText(COL_TOTAL,QString::number(total));
+ setText(COL_TOTAL,TQString::number(total));
- QPixmap icon;
+ TQPixmap icon;
if(!isOpen())
{
icon = ICON_FOLDER_CLOSED_WORK;
@@ -527,20 +527,20 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else
{
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
if(showPoInfo)
{
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
// clean previous state information
- setText(COL_FUZZY,QString::null);
- setText(COL_UNTRANS,QString::null);
- setText(COL_TOTAL,QString::null);
- setText(COL_CVS_OR_SVN, QString::null);
- setText(COL_REVISION, QString::null);
- setText(COL_TRANSLATOR, QString::null);
+ setText(COL_FUZZY,TQString::null);
+ setText(COL_UNTRANS,TQString::null);
+ setText(COL_TOTAL,TQString::null);
+ setText(COL_CVS_OR_SVN, TQString::null);
+ setText(COL_REVISION, TQString::null);
+ setText(COL_TRANSLATOR, TQString::null);
setPixmap(COL_NAME,ICON_UPDATING);
@@ -548,7 +548,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
if ( PoInfo::info( _template.absFilePath(), poInfo, _wordList, false, true, true ) == OK )
{
if( _view->isStopped() ) return;
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
}
if( _view->isStopped() ) return;
}
@@ -614,21 +614,21 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
// primary is existent file
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
bool neededWork=needsWork();
bool needWork=false;
- QPixmap icon;
+ TQPixmap icon;
_hasErrors=false;
const CVSHandler::FileStatus cvsFileStatus = _view->cvsHandler()->fstatus(poFile());
const SVNHandler::FileStatus svnFileStatus = _view->svnHandler()->fstatus(poFile());
- QString versionControl;
+ TQString versionControl;
if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
versionControl = _view->cvsHandler()->fileStatus( cvsFileStatus );
else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
@@ -636,9 +636,9 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
else
versionControl = i18n("No version control");
- setText(COL_FUZZY,QString::number(poInfo.fuzzy));
- setText(COL_UNTRANS,QString::number(poInfo.untranslated));
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_FUZZY,TQString::number(poInfo.fuzzy));
+ setText(COL_UNTRANS,TQString::number(poInfo.untranslated));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
setText( COL_CVS_OR_SVN, versionControl );
setText(COL_REVISION,poInfo.revision);
setText(COL_TRANSLATOR,poInfo.lastTranslator);
@@ -777,17 +777,17 @@ bool CatManListItem::isFile() const
return type()==File;
}
-QString CatManListItem::poFile() const
+TQString CatManListItem::poFile() const
{
return _primary.absFilePath();
}
-QString CatManListItem::potFile() const
+TQString CatManListItem::potFile() const
{
return _template.absFilePath();
}
-QString CatManListItem::package(bool rootSlash) const
+TQString CatManListItem::package(bool rootSlash) const
{
if(rootSlash)
return _package;
@@ -797,21 +797,21 @@ QString CatManListItem::package(bool rootSlash) const
}
}
-QString CatManListItem::packageDir( ) const
+TQString CatManListItem::packageDir( ) const
{
- return ( _type == Dir ? _package : QString::null );
+ return ( _type == Dir ? _package : TQString::null );
}
-QString CatManListItem::name() const
+TQString CatManListItem::name() const
{
int index = _package.findRev("/");
return _package.right(_package.length()-index-1);
}
-QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
+TQPixmap CatManListItem::paintExclamation(TQPixmap* pixmap)
{
if(!pixmap || pixmap->isNull())
- return QPixmap(0,0);
+ return TQPixmap(0,0);
if(_package=="/" && _template.filePath().isEmpty())
return *pixmap;
@@ -827,17 +827,17 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
int diameter=QMIN(width,height);
- QBitmap mask=pixmap->createHeuristicMask();
+ TQBitmap mask=pixmap->createHeuristicMask();
- QPainter mp(&mask);
- mp.setPen(QPen(Qt::color1,1));
+ TQPainter mp(&mask);
+ mp.setPen(TQPen(Qt::color1,1));
mp.drawEllipse(width-diameter,height-diameter,diameter,diameter);
- QPixmap result(width,height);
+ TQPixmap result(width,height);
- QPainter p(&result);
+ TQPainter p(&result);
p.drawPixmap(0,0,*pixmap);
- p.setPen( QPen(red,1) );
+ p.setPen( TQPen(red,1) );
p.drawEllipse(width-diameter,height-diameter,diameter,diameter);
result.setMask(mask);
@@ -845,9 +845,9 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
return result;
}
-QListViewItem *CatManListItem::previousSibling()
+TQListViewItem *CatManListItem::previousSibling()
{
- QListViewItem * i = parent();
+ TQListViewItem * i = parent();
if( !i ) return i;
i = i->firstChild();
if( !i ) return i;
@@ -856,22 +856,22 @@ QListViewItem *CatManListItem::previousSibling()
return i;
}
-QListViewItem *CatManListItem::lastChild()
+TQListViewItem *CatManListItem::lastChild()
{
- QListViewItem * i = firstChild();
+ TQListViewItem * i = firstChild();
if( !i ) return i;
while( i->nextSibling() ) i = i->nextSibling();
return i;
}
-void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy)
+void CatManListItem::checkErrors(KDataTool* tool, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy)
{
bool hasError=false;
_errors.clear();
Catalog* cat = new Catalog();
- QObject::connect( cat, SIGNAL( signalProgress(int) ), progressSignalHandler, SIGNAL( setValidationProgressBar(int)));
- QObject::connect( cat, SIGNAL( signalResetProgressBar(QString, int) ), progressSignalHandler, SLOT( setupFileProgressBar(QString, int)));
+ TQObject::connect( cat, TQT_SIGNAL( signalProgress(int) ), progressSignalHandler, TQT_SIGNAL( setValidationProgressBar(int)));
+ TQObject::connect( cat, TQT_SIGNAL( signalResetProgressBar(TQString, int) ), progressSignalHandler, TQT_SLOT( setupFileProgressBar(TQString, int)));
if( cat->openURL(KURL( poFile() )) == OK )
{
@@ -887,7 +887,7 @@ void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler
if( hasError )
{
- QString errortext;
+ TQString errortext;
_hasErrors = true;
DocPosition dummy;
diff --git a/kbabel/catalogmanager/catmanlistitem.h b/kbabel/catalogmanager/catmanlistitem.h
index a5f41e2f..00fc3842 100644
--- a/kbabel/catalogmanager/catmanlistitem.h
+++ b/kbabel/catalogmanager/catmanlistitem.h
@@ -38,10 +38,10 @@
#include <config.h>
#endif
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
#include "validateprogress.h"
@@ -60,24 +60,24 @@ public:
/** the type of this item */
enum Type{File,Dir};
- CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath
- ,QString fullPotPath,QString package);
+ CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath
+ ,TQString fullPotPath,TQString package);
/** creates the toplevel root item with package name "/" */
- CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath, QString fullPotPath);
+ CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath, TQString fullPotPath);
/**
* returns the package names (including relative path) of the
* children of this item
*/
- QStringList contentsList(bool onlyFiles=false) const;
+ TQStringList contentsList(bool onlyFiles=false) const;
/**
* returns the package names of all children of this item
* (including all subdirectries)
* @param onlyFiles flag, if only the names of files should be returned
* @see CatManListItem::contentsList
*/
- QStringList allChildrenList(bool onlyFiles=false) const;
+ TQStringList allChildrenList(bool onlyFiles=false) const;
/**
* returns the relative file names of all children of this item
@@ -87,7 +87,7 @@ public:
* @param onlyModified, if only modified files should be returned
* @see CatManListItem::contentsList
*/
- QStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const;
+ TQStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const;
void setMarked(bool on);
bool marked() const;
@@ -110,20 +110,20 @@ public:
* @param ignoreFuzzy flag, whether fuzzy messages in the file should be not checked
* @param markAsFuzzy flag, whether the error messages should be marked as fuzzy (this alters the PO file)
*/
- void checkErrors(KDataTool* validator, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy);
+ void checkErrors(KDataTool* validator, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy);
/** return the absolute filename of the po-File */
- QString poFile() const;
+ TQString poFile() const;
/** return the absolute filename of the pot-File */
- QString potFile() const;
+ TQString potFile() const;
/** returns the package name (inlcuding relative path to base-directory) */
- QString package(bool rootSlash=true) const;
+ TQString package(bool rootSlash=true) const;
- /** returns the relative path of a dir or QString::null if not a dir. */
- QString packageDir( ) const;
+ /** returns the relative path of a dir or TQString::null if not a dir. */
+ TQString packageDir( ) const;
/** returns the package name (without path) */
- QString name() const;
+ TQString name() const;
/**
* returns the type of this item
@@ -159,25 +159,25 @@ public:
* @return true, if there were errors while parsing the file
*/
bool hasErrors() const {return _hasErrors;}
- QValueList<IgnoreItem> errors() const {return _errors;}
+ TQValueList<IgnoreItem> errors() const {return _errors;}
- virtual QString key(int col,bool) const;
+ virtual TQString key(int col,bool) const;
virtual void setOpen(bool);
/** paints the marking, if this package has no template */
- QPixmap paintExclamation(QPixmap*);
+ TQPixmap paintExclamation(TQPixmap*);
void updateAfterSave( KBabel::PoInfo &po);
- QStringList &wordList() { return _wordList; }
+ TQStringList &wordList() { return _wordList; }
bool wordsUpdated() { return _wordListUpdated; }
/** These are not in Qt, so we need to implement it ourselves*/
- QListViewItem *previousSibling();
- QListViewItem *lastChild();
+ TQListViewItem *previousSibling();
+ TQListViewItem *lastChild();
private:
- void init(const QString& fullPath, const QString& fullPotPath,const QString& package);
+ void init(const TQString& fullPath, const TQString& fullPotPath,const TQString& package);
/**
* updates the item
* @param showPoInfo if true, reads information about the
@@ -197,12 +197,12 @@ private:
* last updated. This is used to check, if the file
* on the disc has changed since last update.
*/
- QDateTime _lastUpdated;
+ TQDateTime _lastUpdated;
/** the po-file */
- QFileInfo _primary;
+ TQFileInfo _primary;
/** the pot-file */
- QFileInfo _template;
+ TQFileInfo _template;
/**
* The package name, includes the relative path beginning
* at the base directory.
@@ -210,7 +210,7 @@ private:
* The root item has the package name "/"
* @see CatManListItem::CatManListItem
*/
- QString _package;
+ TQString _package;
Type _type;
bool _marked;
@@ -225,13 +225,13 @@ private:
/** flag, if the PO-file has a syntax error */
bool _hasErrors;
/** a list of errors found by validation tool*/
- QValueList<IgnoreItem> _errors;
+ TQValueList<IgnoreItem> _errors;
/** parent view for this item, used for stopping the activity */
CatalogManagerView *_view;
/** index of words, but it does not contain any useful information as values */
- QStringList _wordList;
+ TQStringList _wordList;
bool _wordListUpdated;
};
diff --git a/kbabel/catalogmanager/findinfilesdialog.cpp b/kbabel/catalogmanager/findinfilesdialog.cpp
index b11a20d8..becffa51 100644
--- a/kbabel/catalogmanager/findinfilesdialog.cpp
+++ b/kbabel/catalogmanager/findinfilesdialog.cpp
@@ -32,10 +32,10 @@
**************************************************************************** */
#include "findinfilesdialog.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -44,19 +44,19 @@
using namespace KBabel;
-FindInFilesDialog::FindInFilesDialog(bool forReplace, QWidget* parent)
+FindInFilesDialog::FindInFilesDialog(bool forReplace, TQWidget* parent)
:FindDialog(forReplace, parent)
{
- QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget());
+ TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget());
mainWidget()->layout()->add(box);
- _inAllFiles = new QCheckBox(i18n("&In all files"),box);
- _inMarked = new QCheckBox(i18n("&Marked files"),box);
- _inTemplates = new QCheckBox(i18n("In &templates"),box);
- _askForNextFile = new QCheckBox(i18n("Ask before ne&xt file"),box);
- _askForSave = new QCheckBox(i18n("Save &without asking"),box);
+ _inAllFiles = new TQCheckBox(i18n("&In all files"),box);
+ _inMarked = new TQCheckBox(i18n("&Marked files"),box);
+ _inTemplates = new TQCheckBox(i18n("In &templates"),box);
+ _askForNextFile = new TQCheckBox(i18n("Ask before ne&xt file"),box);
+ _askForSave = new TQCheckBox(i18n("Save &without asking"),box);
- QWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
"<p>Here you can finetune where to find:"
"<ul><li><b>In all files</b>: search in all files, otherwise searched "
"is the selected file or files in the selected folder</li>"
@@ -71,14 +71,14 @@ FindInFilesDialog::~FindInFilesDialog()
saveSettings();
}
-int FindInFilesDialog::show(QString initialStr)
+int FindInFilesDialog::show(TQString initialStr)
{
FindDialog::show(initialStr);
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if( isReplaceDialog() ) {
ReplaceOptions options = replaceOpts();
options.inAllFiles = _inAllFiles->isChecked();
@@ -102,13 +102,13 @@ int FindInFilesDialog::show(QString initialStr)
return r;
}
-int FindInFilesDialog::exec(QString initialStr)
+int FindInFilesDialog::exec(TQString initialStr)
{
FindDialog::exec(initialStr);
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(isReplaceDialog()) {
ReplaceOptions options = replaceOpts();
options.inAllFiles = _inAllFiles->isChecked();
diff --git a/kbabel/catalogmanager/findinfilesdialog.h b/kbabel/catalogmanager/findinfilesdialog.h
index fd25f845..608e78e0 100644
--- a/kbabel/catalogmanager/findinfilesdialog.h
+++ b/kbabel/catalogmanager/findinfilesdialog.h
@@ -46,7 +46,7 @@ public:
* Constructor
* @param replaceDlg flag, if this is a replace dialog
*/
- FindInFilesDialog(bool replaceDlg, QWidget* parent);
+ FindInFilesDialog(bool replaceDlg, TQWidget* parent);
~FindInFilesDialog();
/**
@@ -56,7 +56,7 @@ public:
*
* @return the result code of the dialog
*/
- int show(QString initialStr);
+ int show(TQString initialStr);
/**
* executes the dialog as modal
@@ -65,7 +65,7 @@ public:
*
* @return the result code of the dialog
*/
- int exec(QString initialStr);
+ int exec(TQString initialStr);
void setFindOpts(KBabel::FindOptions options);
void setReplaceOpts(KBabel::ReplaceOptions options);
@@ -75,11 +75,11 @@ protected:
void saveSettings();
private:
- QCheckBox *_inAllFiles;
- QCheckBox *_inTemplates;
- QCheckBox *_inMarked;
- QCheckBox *_askForNextFile;
- QCheckBox *_askForSave;
+ TQCheckBox *_inAllFiles;
+ TQCheckBox *_inTemplates;
+ TQCheckBox *_inMarked;
+ TQCheckBox *_askForNextFile;
+ TQCheckBox *_askForSave;
};
#endif // FINDDIALOG_H
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
index af76d9d0..090b3de3 100644
--- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp
+++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
@@ -33,18 +33,18 @@
// Qt include files
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
-#include <qtextcodec.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
+#include <tqtextcodec.h>
// KDE include files
#include <kconfig.h>
#include <kdebug.h>
@@ -60,16 +60,16 @@
#include "cvsdialog.h"
-CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config )
+CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config )
: KDialog( parent, "CVSDIALOG", true ), m_config( config )
{
_cmd = cmd;
p=0L;
setCaption( i18n( "CVS Dialog" ) );
- QString temp;
+ TQString temp;
- QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
// Set the label's text depending on the CVS command.
switch ( cmd ) {
@@ -86,54 +86,54 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "Get diff for the following files:" );
break;
}
- layout->addWidget( new QLabel( temp, this ) );
+ layout->addWidget( new TQLabel( temp, this ) );
// Widget for showing the list of files.
- filebox = new QListBox( this );
+ filebox = new TQListBox( this );
layout->addWidget( filebox );
// Add special widgets for 'cvs commit'.
if ( cmd == CVS::Commit ) {
- QLabel * label;
+ TQLabel * label;
// Combobox for displaying old log messages.
- label = new QLabel( i18n( "&Old messages:" ), this );
- oldMessages = new QComboBox( this );
+ label = new TQLabel( i18n( "&Old messages:" ), this );
+ oldMessages = new TQComboBox( this );
oldMessages->setDuplicatesEnabled( false );
label->setBuddy( oldMessages );
layout->addWidget( label );
layout->addWidget( oldMessages );
// Textfield for entering a log message.
- label = new QLabel( i18n( "&Log message:" ), this );
- logedit = new QTextEdit( this );
+ label = new TQLabel( i18n( "&Log message:" ), this );
+ logedit = new TQTextEdit( this );
label->setBuddy( logedit );
layout->addWidget( label );
layout->addWidget( logedit );
- label = new QLabel( i18n( "E&ncoding:" ), this );
+ label = new TQLabel( i18n( "E&ncoding:" ), this );
m_encodingComboBox = new KComboBox( this );
label->setBuddy( m_encodingComboBox );
layout->addWidget( label );
layout->addWidget( m_encodingComboBox );
- QStringList encodingList;
+ TQStringList encodingList;
// The last encoding will be added at the top of the list, when the seetings will be read.
encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
- encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->mimeName() );
+ encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->mimeName() );
encodingList += KGlobal::charsets()->descriptiveEncodingNames();
m_encodingComboBox->insertStringList( encodingList );
- connect( oldMessages, SIGNAL( activated( int ) ),
- this, SLOT( slotComboActivated( int ) ) );
+ connect( oldMessages, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotComboActivated( int ) ) );
}
- QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
+ TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
// Add special buttons for 'cvs commit'.
if ( cmd == CVS::Commit ) {
- autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this );
+ autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this );
buttons->addWidget( autoAddBox );
}
- buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
// Set the main button's text depending on the CVS comand.
switch ( cmd ) {
@@ -150,33 +150,33 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "&Get Diff" );
break;
}
- mainBtn = new QPushButton( temp, this );
+ mainBtn = new TQPushButton( temp, this );
mainBtn->setDefault( true );
buttons->addWidget( mainBtn );
- cancelBtn = new QPushButton( i18n( "C&ancel" ), this );
+ cancelBtn = new TQPushButton( i18n( "C&ancel" ), this );
buttons->addWidget( cancelBtn );
layout->addLayout( buttons );
- QFrame * line = new QFrame( this );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame * line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addWidget( line );
- layout->addWidget( new QLabel( i18n( "Command output:" ), this ) );
+ layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) );
- output = new QTextEdit( this );
+ output = new TQTextEdit( this );
output->setReadOnly( true );
layout->addWidget( output );
- resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
+ resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
if ( cmd == CVS::Commit )
logedit->setFocus( );
readSettings( );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) );
- connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) );
}
void CVSDialog::slotComboActivated( int index )
@@ -197,17 +197,17 @@ void CVSDialog::accept( )
KDialog::accept( );
}
-void CVSDialog::setFiles( const QStringList& files )
+void CVSDialog::setFiles( const TQStringList& files )
{
filebox->insertStringList( files );
}
-void CVSDialog::setCommandLine( const QString& command )
+void CVSDialog::setCommandLine( const TQString& command )
{
_commandLine = command;
}
-void CVSDialog::setAddCommand( const QString& command )
+void CVSDialog::setAddCommand( const TQString& command )
{
_addCommand = command;
}
@@ -228,7 +228,7 @@ void CVSDialog::slotExecuteCommand( )
if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) )
_commandLine.prepend( _addCommand );
- const QString msg( logedit->text() );
+ const TQString msg( logedit->text() );
if ( msg.isEmpty() )
{
@@ -240,7 +240,7 @@ void CVSDialog::slotExecuteCommand( )
}
m_encoding = KGlobal::charsets()->encodingForName( m_encodingComboBox->currentText() );
- QTextCodec* codec = QTextCodec::codecForName( m_encoding.utf8() );
+ TQTextCodec* codec = TQTextCodec::codecForName( m_encoding.utf8() );
if ( !codec )
{
@@ -259,10 +259,10 @@ void CVSDialog::slotExecuteCommand( )
// Write the commit log message from the input field to a temporary file
m_tempFile = new KTempFile;
m_tempFile->setAutoDelete( true );
- QTextStream* stream = m_tempFile->textStream();
+ TQTextStream* stream = m_tempFile->textStream();
if ( !stream )
{
- kdError() << "Could not create QTextStream for file " << m_tempFile->name();
+ kdError() << "Could not create TQTextStream for file " << m_tempFile->name();
delete m_tempFile;
m_tempFile = 0;
KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") );
@@ -286,7 +286,7 @@ void CVSDialog::slotExecuteCommand( )
// Update the list of log messages
if ( !msg.isEmpty() ) {
- const QString shortLog = KStringHandler::csqueeze( msg, 80 );
+ const TQString shortLog = KStringHandler::csqueeze( msg, 80 );
// Remove the message from the list if it already exists
@@ -301,12 +301,12 @@ void CVSDialog::slotExecuteCommand( )
// Set the KProcess' command line.
*p << _commandLine;
- connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
output->append( i18n( "[ Starting command ]" ) );
@@ -325,22 +325,22 @@ void CVSDialog::slotExecuteCommand( )
void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len )
{
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
// Set the cursor's position at the end of the output.
output->setCursorPosition( output->lines( ), 0 );
// If the command is 'cvs status' or 'cvs diff' collect the output of stdout.
if ( (_cmd == CVS::Status) || (_cmd == CVS::Diff) )
- _statusOutput += QString::fromLocal8Bit( buffer, len );
+ _statusOutput += TQString::fromLocal8Bit( buffer, len );
}
void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len )
{
// If an error occurs while executing the command display stderr in
// another color.
- QColor oldColor( output->color( ) );
+ TQColor oldColor( output->color( ) );
output->setColor( Qt::red );
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
output->setColor( oldColor );
output->setCursorPosition( output->lines( ), 0 );
}
@@ -358,7 +358,7 @@ void CVSDialog::slotProcessExited( KProcess * p )
mainBtn->setText( i18n( "&Show Diff" ) );
else
mainBtn->setText( i18n( "&Close" ) );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) );
// Reenable the button and the log edit now that the process is finished.
mainBtn->setEnabled( true );
@@ -366,7 +366,7 @@ void CVSDialog::slotProcessExited( KProcess * p )
logedit->setEnabled( true );
}
-QString CVSDialog::statusOutput( )
+TQString CVSDialog::statusOutput( )
{
return _statusOutput;
}
@@ -383,14 +383,14 @@ void CVSDialog::readSettings( )
m_logMessages.clear();
m_squeezedLogMessages.clear();
for ( int cnt = 0; cnt < 10; cnt++ )
- if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) )
+ if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) )
{
- const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) );
+ const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) );
if ( !logMessage.isEmpty() )
{
// If the message is too long, cut it to 80 characters (or the combo box becomes too wide)
// ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry
- const QString shortLog = KStringHandler::csqueeze( logMessage );
+ const TQString shortLog = KStringHandler::csqueeze( logMessage );
m_logMessages.append( logMessage );
m_squeezedLogMessages.append( shortLog );
oldMessages->insertItem( shortLog );
@@ -411,9 +411,9 @@ void CVSDialog::saveSettings( )
// Write the log messages to the config file.
int cnt = 0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt )
- config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it );
+ config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it );
config->writeEntry( "CVSEncoding", m_encoding );
}
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.h b/kbabel/catalogmanager/libcvs/cvsdialog.h
index 658e9883..1ed312fe 100644
--- a/kbabel/catalogmanager/libcvs/cvsdialog.h
+++ b/kbabel/catalogmanager/libcvs/cvsdialog.h
@@ -72,30 +72,30 @@ class CVSDialog : public KDialog
* Constructor for creating the dialog.
* @param cmd The type of command to be executed.
*/
- CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config );
+ CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config );
~CVSDialog();
/**
* Set the list of files which will be used for the CVS command.
* @param files The list of files.
*/
- void setFiles( const QStringList& files );
+ void setFiles( const TQStringList& files );
/**
* Set the command line for the execution of the CVS command.
* @param command The command line.
*/
- void setCommandLine( const QString& command );
+ void setCommandLine( const TQString& command );
/**
* Set the command line for adding files to the CVS repository.
* This method is only used together with a 'cvs commit' for automatically
* adding files which are not yet in the repository.
* @param command The command line.
*/
- void setAddCommand( const QString& command );
+ void setAddCommand( const TQString& command );
/**
* Return the output of a 'cvs status' command.
* @returns The complete output.
*/
- QString statusOutput( );
+ TQString statusOutput( );
protected:
/**
@@ -123,30 +123,30 @@ class CVSDialog : public KDialog
private:
CVS::Command _cmd;
- QPushButton * mainBtn;
- QPushButton * cancelBtn;
- QListBox * filebox;
- QComboBox * oldMessages;
- QTextEdit * logedit;
- QTextEdit * output;
- QCheckBox * autoAddBox;
+ TQPushButton * mainBtn;
+ TQPushButton * cancelBtn;
+ TQListBox * filebox;
+ TQComboBox * oldMessages;
+ TQTextEdit * logedit;
+ TQTextEdit * output;
+ TQCheckBox * autoAddBox;
KProcess * p;
- QString _commandLine;
- QString _addCommand;
- QString _statusOutput;
+ TQString _commandLine;
+ TQString _addCommand;
+ TQString _statusOutput;
/// Log messages (long version)
- QStringList m_logMessages;
+ TQStringList m_logMessages;
/// Log messages (short version)
- QStringList m_squeezedLogMessages;
+ TQStringList m_squeezedLogMessages;
/// Temporary file (for commits)
KTempFile* m_tempFile;
/// Encoding for the commit log message
- QString m_encoding;
+ TQString m_encoding;
/// Combo box for the encoding
KComboBox* m_encodingComboBox;
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp
index d3f2ae18..66eeac0a 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.cpp
+++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp
@@ -37,12 +37,12 @@
#include <time.h>
#include <unistd.h>
// Qt include files
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kapplication.h>
#include <klocale.h>
@@ -52,17 +52,17 @@
#include "cvshandler.h"
-CVSHandler::CVSHandler( const QString& poBaseDir, const QString& potBaseDir )
+CVSHandler::CVSHandler( const TQString& poBaseDir, const TQString& potBaseDir )
{
setPOBaseDir( poBaseDir );
setPOTBaseDir( potBaseDir );
_autoUpdateTemplates = false;
}
-void CVSHandler::setPOBaseDir( const QString& dir )
+void CVSHandler::setPOBaseDir( const TQString& dir )
{
// check if 'CVS/Entries' exists in the PO base directory
- if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
_isPORepository = true;
_poBaseDir = dir;
} else
@@ -70,10 +70,10 @@ void CVSHandler::setPOBaseDir( const QString& dir )
emit signalIsPORepository( _isPORepository );
}
-void CVSHandler::setPOTBaseDir( const QString& dir )
+void CVSHandler::setPOTBaseDir( const TQString& dir )
{
// check if 'CVS/Entries' exists in the POT base directory
- if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
_isPOTRepository = true;
_potBaseDir = dir;
} else
@@ -81,7 +81,7 @@ void CVSHandler::setPOTBaseDir( const QString& dir )
emit signalIsPOTRepository( _isPOTRepository );
}
-QString CVSHandler::fileStatus( const FileStatus status ) const
+TQString CVSHandler::fileStatus( const FileStatus status ) const
{
switch ( status ) {
case NO_REPOSITORY:
@@ -111,29 +111,29 @@ QString CVSHandler::fileStatus( const FileStatus status ) const
}
}
-CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
+CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
{
// no valid repository
if ( !_isPORepository )
return NO_REPOSITORY;
- QString fn( filename );
- fn = fn.remove( QRegExp( "/$" ) );
+ TQString fn( filename );
+ fn = fn.remove( TQRegExp( "/$" ) );
- QFileInfo info( fn );
+ TQFileInfo info( fn );
// check if 'CVS/Entries' exists and can be read
- QFile entries( info.dir( true ).path( ) + "/CVS/Entries" );
+ TQFile entries( info.dir( true ).path( ) + "/CVS/Entries" );
if ( !entries.open( IO_ReadOnly ) )
return NOT_IN_CVS; // we already know that it's a repository
// ### FIXME: it does not take care of CVS/Entries.Log
// a line in CVS/Entries has the following format:
// [D]/NAME/REVISION/[CONFLICT+]TIMESTAMP/OPTIONS/TAGDATE
- QRegExp rx( QString( "^D?/%1/" ).arg( info.fileName( ) ) );
+ TQRegExp rx( TQString( "^D?/%1/" ).arg( info.fileName( ) ) );
- QString temp;
- QTextStream stream( &entries );
+ TQString temp;
+ TQTextStream stream( &entries );
bool isInRepository = false;
while ( !stream.atEnd() ) {
@@ -149,11 +149,11 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
if ( !isInRepository )
return NOT_IN_CVS;
- const QStringList fields = QStringList::split( '/', temp, true );
+ const TQStringList fields = TQStringList::split( '/', temp, true );
// bool isDir = ( fields[0] == "D" );
- const QString cvsname( fields[1] );
- const QString revision( fields[2] );
- const QString timestamp( fields[3] );
+ const TQString cvsname( fields[1] );
+ const TQString revision( fields[2] );
+ const TQString timestamp( fields[3] );
// ignore the other fields for now
if ( revision == "0" && timestamp == "dummy timestamp" )
@@ -167,9 +167,9 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
// calculate the UTC time from the file's last modified date
struct stat st;
- lstat( QFile::encodeName(fn), &st );
+ lstat( TQFile::encodeName(fn), &st );
struct tm * tm_p = gmtime( &st.st_mtime );
- QString ftime = QString( asctime( tm_p ) );
+ TQString ftime = TQString( asctime( tm_p ) );
ftime.truncate( ftime.length( ) - 1 );
if ( ftime != timestamp )
return LOCALLY_MODIFIED;
@@ -177,12 +177,12 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
return UP_TO_DATE;
}
-QString CVSHandler::cvsStatus( const QString& filename ) const
+TQString CVSHandler::cvsStatus( const TQString& filename ) const
{
return map[filename];
}
-void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -191,16 +191,16 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
return;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.isDir( ) ) {
- execCVSCommand( parent, cmd, QStringList( filename ), templates, config );
+ execCVSCommand( parent, cmd, TQStringList( filename ), templates, config );
return;
}
- // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
// it's a dir
- QString command( "cd " + filename + " && cvs " );
+ TQString command( "cd " + filename + " && cvs " );
switch ( cmd ) {
case CVS::Update:
command += "update -dP";
@@ -208,7 +208,7 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
case CVS::Commit:
// The cvs client does not care about the encoding, so we cannot set anything here
command += "commit -F @LOG@FILE@";
- checkToAdd( QStringList( filename ) );
+ checkToAdd( TQStringList( filename ) );
break;
case CVS::Status:
command += "status";
@@ -218,10 +218,10 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
break;
}
- showDialog( parent, cmd, QStringList( filename ), command, config );
+ showDialog( parent, cmd, TQStringList( filename ), command, config );
}
-void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -230,9 +230,9 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
return;
}
- // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
- QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs ");
+ TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs ");
switch ( cmd ) {
case CVS::Update:
command += "update -dP";
@@ -249,15 +249,15 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
break;
}
- QRegExp rx;
+ TQRegExp rx;
if (templates)
rx.setPattern(_potBaseDir + "/?");
else
rx.setPattern(_poBaseDir + "/?");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
- QString temp = *it;
+ TQString temp = *it;
temp.remove(rx);
command += " \'" + temp + "\'";
}
@@ -270,7 +270,7 @@ void CVSHandler::setAutoUpdateTemplates( bool update )
_autoUpdateTemplates = update;
}
-void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config )
+void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
{
CVSDialog * dia = new CVSDialog( cmd, parent, config );
dia->setFiles( files );
@@ -293,30 +293,30 @@ void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringLis
emit signalFilesCommitted( files );
}
-void CVSHandler::checkToAdd( const QStringList& files )
+void CVSHandler::checkToAdd( const TQStringList& files )
{
if ( files.isEmpty( ) )
return;
- QStringList toBeAdded;
+ TQStringList toBeAdded;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
// check for every entry if it needs to be added
if ( fstatus( *it ) == NOT_IN_CVS ) {
- QFileInfo info( *it );
- QString temp; // will hold the dir path
+ TQFileInfo info( *it );
+ TQString temp; // will hold the dir path
if ( info.isDir( ) ) {
toBeAdded << *it;
temp = *it;
} else {
toBeAdded << *it;
- temp = QFileInfo( *it ).dirPath( true );
+ temp = TQFileInfo( *it ).dirPath( true );
}
// check recursivlely if parent dirs have to be added as well
while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
- temp = QFileInfo( temp ).dirPath( true );
+ temp = TQFileInfo( temp ).dirPath( true );
}
}
}
@@ -329,36 +329,36 @@ void CVSHandler::checkToAdd( const QStringList& files )
// create a command line for adding the files and dirs
for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) {
- QFileInfo info( *it );
+ TQFileInfo info( *it );
_addCommand += "cd " + info.dirPath( true ) + " && cvs add " + info.fileName( ) + "; ";
}
}
-void CVSHandler::processStatusOutput( const QString& status )
+void CVSHandler::processStatusOutput( const TQString& status )
{
if ( !_isPORepository )
return;
// at first we need to extract the name of the base directory on the server
- QFile f( _poBaseDir + "/CVS/Root" );
+ TQFile f( _poBaseDir + "/CVS/Root" );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
// extract the string after the last colon in the first line
- QString basedir = stream.readLine( ).section( ':', -1 );
+ TQString basedir = stream.readLine( ).section( ':', -1 );
f.close( );
// divide the complete status output in little chunks for every file
- QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status );
- QStringList::Iterator it;
+ TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status );
+ TQStringList::Iterator it;
for ( it = entries.begin( ); it != entries.end( ); ++it ) {
- QString entr = *it;
+ TQString entr = *it;
// translate the filename from repository to local
- QRegExp rx( basedir + ".*,v" );
+ TQRegExp rx( basedir + ".*,v" );
int pos = entr.find( rx );
- QString file = _poBaseDir + entr.mid( pos + basedir.length( ),
+ TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
entr = "<qt>" + entr + "</qt>";
@@ -369,16 +369,16 @@ void CVSHandler::processStatusOutput( const QString& status )
}
}
-void CVSHandler::processDiff( QString output )
+void CVSHandler::processDiff( TQString output )
{
- output.remove( QRegExp( "\\[ .* \\]$" ));
- output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
+ output.remove( TQRegExp( "\\[ .* \\]$" ));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
tmpFile.close();
- QString error;
+ TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error );
}
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.h b/kbabel/catalogmanager/libcvs/cvshandler.h
index 44777aa3..8157a895 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.h
+++ b/kbabel/catalogmanager/libcvs/cvshandler.h
@@ -36,8 +36,8 @@
#define CVSHANDLER_H
// Qt include files
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
// Project specific include files
#include "cvsdialog.h"
#include "cvsresources.h"
@@ -69,17 +69,17 @@ class CVSHandler : public QObject
UP_TO_DATE
};
- CVSHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null );
+ CVSHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null );
- void setPOBaseDir( const QString& dir );
- void setPOTBaseDir( const QString& dir );
+ void setPOBaseDir( const TQString& dir );
+ void setPOTBaseDir( const TQString& dir );
- FileStatus fstatus( const QString& filename ) const;
- QString fileStatus( const FileStatus status ) const;
- QString cvsStatus( const QString& filename ) const;
+ FileStatus fstatus( const TQString& filename ) const;
+ TQString fileStatus( const FileStatus status ) const;
+ TQString cvsStatus( const TQString& filename ) const;
- void execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config );
- void execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config );
+ void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config );
+ void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config );
void setAutoUpdateTemplates( bool update );
@@ -91,24 +91,24 @@ class CVSHandler : public QObject
signals:
void signalIsPORepository( bool );
void signalIsPOTRepository( bool );
- void signalFilesCommitted( const QStringList& );
+ void signalFilesCommitted( const TQStringList& );
private:
- void showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config );
- void checkToAdd( const QStringList& files );
- void processStatusOutput( const QString& status );
- void processDiff( QString output );
+ void showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config );
+ void checkToAdd( const TQStringList& files );
+ void processStatusOutput( const TQString& status );
+ void processDiff( TQString output );
private:
- QString _poBaseDir;
- QString _potBaseDir;
+ TQString _poBaseDir;
+ TQString _potBaseDir;
bool _isPORepository;
bool _isPOTRepository;
bool _autoUpdateTemplates;
- QString _addCommand;
+ TQString _addCommand;
/** Mapping the output of 'cvs status' against the filename. */
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
};
#endif // CVSHANDLER_H
diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp
index 69653591..a6f7d229 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.cpp
+++ b/kbabel/catalogmanager/libsvn/svndialog.cpp
@@ -33,17 +33,17 @@
// Qt include files
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
// KDE include files
#include <kconfig.h>
#include <kdebug.h>
@@ -57,16 +57,16 @@
#include "svndialog.h"
-SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config )
+SVNDialog::SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config )
: KDialog( parent, "SVN DIALOG", true ), m_tempFile( 0 ), m_config( config )
{
_cmd = cmd;
p=0L;
setCaption( i18n( "SVN Dialog" ) );
- QString temp;
+ TQString temp;
- QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
// Set the label's text depending on the SVN command.
switch ( cmd ) {
@@ -89,42 +89,42 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "Get information for the following files:" );
break;
}
- layout->addWidget( new QLabel( temp, this ) );
+ layout->addWidget( new TQLabel( temp, this ) );
// Widget for showing the list of files.
- filebox = new QListBox( this );
+ filebox = new TQListBox( this );
layout->addWidget( filebox );
// Add special widgets for 'svn commit'.
if ( cmd == SVN::Commit ) {
- QLabel * label;
+ TQLabel * label;
// Combobox for displaying old log messages.
- label = new QLabel( i18n( "&Old messages:" ), this );
- oldMessages = new QComboBox( this );
+ label = new TQLabel( i18n( "&Old messages:" ), this );
+ oldMessages = new TQComboBox( this );
oldMessages->setDuplicatesEnabled( false );
label->setBuddy( oldMessages );
layout->addWidget( label );
layout->addWidget( oldMessages );
// Textfield for entering a log message.
- label = new QLabel( i18n( "&Log message:" ), this );
- logedit = new QTextEdit( this );
+ label = new TQLabel( i18n( "&Log message:" ), this );
+ logedit = new TQTextEdit( this );
label->setBuddy( logedit );
layout->addWidget( label );
layout->addWidget( logedit );
- connect( oldMessages, SIGNAL( activated( int ) ),
- this, SLOT( slotComboActivated( int ) ) );
+ connect( oldMessages, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotComboActivated( int ) ) );
}
- QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
+ TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
// Add special buttons for 'svn commit'.
if ( cmd == SVN::Commit ) {
- autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this );
+ autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this );
buttons->addWidget( autoAddBox );
}
- buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
// Set the main button's text depending on the SVN comand.
switch ( cmd ) {
@@ -145,33 +145,33 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "&Get Information" );
break;
}
- mainBtn = new QPushButton( temp, this );
+ mainBtn = new TQPushButton( temp, this );
mainBtn->setDefault( true );
buttons->addWidget( mainBtn );
- cancelBtn = new QPushButton( i18n( "C&ancel" ), this );
+ cancelBtn = new TQPushButton( i18n( "C&ancel" ), this );
buttons->addWidget( cancelBtn );
layout->addLayout( buttons );
- QFrame * line = new QFrame( this );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame * line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addWidget( line );
- layout->addWidget( new QLabel( i18n( "Command output:" ), this ) );
+ layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) );
- output = new QTextEdit( this );
+ output = new TQTextEdit( this );
output->setReadOnly( true );
layout->addWidget( output );
- resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
+ resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
if ( cmd == SVN::Commit )
logedit->setFocus( );
readSettings( );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) );
- connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) );
}
void SVNDialog::slotComboActivated( int index )
@@ -193,17 +193,17 @@ void SVNDialog::accept( )
KDialog::accept( );
}
-void SVNDialog::setFiles( const QStringList& files )
+void SVNDialog::setFiles( const TQStringList& files )
{
filebox->insertStringList( files );
}
-void SVNDialog::setCommandLine( const QString& command )
+void SVNDialog::setCommandLine( const TQString& command )
{
_commandLine = command;
}
-void SVNDialog::setAddCommand( const QString& command )
+void SVNDialog::setAddCommand( const TQString& command )
{
_addCommand = command;
}
@@ -224,7 +224,7 @@ void SVNDialog::slotExecuteCommand( )
if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) )
_commandLine.prepend( _addCommand );
- const QString msg( logedit->text() );
+ const TQString msg( logedit->text() );
if ( msg.isEmpty() )
{
@@ -238,16 +238,16 @@ void SVNDialog::slotExecuteCommand( )
// Write the commit log message from the input field to a temporary file
m_tempFile = new KTempFile;
m_tempFile->setAutoDelete( true );
- QTextStream* stream = m_tempFile->textStream();
+ TQTextStream* stream = m_tempFile->textStream();
if ( !stream )
{
- kdError() << "Could not create QTextStream for file " << m_tempFile->name();
+ kdError() << "Could not create TQTextStream for file " << m_tempFile->name();
delete m_tempFile;
m_tempFile = 0;
KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") );
return;
}
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << msg;
m_tempFile->close();
@@ -265,7 +265,7 @@ void SVNDialog::slotExecuteCommand( )
// Update the list of log messages
if ( !msg.isEmpty() ) {
- const QString shortLog = KStringHandler::csqueeze( msg, 80 );
+ const TQString shortLog = KStringHandler::csqueeze( msg, 80 );
// Remove the message from the list if it already exists
@@ -280,12 +280,12 @@ void SVNDialog::slotExecuteCommand( )
// Set the KProcess' command line.
*p << _commandLine;
- connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
output->append( i18n( "[ Starting command ]" ) );
@@ -304,22 +304,22 @@ void SVNDialog::slotExecuteCommand( )
void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len )
{
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
// Set the cursor's position at the end of the output.
output->setCursorPosition( output->lines( ), 0 );
// If the command is 'svn status' or 'svn diff' collect the output of stdout.
if ( ( _cmd == SVN::StatusLocal ) || ( _cmd == SVN::StatusRemote ) || ( _cmd == SVN::Diff ) )
- _statusOutput += QString::fromLocal8Bit( buffer, len );
+ _statusOutput += TQString::fromLocal8Bit( buffer, len );
}
void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len )
{
// If an error occurs while executing the command display stderr in
// another color.
- QColor oldColor( output->color( ) );
+ TQColor oldColor( output->color( ) );
output->setColor( Qt::red );
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
output->setColor( oldColor );
output->setCursorPosition( output->lines( ), 0 );
}
@@ -337,7 +337,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
mainBtn->setText( i18n( "&Show Diff" ) );
else
mainBtn->setText( i18n( "&Close" ) );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) );
// Reenable the button and the log edit now that the process is finished.
mainBtn->setEnabled( true );
@@ -345,7 +345,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
logedit->setEnabled( true );
}
-QString SVNDialog::statusOutput( )
+TQString SVNDialog::statusOutput( )
{
return _statusOutput;
}
@@ -362,14 +362,14 @@ void SVNDialog::readSettings( )
m_logMessages.clear();
m_squeezedLogMessages.clear();
for ( int cnt = 0; cnt < 10; cnt++ )
- if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) )
+ if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) )
{
- const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) );
+ const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) );
if ( !logMessage.isEmpty() )
{
// If the message is too long, cut it to 80 characters (or the combo box becomes too wide)
// ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry
- const QString shortLog = KStringHandler::csqueeze( logMessage );
+ const TQString shortLog = KStringHandler::csqueeze( logMessage );
m_logMessages.append( logMessage );
m_squeezedLogMessages.append( shortLog );
oldMessages->insertItem( shortLog );
@@ -388,9 +388,9 @@ void SVNDialog::saveSettings( )
// Write the log messages to the config file.
int cnt = 0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt )
- config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it );
+ config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it );
}
m_config->sync();
}
diff --git a/kbabel/catalogmanager/libsvn/svndialog.h b/kbabel/catalogmanager/libsvn/svndialog.h
index 0c824fa8..23ec6a7e 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.h
+++ b/kbabel/catalogmanager/libsvn/svndialog.h
@@ -71,30 +71,30 @@ class SVNDialog : public KDialog
* Constructor for creating the dialog.
* @param cmd The type of command to be executed.
*/
- SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config );
+ SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config );
~SVNDialog();
/**
* Set the list of files which will be used for the SVN command.
* @param files The list of files.
*/
- void setFiles( const QStringList& files );
+ void setFiles( const TQStringList& files );
/**
* Set the command line for the execution of the SVN command.
* @param command The command line.
*/
- void setCommandLine( const QString& command );
+ void setCommandLine( const TQString& command );
/**
* Set the command line for adding files to the SVN repository.
* This method is only used together with a 'svn commit' for automatically
* adding files which are not yet in the repository.
* @param command The command line.
*/
- void setAddCommand( const QString& command );
+ void setAddCommand( const TQString& command );
/**
* Return the output of a 'svn status' command.
* @returns The complete output.
*/
- QString statusOutput( );
+ TQString statusOutput( );
protected:
/**
@@ -122,24 +122,24 @@ class SVNDialog : public KDialog
private:
SVN::Command _cmd;
- QPushButton * mainBtn;
- QPushButton * cancelBtn;
- QListBox * filebox;
- QComboBox * oldMessages;
- QTextEdit * logedit;
- QTextEdit * output;
- QCheckBox * autoAddBox;
+ TQPushButton * mainBtn;
+ TQPushButton * cancelBtn;
+ TQListBox * filebox;
+ TQComboBox * oldMessages;
+ TQTextEdit * logedit;
+ TQTextEdit * output;
+ TQCheckBox * autoAddBox;
KProcess * p;
- QString _commandLine;
- QString _addCommand;
- QString _statusOutput;
+ TQString _commandLine;
+ TQString _addCommand;
+ TQString _statusOutput;
/// Log messages (long version)
- QStringList m_logMessages;
+ TQStringList m_logMessages;
/// Log messages (short version)
- QStringList m_squeezedLogMessages;
+ TQStringList m_squeezedLogMessages;
/// Temporary file (for commits)
KTempFile* m_tempFile;
diff --git a/kbabel/catalogmanager/libsvn/svnhandler.cpp b/kbabel/catalogmanager/libsvn/svnhandler.cpp
index 8117fe62..1ac98f66 100644
--- a/kbabel/catalogmanager/libsvn/svnhandler.cpp
+++ b/kbabel/catalogmanager/libsvn/svnhandler.cpp
@@ -37,13 +37,13 @@
#include <sys/stat.h>
#include <time.h>
// Qt include files
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
// KDE include files
#include <kapplication.h>
#include <klocale.h>
@@ -54,17 +54,17 @@
// project specific include files
#include "svnhandler.h"
-SVNHandler::SVNHandler( const QString& poBaseDir, const QString& potBaseDir )
+SVNHandler::SVNHandler( const TQString& poBaseDir, const TQString& potBaseDir )
{
setPOBaseDir( poBaseDir );
setPOTBaseDir( potBaseDir );
_autoUpdateTemplates = false;
}
-void SVNHandler::setPOBaseDir( const QString& dir )
+void SVNHandler::setPOBaseDir( const TQString& dir )
{
// check if '.svn/entries' exists in the PO base directory
- if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) {
_isPORepository = true;
_poBaseDir = dir;
} else
@@ -72,10 +72,10 @@ void SVNHandler::setPOBaseDir( const QString& dir )
emit signalIsPORepository( _isPORepository );
}
-void SVNHandler::setPOTBaseDir( const QString& dir )
+void SVNHandler::setPOTBaseDir( const TQString& dir )
{
// check if '.svn/entries' exists in the POT base directory
- if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) {
_isPOTRepository = true;
_potBaseDir = dir;
} else
@@ -83,7 +83,7 @@ void SVNHandler::setPOTBaseDir( const QString& dir )
emit signalIsPOTRepository( _isPOTRepository );
}
-QString SVNHandler::fileStatus( const FileStatus status ) const
+TQString SVNHandler::fileStatus( const FileStatus status ) const
{
switch ( status ) {
case NO_REPOSITORY:
@@ -115,19 +115,19 @@ QString SVNHandler::fileStatus( const FileStatus status ) const
}
}
-SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const
+SVNHandler::FileStatus SVNHandler::fstatus( const TQString& filename ) const
{
// no valid repository
if ( !_isPORepository )
return NO_REPOSITORY;
- QString fn( filename );
- fn = fn.remove( QRegExp( "/$" ) );
+ TQString fn( filename );
+ fn = fn.remove( TQRegExp( "/$" ) );
- QFileInfo info( fn );
+ TQFileInfo info( fn );
// check if '.svn/entries' exists.
- QFile entries( info.dir( true ).path( ) + "/.svn/entries" );
+ TQFile entries( info.dir( true ).path( ) + "/.svn/entries" );
if ( !entries.exists() )
return NOT_IN_SVN;
@@ -140,12 +140,12 @@ SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const
if( !proc.start( KProcess::Block, KProcess::Stdout ) )
return ERROR_IN_WC;
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorLine, errorCol;
- QDomNodeList nodelist;
- QDomNode node;
- QDomElement entry, wcStatus;
+ TQDomNodeList nodelist;
+ TQDomNode node;
+ TQDomElement entry, wcStatus;
// Parse the output.
if ( !doc.setContent( out.getOutput(), &errorMsg, &errorLine, &errorCol ) ) {
@@ -211,11 +211,11 @@ no_status_xml:
}
entries.close();
- QDomElement element;
+ TQDomElement element;
// File name that we are searching
- const QString findName = info.fileName();
+ const TQString findName = info.fileName();
// The entries are <entry> elements, so we have to check them
- QDomNode child = doc.documentElement().firstChild();
+ TQDomNode child = doc.documentElement().firstChild();
for ( ; !child.isNull() ; child = child.nextSibling() )
{
if ( !child.isElement() )
@@ -226,7 +226,7 @@ no_status_xml:
// Should not happend with svn 1.1.x
continue;
}
- const QString name = element.attribute("name");
+ const TQString name = element.attribute("name");
if ( name == findName )
break;
}
@@ -239,7 +239,7 @@ no_status_xml:
// ### TODO: should we check the attribute kind to be file and not dir?
// ### TODO: what do copy and move add here?
- const QString onSchedule = element.attribute( "schedule" );
+ const TQString onSchedule = element.attribute( "schedule" );
if ( onSchedule == "delete" )
return LOCALLY_REMOVED;
else if ( onSchedule == "added" )
@@ -250,15 +250,15 @@ no_status_xml:
}
// Note: we do not check the property time stamp
- const QString textTimeStamp( element.attribute( "text-time" ) );
+ const TQString textTimeStamp( element.attribute( "text-time" ) );
// calculate the UTC time from the file's last modified date
struct stat st;
- lstat( QFile::encodeName(fn), &st );
+ lstat( TQFile::encodeName(fn), &st );
struct tm * tm_p = gmtime( &st.st_mtime );
const int year = tm_p->tm_year + 1900;
const int month = tm_p->tm_mon + 1;
- QString fileTime;
+ TQString fileTime;
fileTime.sprintf( "%04i-%02i-%02iT%02i:%02i:%02i.000000Z",
year, month, tm_p->tm_mday, tm_p->tm_hour, tm_p->tm_min, tm_p->tm_sec );
//kdDebug() << "File: " << filename << " SVN time: " << textTimeStamp << " File time: " << fileTime << endl;
@@ -269,19 +269,19 @@ no_status_xml:
}
-QString SVNHandler::svnStatus( const QString& filename ) const
+TQString SVNHandler::svnStatus( const TQString& filename ) const
{
return map[filename];
}
-void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config)
+void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config)
{
// Unlike cvs, svn works also from outside the repository(as long as the path is in a repository of course!)
// ### FIXME: wrong, svn commit cannot work if the current directory is not a SVN one
- execSVNCommand( parent, cmd, QStringList( filename ), templates, config );
+ execSVNCommand( parent, cmd, TQStringList( filename ), templates, config );
}
-void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config )
+void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -290,9 +290,9 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin
return;
}
- // ### TODO: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### TODO: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### TODO: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
- QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn ");
+ TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn ");
switch ( cmd ) {
case SVN::Update:
command += "update --non-interactive";
@@ -315,15 +315,15 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin
command += "info"; // Does not allow --non-interactive (at least svn 1.1.4).
}
- QRegExp rx;
+ TQRegExp rx;
if (templates)
rx.setPattern(_potBaseDir + "/?");
else
rx.setPattern(_poBaseDir + "/?");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
- QString temp = *it;
+ TQString temp = *it;
temp.remove(rx);
command += " \'" + temp + "\'";
}
@@ -336,7 +336,7 @@ void SVNHandler::setAutoUpdateTemplates( bool update )
_autoUpdateTemplates = update;
}
-void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config )
+void SVNHandler::showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
{
SVNDialog * dia = new SVNDialog( cmd, parent, config );
dia->setFiles( files );
@@ -359,7 +359,7 @@ void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringLis
emit signalFilesCommitted( files );
}
-bool SVNHandler::isInSvn( const QString& path )
+bool SVNHandler::isInSvn( const TQString& path )
{
if ( path.isEmpty() )
return false;
@@ -375,57 +375,57 @@ bool SVNHandler::isInSvn( const QString& path )
* - for a file: check if there is a corresponding file in .svn/text-base/
*/
- const QFileInfo info( path );
+ const TQFileInfo info( path );
if ( info.isDir() ) {
// It is a directory, so find a .svn/entries file
- QDir dir( path );
+ TQDir dir( path );
return dir.exists( ".svn/entries", true );
}
else {
// It is a file, so find the corresponding file in .svn/text-base
- QDir dir( info.dirPath() );
+ TQDir dir( info.dirPath() );
if ( ! dir.cd( ".svn/text-base" ) ) {
// There is not even a .svn/text-base directory, so the file is not under control
return false;
}
- const QString textBaseFilename( info.fileName() + ".svn-base" );
+ const TQString textBaseFilename( info.fileName() + ".svn-base" );
return dir.exists( textBaseFilename, true );
}
}
-void SVNHandler::checkToAdd( const QStringList& files )
+void SVNHandler::checkToAdd( const TQStringList& files )
{
if ( files.isEmpty( ) )
return;
- QStringList toBeAdded;
+ TQStringList toBeAdded;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
// check for every entry if it needs to be added
if ( ! isInSvn( *it ) ) {
- QFileInfo info( *it );
- QString temp; // will hold the dir path
+ TQFileInfo info( *it );
+ TQString temp; // will hold the dir path
if ( info.isDir( ) ) {
toBeAdded << *it;
temp = *it;
} else {
toBeAdded << *it;
- temp = QFileInfo( *it ).dirPath( true );
+ temp = TQFileInfo( *it ).dirPath( true );
}
// ### TODO: does SVN really needs this or does it do it automatically?
// check recursivlely if parent dirs have to be added as well
while ( ! isInSvn( temp ) && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
- temp = QFileInfo( temp ).dirPath( true );
+ temp = TQFileInfo( temp ).dirPath( true );
}
}
}
// remove an old command
- _addCommand = QString();
+ _addCommand = TQString();
// ### TODO: does SVN really need this?
// make sure the directories are added before the files
@@ -434,38 +434,38 @@ void SVNHandler::checkToAdd( const QStringList& files )
// ### TODO: try to make this better
// create a command line for adding the files and dirs
for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) {
- QFileInfo info( *it );
+ TQFileInfo info( *it );
_addCommand += "cd " + info.dirPath( true ) + " && svn add " + info.fileName( ) + "; ";
}
}
// ### TODO: convert to SVN
-void SVNHandler::processStatusOutput( const QString& status )
+void SVNHandler::processStatusOutput( const TQString& status )
{
if ( !_isPORepository )
return;
#if 0
// at first we need to extract the name of the base directory on the server
- QFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME
+ TQFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
// extract the string after the last colon in the first line
- QString basedir = stream.readLine( ).section( ':', -1 );
+ TQString basedir = stream.readLine( ).section( ':', -1 );
f.close( );
// divide the complete status output in little chunks for every file
- QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status );
- QStringList::Iterator it;
+ TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status );
+ TQStringList::Iterator it;
for ( it = entries.begin( ); it != entries.end( ); ++it ) {
- QString entr = *it;
+ TQString entr = *it;
// translate the filename from repository to local
- QRegExp rx( basedir + ".*,v" );
+ TQRegExp rx( basedir + ".*,v" );
int pos = entr.find( rx );
- QString file = _poBaseDir + entr.mid( pos + basedir.length( ),
+ TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
entr = "<qt>" + entr + "</qt>";
@@ -477,16 +477,16 @@ void SVNHandler::processStatusOutput( const QString& status )
#endif
}
-void SVNHandler::processDiff( QString output )
+void SVNHandler::processDiff( TQString output )
{
- output.remove( QRegExp( "\\[ .* \\]$" ));
- output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
+ output.remove( TQRegExp( "\\[ .* \\]$" ));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
tmpFile.close();
- QString error;
+ TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error );
}
@@ -516,10 +516,10 @@ void SVNOutputCollector::setProcess( KProcess* p )
m_process = p;
if( p ) {
- connect( p, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotGatherStdout(KProcess*, char*, int)) );
- connect( p, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotGatherStderr(KProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) );
}
m_gatheredOutput.truncate( 0 );
@@ -529,14 +529,14 @@ void SVNOutputCollector::setProcess( KProcess* p )
void SVNOutputCollector::slotGatherStderr( KProcess*, char* data, int len )
{
- m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) );
- m_stderrOutput.append( QString::fromLocal8Bit( data, len ) );
+ m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
+ m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) );
}
void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len )
{
- m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) );
- m_stdoutOutput.append( QString::fromLocal8Bit( data, len ) );
+ m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
+ m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) );
}
#include "svnhandler.moc"
diff --git a/kbabel/catalogmanager/libsvn/svnhandler.h b/kbabel/catalogmanager/libsvn/svnhandler.h
index 67c86d73..4933cb92 100644
--- a/kbabel/catalogmanager/libsvn/svnhandler.h
+++ b/kbabel/catalogmanager/libsvn/svnhandler.h
@@ -36,8 +36,8 @@
#define SVNHANDLER_H
// Qt include files
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
// Project specific include files
#include "svndialog.h"
#include "svnresources.h"
@@ -68,17 +68,17 @@ class SVNHandler : public QObject
ERROR_IN_WC ///< The working copy has data that cannot be handled
};
- SVNHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null );
+ SVNHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null );
- void setPOBaseDir( const QString& dir );
- void setPOTBaseDir( const QString& dir );
+ void setPOBaseDir( const TQString& dir );
+ void setPOTBaseDir( const TQString& dir );
- FileStatus fstatus( const QString& filename ) const;
- QString fileStatus( const FileStatus status ) const;
- QString svnStatus( const QString& filename ) const;
+ FileStatus fstatus( const TQString& filename ) const;
+ TQString fileStatus( const FileStatus status ) const;
+ TQString svnStatus( const TQString& filename ) const;
- void execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config );
- void execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config );
+ void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config );
+ void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config );
void setAutoUpdateTemplates( bool update );
@@ -90,26 +90,26 @@ class SVNHandler : public QObject
signals:
void signalIsPORepository( bool );
void signalIsPOTRepository( bool );
- void signalFilesCommitted( const QStringList& );
+ void signalFilesCommitted( const TQStringList& );
private:
- void showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config );
+ void showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config );
/// Check quickly if the file is part of a SVN repository
- bool isInSvn( const QString& path );
- void checkToAdd( const QStringList& files );
- void processStatusOutput( const QString& status );
- void processDiff( QString output );
+ bool isInSvn( const TQString& path );
+ void checkToAdd( const TQStringList& files );
+ void processStatusOutput( const TQString& status );
+ void processDiff( TQString output );
private:
- QString _poBaseDir;
- QString _potBaseDir;
+ TQString _poBaseDir;
+ TQString _potBaseDir;
bool _isPORepository;
bool _isPOTRepository;
bool _autoUpdateTemplates;
- QString _addCommand;
+ TQString _addCommand;
/** Mapping the output of 'svn status' against the filename. */
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
};
class SVNOutputCollector: public QObject
@@ -120,18 +120,18 @@ class SVNOutputCollector: public QObject
SVNOutputCollector( KProcess* );
void setProcess( KProcess* );
- const QString& getOutput() const { return m_gatheredOutput; }
- const QString& getStderr() const { return m_stderrOutput; }
- const QString& getStdout() const { return m_stdoutOutput; }
+ const TQString& getOutput() const { return m_gatheredOutput; }
+ const TQString& getStderr() const { return m_stderrOutput; }
+ const TQString& getStdout() const { return m_stdoutOutput; }
private slots:
void slotGatherStderr( KProcess*, char*, int );
void slotGatherStdout( KProcess*, char*, int );
private:
- QString m_gatheredOutput;
- QString m_stderrOutput;
- QString m_stdoutOutput;
+ TQString m_gatheredOutput;
+ TQString m_stderrOutput;
+ TQString m_stdoutOutput;
KProcess* m_process;
};
diff --git a/kbabel/catalogmanager/main.cpp b/kbabel/catalogmanager/main.cpp
index 868df92a..706ad67f 100644
--- a/kbabel/catalogmanager/main.cpp
+++ b/kbabel/catalogmanager/main.cpp
@@ -53,10 +53,10 @@
#include <kwin.h>
#include <kmainwindow.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
CatalogManager *CatalogManagerApp::_view = 0;
@@ -84,15 +84,15 @@ void CatalogManagerApp::setPreferredWindow(WId id)
}
}
-void CatalogManagerApp::updatedFile(QCString url)
+void CatalogManagerApp::updatedFile(TQCString url)
{
if( _view )
_view->updateFile(url);
}
-QCString CatalogManagerApp::findNextFile()
+TQCString CatalogManagerApp::findNextFile()
{
- QString reply = "";
+ TQString reply = "";
if( !CatalogManager::_foundFilesList.isEmpty() )
{
reply = CatalogManager::_foundFilesList.first();
@@ -101,9 +101,9 @@ QCString CatalogManagerApp::findNextFile()
} else
{
if( !CatalogManager::_toBeSearched.isEmpty() )
- reply = QString(""); // nothing found yet
+ reply = TQString(""); // nothing found yet
else
- return QCString(); // not found definitely
+ return TQCString(); // not found definitely
}
return reply.utf8();
@@ -128,11 +128,11 @@ int CatalogManagerApp::newInstance()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString configfile = args->getOption("project");
+ TQString configfile = args->getOption("project");
if( !configfile.isEmpty() )
{
- QFileInfo fi( configfile );
+ TQFileInfo fi( configfile );
configfile = fi.absFilePath();
}
else
@@ -163,12 +163,12 @@ void CatalogManagerInterface::setPreferredWindow( WId id )
CatalogManagerApp::setPreferredWindow(id);
}
-QCString CatalogManagerInterface::findNextFile()
+TQCString CatalogManagerInterface::findNextFile()
{
return CatalogManagerApp::findNextFile();
}
-void CatalogManagerInterface::updatedFile( QCString url )
+void CatalogManagerInterface::updatedFile( TQCString url )
{
CatalogManagerApp::updatedFile(url);
}
diff --git a/kbabel/catalogmanager/markpatterndialog.cpp b/kbabel/catalogmanager/markpatterndialog.cpp
index efe893a2..f56a735b 100644
--- a/kbabel/catalogmanager/markpatterndialog.cpp
+++ b/kbabel/catalogmanager/markpatterndialog.cpp
@@ -31,10 +31,10 @@
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#include <kcombobox.h>
#include <kcompletion.h>
@@ -47,21 +47,21 @@
#include "markpatterndialog.h"
#include "markpatternwidget.h"
-MarkPatternDialog::MarkPatternDialog(QWidget * parent, const char * name)
+MarkPatternDialog::MarkPatternDialog(TQWidget * parent, const char * name)
: KDialogBase(parent, name, true, 0, Ok|Cancel, Ok)
{
actionButton(Ok)->setEnabled(false);
mainWidget = new MarkPatternWidget(this);
- connect (mainWidget->combo, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotComboTextChanged(const QString&)));
+ connect (mainWidget->combo, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotComboTextChanged(const TQString&)));
comboCompletion = mainWidget->combo->completionObject( );
regexpEditDialog = 0;
if (!KTrader::self( )->query("KRegExpEditor/KRegExpEditor").isEmpty( )) {
- connect(mainWidget->regexpButton, SIGNAL(clicked( )), this, SLOT(slotRegexpButtonClicked( )));
+ connect(mainWidget->regexpButton, TQT_SIGNAL(clicked( )), this, TQT_SLOT(slotRegexpButtonClicked( )));
} else {
disconnect(mainWidget->useRegExp, 0, mainWidget->regexpButton, 0);
delete mainWidget->regexpButton;
@@ -87,7 +87,7 @@ void MarkPatternDialog::accept( )
KDialogBase::accept( );
}
-QString MarkPatternDialog::pattern( )
+TQString MarkPatternDialog::pattern( )
{
return mainWidget->combo->currentText( );
}
@@ -118,7 +118,7 @@ void MarkPatternDialog::setMode(bool markMode)
}
}
-void MarkPatternDialog::slotComboTextChanged(const QString& text)
+void MarkPatternDialog::slotComboTextChanged(const TQString& text)
{
actionButton(Ok)->setEnabled(!text.isEmpty( ));
}
@@ -126,14 +126,14 @@ void MarkPatternDialog::slotComboTextChanged(const QString& text)
void MarkPatternDialog::slotRegexpButtonClicked( )
{
if (!regexpEditDialog)
- regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>(
- "KRegExpEditor/KRegExpEditor", QString::null, this);
+ regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>(
+ "KRegExpEditor/KRegExpEditor", TQString::null, this);
KRegExpEditorInterface * iface = dynamic_cast<KRegExpEditorInterface *>(regexpEditDialog);
if (iface) {
iface->setRegExp(mainWidget->combo->currentText( ));
- if (regexpEditDialog->exec( ) == QDialog::Accepted)
+ if (regexpEditDialog->exec( ) == TQDialog::Accepted)
mainWidget->combo->setCurrentText(iface->regExp( ));
}
}
diff --git a/kbabel/catalogmanager/markpatterndialog.h b/kbabel/catalogmanager/markpatterndialog.h
index c8ec1218..de919130 100644
--- a/kbabel/catalogmanager/markpatterndialog.h
+++ b/kbabel/catalogmanager/markpatterndialog.h
@@ -45,9 +45,9 @@ class MarkPatternDialog : public KDialogBase
Q_OBJECT
public:
- MarkPatternDialog(QWidget * parent, const char * name = 0);
+ MarkPatternDialog(TQWidget * parent, const char * name = 0);
- QString pattern( );
+ TQString pattern( );
bool isCaseSensitive( );
bool useRegExp( );
bool includeTemplates( );
@@ -60,14 +60,14 @@ class MarkPatternDialog : public KDialogBase
void saveSettings( );
protected slots:
- void slotComboTextChanged(const QString& text);
+ void slotComboTextChanged(const TQString& text);
void slotRegexpButtonClicked( );
private:
MarkPatternWidget * mainWidget;
- QDialog * regexpEditDialog;
+ TQDialog * regexpEditDialog;
- QStringList patternList;
+ TQStringList patternList;
KCompletion * comboCompletion;
};
diff --git a/kbabel/catalogmanager/multiroughtransdlg.cpp b/kbabel/catalogmanager/multiroughtransdlg.cpp
index 874b9c3e..248ac55a 100644
--- a/kbabel/catalogmanager/multiroughtransdlg.cpp
+++ b/kbabel/catalogmanager/multiroughtransdlg.cpp
@@ -35,8 +35,8 @@
#include "catmanlistitem.h"
#include "multiroughtransdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -47,18 +47,18 @@
using namespace KBabel;
-MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, QPtrList<CatManListItem> files
- , QWidget *parent,const char *name)
+MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, TQPtrList<CatManListItem> files
+ , TQWidget *parent,const char *name)
: RoughTransDlg(dict, new Catalog(), parent, name )
,_fileList(files)
{
- QWidget* bars = static_cast<QWidget*>(progressbar->parent());
- QLabel* label = new QLabel( i18n("Files:"), bars );
+ TQWidget* bars = static_cast<TQWidget*>(progressbar->parent());
+ TQLabel* label = new TQLabel( i18n("Files:"), bars );
filesProgressbar = new KProgress(bars,"files progressbar");
filesProgressbar->setTextEnabled(true);
filesProgressbar->setFormat("%v/%m (%p%)");
filesProgressbar->setTotalSteps(files.count());
- QHBoxLayout* mylayout= new QHBoxLayout(bars->layout());
+ TQHBoxLayout* mylayout= new TQHBoxLayout(bars->layout());
mylayout->add(label);
mylayout->add(filesProgressbar);
@@ -126,7 +126,7 @@ void MultiRoughTransDlg::showAllStatistics()
int nothing=tt-ptc-etc;
KLocale *locale = KGlobal::locale();
- QString statMsg = i18n("Result of the translation:\n"
+ TQString statMsg = i18n("Result of the translation:\n"
"Edited entries: %1\n"
"Exact translations: %2 (%3%)\n"
"Approximate translations: %4 (%5%)\n"
diff --git a/kbabel/catalogmanager/multiroughtransdlg.h b/kbabel/catalogmanager/multiroughtransdlg.h
index 8bda58e2..cdc4d1ed 100644
--- a/kbabel/catalogmanager/multiroughtransdlg.h
+++ b/kbabel/catalogmanager/multiroughtransdlg.h
@@ -42,7 +42,7 @@ class MultiRoughTransDlg : public RoughTransDlg
Q_OBJECT
public:
- MultiRoughTransDlg(KBabelDictBox* dictBox, QPtrList<CatManListItem> list, QWidget *parent
+ MultiRoughTransDlg(KBabelDictBox* dictBox, TQPtrList<CatManListItem> list, TQWidget *parent
, const char *name=0);
protected slots:
@@ -56,7 +56,7 @@ protected slots:
private:
- QPtrList<CatManListItem> _fileList;
+ TQPtrList<CatManListItem> _fileList;
KProgress *filesProgressbar;
};
diff --git a/kbabel/catalogmanager/validateprogress.cpp b/kbabel/catalogmanager/validateprogress.cpp
index 9075f24e..b8c563a8 100644
--- a/kbabel/catalogmanager/validateprogress.cpp
+++ b/kbabel/catalogmanager/validateprogress.cpp
@@ -43,8 +43,8 @@
#include <kprogress.h>
#include <ksqueezedtextlabel.h>
-#include <qlistbox.h>
-#include <qtimer.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
#define ID_ERROR_OPEN 1
#define ID_ERROR_IGNORE 2
@@ -52,7 +52,7 @@
// version identification for validation ignores
#define IGNOREFILE_VERSION 0x00
-ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget *parent,const char *name)
+ValidateProgressDialog::ValidateProgressDialog(const TQString& ignoreURL, TQWidget *parent,const char *name)
: KDialogBase(parent,name,true,i18n("Caption of dialog","Validation")
, Close, Close)
, _ignoreURL(ignoreURL), _tool(0), _stopped(false)
@@ -61,7 +61,7 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget
{
_mainWidget = new ValidateProgressWidget(this);
setMainWidget(_mainWidget);
- setInitialSize( QSize(400, 300) );
+ setInitialSize( TQSize(400, 300) );
_errors.clear();
_ignores.clear();
@@ -72,12 +72,12 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget
_errorMenu->insertItem(i18n("&Open"),ID_ERROR_OPEN);
_errorMenu->insertItem(i18n("&Ignore"),ID_ERROR_IGNORE);
- connect( this, SIGNAL(closeClicked()), this, SLOT(stop()));
- connect( _mainWidget->_errorList, SIGNAL( doubleClicked(QListBoxItem *)),
- this, SLOT( errorItemDoubleClicked(QListBoxItem *)));
+ connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(stop()));
+ connect( _mainWidget->_errorList, TQT_SIGNAL( doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT( errorItemDoubleClicked(TQListBoxItem *)));
- connect( _mainWidget->_errorList, SIGNAL( contextMenuRequested(QListBoxItem *, const QPoint &)),
- this, SLOT( showContextMenu(QListBoxItem *, const QPoint &)));
+ connect( _mainWidget->_errorList, TQT_SIGNAL( contextMenuRequested(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT( showContextMenu(TQListBoxItem *, const TQPoint &)));
}
ValidateProgressDialog::~ValidateProgressDialog()
@@ -85,7 +85,7 @@ ValidateProgressDialog::~ValidateProgressDialog()
writeIgnores();
}
-void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList<CatManListItem> files )
+void ValidateProgressDialog::validate( const KDataToolInfo &tool, const TQPtrList<CatManListItem> files )
{
if( files.isEmpty() ) return;
@@ -111,7 +111,7 @@ void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList
_stopped = false;
- QTimer::singleShot( 0, this, SLOT(validate_internal()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(validate_internal()) );
exec();
@@ -139,13 +139,13 @@ void ValidateProgressDialog::validate_internal()
if( it->hasErrors() )
{
- QValueList<IgnoreItem> err = it->errors();
+ TQValueList<IgnoreItem> err = it->errors();
- for( QValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit )
+ for( TQValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit )
{
IgnoreItem item = (*errit);
- QValueList<IgnoreItem>::Iterator ig;
+ TQValueList<IgnoreItem>::Iterator ig;
for( ig = _ignores.begin() ; ig != _ignores.end() ; ++ig )
{
if( (*ig).validationTool == _toolID &&
@@ -167,7 +167,7 @@ void ValidateProgressDialog::validate_internal()
noHeader = false;
}
- QString errortext=QString::number(item.index+1)+": " + item.msgid.first().left(50);
+ TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50);
errortext.replace("\n"," ");
if( item.msgid.first().length() > 50 ) errortext+="...";
_mainWidget->_errorList->insertItem( errortext);
@@ -200,9 +200,9 @@ void ValidateProgressDialog::stop()
_stopped = true;
}
-void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
+void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item)
{
- QString it = item->text();
+ TQString it = item->text();
bool ok =false;
int offset = it.find(":");
@@ -215,7 +215,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
if( !ok ) num = 0;
}
- QListBoxItem* package=item;
+ TQListBoxItem* package=item;
while( package && !package->text().startsWith("/") ) package=package->prev();
@@ -228,7 +228,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
emit errorDoubleClicked(package->text(), num-1 );
}
-void ValidateProgressDialog::showContextMenu(QListBoxItem * item, const QPoint & pos)
+void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint & pos)
{
// disable ignore for whole package
_errorMenu->setItemEnabled(ID_ERROR_IGNORE, item->pixmap()==0 );
@@ -255,10 +255,10 @@ void ValidateProgressDialog::readIgnores()
{
IgnoreItem item;
- QFile ignoreFile( _ignoreURL );
+ TQFile ignoreFile( _ignoreURL );
if( ignoreFile.open( IO_ReadOnly ) ) {
- QDataStream s( &ignoreFile );
- QString url;
+ TQDataStream s( &ignoreFile );
+ TQString url;
int version;
s >> version;
@@ -277,15 +277,15 @@ void ValidateProgressDialog::readIgnores()
void ValidateProgressDialog::writeIgnores()
{
- QFile ignoreFile( _ignoreURL );
+ TQFile ignoreFile( _ignoreURL );
if( ignoreFile.open( IO_WriteOnly ) ) {
- QDataStream s( &ignoreFile );
- QString url;
+ TQDataStream s( &ignoreFile );
+ TQString url;
int version = IGNOREFILE_VERSION;
s << version;
- for( QValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it)
+ for( TQValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it)
{
s << (*it);
}
@@ -293,7 +293,7 @@ void ValidateProgressDialog::writeIgnores()
}
}
-QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i )
+TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem & i )
{
return stream << i.fileURL
<< i.msgid
@@ -302,7 +302,7 @@ QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i )
<< i.validationTool;
}
-QDataStream & operator>>( QDataStream & stream, IgnoreItem & i ) {
+TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & i ) {
return stream >> i.fileURL
>> i.msgid
>> i.msgstr
diff --git a/kbabel/catalogmanager/validateprogress.h b/kbabel/catalogmanager/validateprogress.h
index 05133889..15c7c238 100644
--- a/kbabel/catalogmanager/validateprogress.h
+++ b/kbabel/catalogmanager/validateprogress.h
@@ -33,7 +33,7 @@
#ifndef VALIDATEDLG_H
#define VALIDATEDLG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <kurl.h>
@@ -47,31 +47,31 @@ class KPopupMenu;
struct IgnoreItem
{
KURL fileURL;
- QStringList msgid;
- QStringList msgstr;
+ TQStringList msgid;
+ TQStringList msgstr;
uint index;
- QString validationTool;
+ TQString validationTool;
};
-QDataStream & operator<<( QDataStream & stream, const IgnoreItem &ident );
-QDataStream & operator>>( QDataStream & stream, IgnoreItem & ident);
+TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem &ident );
+TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & ident);
class ValidateProgressDialog : public KDialogBase
{
Q_OBJECT
public:
- ValidateProgressDialog(const QString& ignoreURL, QWidget* parent, const char *name=0);
+ ValidateProgressDialog(const TQString& ignoreURL, TQWidget* parent, const char *name=0);
virtual ~ValidateProgressDialog();
void setIgnoreFuzzy(bool enable) { _ignoreFuzzy = enable; }
void setMarkAsFuzzy(bool enable) { _setAsFuzzy = enable; }
public slots:
- void validate(const KDataToolInfo &tool, const QPtrList<CatManListItem> files);
+ void validate(const KDataToolInfo &tool, const TQPtrList<CatManListItem> files);
signals:
- void errorDoubleClicked(const QString file, const int messageNumber);
+ void errorDoubleClicked(const TQString file, const int messageNumber);
private slots:
/** implementation of the validation itself */
@@ -82,28 +82,28 @@ private slots:
/** If user doubleclicked an item, this slot will be invoked.
* It emits errorDoubleClicked signal for corresponding error*/
- void errorItemDoubleClicked(QListBoxItem * item);
+ void errorItemDoubleClicked(TQListBoxItem * item);
/** show our context menu */
- void showContextMenu(QListBoxItem * item, const QPoint & pos);
+ void showContextMenu(TQListBoxItem * item, const TQPoint & pos);
private:
void readIgnores();
void writeIgnores();
ValidateProgressWidget *_mainWidget;
- QString _ignoreURL;
+ TQString _ignoreURL;
KDataTool* _tool;
- QString _toolID;
- QPtrList<CatManListItem> _files;
+ TQString _toolID;
+ TQPtrList<CatManListItem> _files;
bool _stopped;
KPopupMenu* _errorMenu;
bool _ignoreFuzzy;
bool _setAsFuzzy;
- QValueList<IgnoreItem> _ignores;
- QMap<QString,IgnoreItem> _errors;
+ TQValueList<IgnoreItem> _ignores;
+ TQMap<TQString,IgnoreItem> _errors;
};
#endif // VALIDATEDLG_H
diff --git a/kbabel/catalogmanager/validateprogresswidget.ui.h b/kbabel/catalogmanager/validateprogresswidget.ui.h
index 88f36d60..f3723e02 100644
--- a/kbabel/catalogmanager/validateprogresswidget.ui.h
+++ b/kbabel/catalogmanager/validateprogresswidget.ui.h
@@ -37,11 +37,11 @@
** place of a destructor.
*****************************************************************************/
-void ValidateProgressWidget::setupFileProgressBar( QString text, int maxvalue )
+void ValidateProgressWidget::setupFileProgressBar( TQString text, int maxvalue )
{
_currentFileProgress->setTotalSteps(maxvalue);
- QString t = text[0].upper()+text.mid(1)+":";
+ TQString t = text[0].upper()+text.mid(1)+":";
_currentAction->setText(t);
_currentAction->repaint();
diff --git a/kbabel/common/argextractor.cpp b/kbabel/common/argextractor.cpp
index 4146a5a7..ec5d659f 100644
--- a/kbabel/common/argextractor.cpp
+++ b/kbabel/common/argextractor.cpp
@@ -37,22 +37,22 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
-ArgExtractor::ArgExtractor(QString string) : RegExpExtractor( string )
+ArgExtractor::ArgExtractor(TQString string) : RegExpExtractor( string )
{
}
-QStringList *ArgExtractor::_argList=0;
-KStaticDeleter< QStringList > sdAL;
+TQStringList *ArgExtractor::_argList=0;
+KStaticDeleter< TQStringList > sdAL;
-QStringList *ArgExtractor::regExpList()
+TQStringList *ArgExtractor::regExpList()
{
if(!_argList)
{
- sdAL.setObject( _argList, new QStringList );
+ sdAL.setObject( _argList, new TQStringList );
//Build the default arg list
_argList->append("%[ndioxXucsfeEgGp]");
_argList->append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]");
@@ -62,9 +62,9 @@ QStringList *ArgExtractor::regExpList()
return _argList;
}
-void ArgExtractor::setArgExpressions( QStringList* list )
+void ArgExtractor::setArgExpressions( TQStringList* list )
{
- sdAL.setObject( _argList, new QStringList );
- for( QStringList::Iterator it = list->begin() ; it != list->end() ; ++it )
+ sdAL.setObject( _argList, new TQStringList );
+ for( TQStringList::Iterator it = list->begin() ; it != list->end() ; ++it )
_argList->append(*it);
}
diff --git a/kbabel/common/argextractor.h b/kbabel/common/argextractor.h
index 31b28c8a..dd84f1c2 100644
--- a/kbabel/common/argextractor.h
+++ b/kbabel/common/argextractor.h
@@ -35,11 +35,11 @@
#ifndef _ARG_EXTRACTOR_H_
#define _ARG_EXTRACTOR_H_
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include "regexpextractor.h"
@@ -58,23 +58,23 @@ public:
/**
* Create an argument extractor for "string"
*/
- ArgExtractor(QString string=QString::null);
+ ArgExtractor(TQString string=TQString::null);
/**
* Set a new list of tag regular expressions. It also
* deletes the old tags.
* @param list a list of regular expressions
*/
- static void setArgExpressions(QStringList* list);
+ static void setArgExpressions(TQStringList* list);
protected:
/**
* @return the static list of args
*/
- virtual QStringList *regExpList();
+ virtual TQStringList *regExpList();
private:
- static QStringList *_argList;
+ static TQStringList *_argList;
};
}
diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp
index ffd939b7..d6501c3e 100644
--- a/kbabel/common/catalog.cpp
+++ b/kbabel/common/catalog.cpp
@@ -31,14 +31,14 @@
your version.
**************************************************************************** */
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
#include <kconfig.h>
#include <kdatatool.h>
@@ -70,8 +70,8 @@
#include <kmessagebox.h>
using namespace KBabel;
-Catalog::Catalog(QObject* parent, const char* name, QString projectFile)
- : QObject(parent,name)
+Catalog::Catalog(TQObject* parent, const char* name, TQString projectFile)
+ : TQObject(parent,name)
{
if ( projectFile.isEmpty() )
projectFile = KBabel::ProjectManager::defaultProjectName();
@@ -79,7 +79,7 @@ Catalog::Catalog(QObject* parent, const char* name, QString projectFile)
readPreferences();
}
-Catalog::Catalog(const Catalog& c): QObject(c.parent(),c.name()
+Catalog::Catalog(const Catalog& c): TQObject(c.parent(),c.name()
)
{
kdFatal() << "Copy constructor of Catalog, please report how to reproduce to the authors" << endl;
@@ -90,20 +90,20 @@ Catalog::~Catalog()
delete d;
}
-QString Catalog::msgctxt(uint index) const
+TQString Catalog::msgctxt(uint index) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
return d->_entries[index].msgctxt();
}
-QStringList Catalog::msgid(uint index, const bool noNewlines) const
+TQStringList Catalog::msgid(uint index, const bool noNewlines) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
@@ -111,10 +111,10 @@ QStringList Catalog::msgid(uint index, const bool noNewlines) const
return d->_entries[index].msgid(noNewlines);
}
-QStringList Catalog::msgstr(uint index, const bool noNewlines) const
+TQStringList Catalog::msgstr(uint index, const bool noNewlines) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
@@ -123,24 +123,24 @@ QStringList Catalog::msgstr(uint index, const bool noNewlines) const
return d->_entries[index].msgstr(noNewlines);
}
-QString Catalog::comment(uint index) const
+TQString Catalog::comment(uint index) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
return d->_entries[index].comment();
}
-QString Catalog::context(uint index) const
+TQString Catalog::context(uint index) const
{
- QString c = comment(index);
+ TQString c = comment(index);
- QStringList lines = QStringList::split("\n",c);
+ TQStringList lines = TQStringList::split("\n",c);
- QString result;
- for( QStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
+ TQString result;
+ for( TQStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
{
if( (*it).startsWith( "#:") )
{
@@ -155,15 +155,15 @@ CatalogItem Catalog::header() const
return d->_header;
}
-QString Catalog::lastTranslator() const
+TQString Catalog::lastTranslator() const
{
return headerInfo( d->_header ).lastTranslator;
}
-int Catalog::indexForMsgid(const QString& id) const
+int Catalog::indexForMsgid(const TQString& id) const
{
int i=0;
- QValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
+ TQValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
while(it != d->_entries.end() && !((*it).msgid(true).contains(id)))
{
@@ -177,10 +177,10 @@ int Catalog::indexForMsgid(const QString& id) const
return i;
}
-QStringList Catalog::tagList(uint index)
+TQStringList Catalog::tagList(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -190,10 +190,10 @@ QStringList Catalog::tagList(uint index)
}
-QStringList Catalog::argList(uint index)
+TQStringList Catalog::argList(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -204,7 +204,7 @@ QStringList Catalog::argList(uint index)
/*
-bool Catalog::setMsgstr(uint index,QString msgstr)
+bool Catalog::setMsgstr(uint index,TQString msgstr)
{
kdWarning() << "Catalog::setMsgstr()" << endl;
@@ -217,7 +217,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr)
}
else if(msgstr.isEmpty())
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = _untransIndex.begin();
@@ -242,7 +242,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr)
*/
/*
-bool Catalog::setComment(uint index,QString comment)
+bool Catalog::setComment(uint index,TQString comment)
{
kdWarning() << "Catalog::setComment()" << endl;
bool fuzziesChanged=false;
@@ -261,7 +261,7 @@ bool Catalog::setComment(uint index,QString comment)
}
else if(isFuzzy)
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = _fuzzyIndex.begin();
@@ -289,7 +289,7 @@ bool Catalog::setHeader(CatalogItem newHeader)
if(newHeader.isValid())
{
// normalize the values - ensure every key:value pair is only on a single line
- QString values = newHeader.msgstr().first();
+ TQString values = newHeader.msgstr().first();
values.replace ("\n", "");
values.replace ("\\n", "\\n\n");
@@ -321,11 +321,11 @@ void Catalog::setCurrentURL(const KURL& url)
CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
- QStringList headerList=oldHeader.msgstrAsList();
- QStringList commentList=QStringList::split('\n',oldHeader.comment());
+ TQStringList headerList=oldHeader.msgstrAsList();
+ TQStringList commentList=TQStringList::split('\n',oldHeader.comment());
- QStringList::Iterator it,ait;
- QString temp;
+ TQStringList::Iterator it,ait;
+ TQString temp;
bool found;
const IdentitySettings identityOptions = identitySettings();
@@ -343,7 +343,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Last-Translator:.*")))
+ if((*it).contains(TQRegExp("^ *Last-Translator:.*")))
{
(*it) = temp;
found=true;
@@ -363,7 +363,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *PO-Revision-Date:.*")))
+ if((*it).contains(TQRegExp("^ *PO-Revision-Date:.*")))
{
(*it) = temp;
found=true;
@@ -384,7 +384,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Project-Id-Version:.*")))
+ if((*it).contains(TQRegExp("^ *Project-Id-Version:.*")))
{
(*it) = temp;
found=true;
@@ -408,7 +408,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Language-Team:.*")))
+ if((*it).contains(TQRegExp("^ *Language-Team:.*")))
{
(*it) = temp;
found=true;
@@ -425,7 +425,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
- QString encodingStr;
+ TQString encodingStr;
if(saveOptions.useOldEncoding && d->fileCodec)
{
encodingStr = charsetString(d->fileCodec);
@@ -440,7 +440,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it = headerList.begin();
while( it != headerList.end() )
{
- if( (*it).find( QRegExp( "^ *Content-Type:.*" ) ) != -1 )
+ if( (*it).find( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
{
if ( found )
{
@@ -450,8 +450,8 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else
{
found=true;
- QRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" );
- QString mimeType;
+ TQRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" );
+ TQString mimeType;
if ( regexp.search( *it ) )
{
mimeType = regexp.cap( 1 ).stripWhiteSpace();
@@ -483,7 +483,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Content-Transfer-Encoding:.*")))
+ if((*it).contains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
{
(*it) = temp;
found=true;
@@ -502,7 +502,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *X-Generator:.*")))
+ if((*it).contains(TQRegExp("^ *X-Generator:.*")))
{
(*it) = temp;
found=true;
@@ -519,7 +519,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *MIME-Version:")))
+ if((*it).contains(TQRegExp("^ *MIME-Version:")))
{
(*it) = temp;
found=true;
@@ -541,7 +541,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Plural-Forms:")))
+ if((*it).contains(TQRegExp("^ *Plural-Forms:")))
{
(*it) = temp;
found=true;
@@ -564,7 +564,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = commentList.begin(); it != commentList.end(); ++it )
{
// U+00A9 is the Copyright sign
- if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
{
found=true;
break;
@@ -572,27 +572,27 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
}
if(found)
{
- if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
{
//template string
if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove)
(*it).remove(" YEAR Free Software Foundation, Inc");
else
- (*it).replace("YEAR", QDate::currentDate().toString("yyyy"));
+ (*it).replace("YEAR", TQDate::currentDate().toString("yyyy"));
} else
if( saveOptions.FSFCopyright == ProjectSettingsBase::Update )
{
//update years
- QString cy = QDate::currentDate().toString("yyyy");
- if( !(*it).contains( QRegExp(cy)) ) // is the year already included?
+ TQString cy = TQDate::currentDate().toString("yyyy");
+ if( !(*it).contains( TQRegExp(cy)) ) // is the year already included?
{
- int index = (*it).findRev( QRegExp("[\\d]+[\\d\\-, ]*") );
+ int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if( index == -1 )
{
KMessageBox::information(0,i18n("Free Software Foundation Copyright does not contain any year. "
"It will not be updated."));
} else {
- (*it).insert(index+1, QString(", ")+cy);
+ (*it).insert(index+1, TQString(", ")+cy);
}
}
}
@@ -608,14 +608,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp = temp.stripWhiteSpace();
// The description strings has often buggy variants already in the file, these must be removed
- QString regexpstr = "^#\\s+" + QRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
+ TQString regexpstr = "^#\\s+" + TQRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
regexpstr.replace( "@PACKAGE@", ".*" );
regexpstr.replace( "@LANGUAGE@", ".*" );
//kdDebug() << "REGEXPSTR: " << regexpstr << endl;
- QRegExp regexp ( regexpstr );
+ TQRegExp regexp ( regexpstr );
// The buggy variants exist in English too (of a time before KBabel got a translation for the corresponding language)
- QRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" );
+ TQRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" );
kdDebug () << "Temp is '" << temp << "'" << endl;
@@ -666,7 +666,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
&& ( ! identityOptions.authorName.isEmpty() )
&& ( ! identityOptions.authorEmail.isEmpty() ) ) // An email address can be used as ersatz of a name
{
- QStringList foundAuthors;
+ TQStringList foundAuthors;
temp = "# ";
temp += identityOptions.authorName;
@@ -674,11 +674,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
temp+=(" <"+identityOptions.authorEmail+">");
}
- temp+=", "+QDate::currentDate().toString("yyyy")+".";
+ temp+=", "+TQDate::currentDate().toString("yyyy")+".";
// ### TODO: it would be nice if the entry could start with "COPYRIGHT" and have the "(C)" symbol (both not mandatory)
- QRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" );
- QRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" );
+ TQRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" );
+ TQRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" );
it = commentList.begin();
while ( it != commentList.end() )
{
@@ -721,14 +721,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found = false;
bool foundAuthor = false;
- const QString cy = QDate::currentDate().toString("yyyy");
+ const TQString cy = TQDate::currentDate().toString("yyyy");
ait = foundAuthors.end();
for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it )
{
- if ( (*it).find( QRegExp(
- QRegExp::escape( identityOptions.authorName )+".*"
- + QRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
+ if ( (*it).find( TQRegExp(
+ TQRegExp::escape( identityOptions.authorName )+".*"
+ + TQRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
{
foundAuthor = true;
if( (*it).find( cy ) != -1 )
@@ -744,11 +744,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else if ( ait != foundAuthors.end() )
{
//update years
- const int index = (*ait).findRev( QRegExp("[\\d]+[\\d\\-, ]*") );
+ const int index = (*ait).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if ( index == -1 )
(*ait)+=", "+cy;
else
- (*ait).insert(index+1, QString(", ")+cy);
+ (*ait).insert(index+1, TQString(", ")+cy);
}
else
kdDebug() << "INTERNAL ERROR: author found but iterator dangling!" << endl;
@@ -760,11 +760,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it=commentList.end();
do
--it;
- while( ( it != commentList.begin() ) && ( (*it).find( QRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
+ while( ( it != commentList.begin() ) && ( (*it).find( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
++it;
for( ait = foundAuthors.begin() ; ait != foundAuthors.end() ; ++ait )
{
- QString s = (*ait);
+ TQString s = (*ait);
// ensure dot at the end of copyright
if( !s.endsWith(".") ) s += ".";
@@ -790,7 +790,7 @@ void Catalog::setFuzzy(uint index, bool on)
{
applyBeginCommand( index, Comment, 0 );
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
if(on)
{
editList=d->_entries[index].addFuzzy(false);
@@ -832,13 +832,13 @@ void Catalog::setModified(bool flag)
}
-QString Catalog::packageName() const
+TQString Catalog::packageName() const
{
if( !d->_packageName.isNull() ) return d->_packageName;
- QString package=d->_url.fileName();
+ TQString package=d->_url.fileName();
- int index=package.find(QRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
+ int index=package.find(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
if(index>0)
package=package.left(index);
@@ -846,12 +846,12 @@ QString Catalog::packageName() const
return package;
}
-void Catalog::setPackage(const QString& package )
+void Catalog::setPackage(const TQString& package )
{
const int pos = package.findRev( '/' );
if( pos < 0 )
{
- d->_packageDir = QString();
+ d->_packageDir = TQString();
d->_packageName = package;
}
else
@@ -862,20 +862,20 @@ void Catalog::setPackage(const QString& package )
kdDebug() << k_funcinfo << " " << package << " => " << d->_packageDir << " + " << d->_packageName << endl;
}
-QString Catalog::packageDir() const
+TQString Catalog::packageDir() const
{
- QString result;
+ TQString result;
if( !d->_packageDir.isNull() ) result=d->_packageDir;
else result=d->_url.directory(false);
return result;
}
-QString Catalog::encoding() const
+TQString Catalog::encoding() const
{
SaveSettings options = saveSettings();
- QString encodingStr;
+ TQString encodingStr;
if(options.useOldEncoding && d->fileCodec)
{
encodingStr = charsetString(d->fileCodec);
@@ -888,9 +888,9 @@ QString Catalog::encoding() const
return encodingStr;
}
-ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
+ConversionStatus Catalog::openURL(const KURL& url, const TQString& package)
{
- QString target;
+ TQString target;
ConversionStatus error = OK;
if(KIO::NetAccess::download(url, target, NULL))
@@ -930,15 +930,15 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
filter = static_cast<CatalogImportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
-
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
+
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
d->_active = true;
@@ -971,8 +971,8 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
if( package.isEmpty() )
{
- d->_packageName=QString::null;
- d->_packageDir=QString::null;
+ d->_packageName=TQString::null;
+ d->_packageDir=TQString::null;
}
else setPackage(package);
@@ -992,9 +992,9 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
}
}
-ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const QString& package)
+ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package)
{
- QString target;
+ TQString target;
ConversionStatus error = OK;
if(KIO::NetAccess::download(openUrl, target, NULL))
@@ -1027,15 +1027,15 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
filter = static_cast<CatalogImportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
d->_active = true;
@@ -1069,8 +1069,8 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
d->_url = saveURL;
if( package.isEmpty() )
{
- d->_packageName=QString::null;
- d->_packageDir=QString::null;
+ d->_packageName=TQString::null;
+ d->_packageDir=TQString::null;
}
else setPackage(package);
@@ -1093,12 +1093,12 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
}
}
-Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
+Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors)
{
if( !d->_mimeTypes.contains( "application/x-gettext" ) )
return Msgfmt::Unsupported;
- QString filename;
+ TQString filename;
bool tempFileUsed=false;
if(d->_url.isLocalFile() && !isModified())
@@ -1125,15 +1125,15 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
currentLine=d->_header.totalLines()+1;
// ### KDE4: return "lines" not "output"
- const QStringList lines = QStringList::split("\n",output);
- for ( QStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
+ const TQStringList lines = TQStringList::split("\n",output);
+ for ( TQStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
{
- if( (*it).find(QRegExp("^.+:\\d+:")) >= 0 )
+ if( (*it).find(TQRegExp("^.+:\\d+:")) >= 0 )
{
const int begin=(*it).find(":",0)+1;
const int end=(*it).find(":",begin);
- const QString line=(*it).mid(begin,end-begin);
+ const TQString line=(*it).mid(begin,end-begin);
while( line.toInt() > currentLine )
{
@@ -1158,14 +1158,14 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
}
if(tempFileUsed)
- QFile::remove(filename);
+ TQFile::remove(filename);
return result;
}
void Catalog::clearErrorList()
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
for(it = d->_errorIndex.begin(); it != d->_errorIndex.end(); ++it)
{
d->_entries[(*it)].setSyntaxError(false);
@@ -1185,10 +1185,10 @@ void Catalog::removeFromErrorList(uint index)
}
}
-QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList<KDataTool> whatToCheck)
+TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -1207,10 +1207,10 @@ QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList<KDataTool> wh
return item.errors();
}
-QStringList Catalog::itemStatus(uint index)
+TQStringList Catalog::itemStatus(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -1229,14 +1229,14 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
kdDebug(KBABEL) << "checkUsingTool active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
int index = 0;
bool hasErrors=false;
emit signalResetProgressBar(i18n("validating file"),100);
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it, index++ )
{
if( !tool->run( "validate", (void*)(&(*it)), "CatalogItem", "application/x-kbabel-catalogitem" ))
@@ -1256,26 +1256,26 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
kdDebug(KBABEL) << "checkUsingTool not active" << endl;
d->_active=false;
d->_stop=false;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
emit signalClearProgressBar();
return !hasErrors;
}
-void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
+void Catalog::modifyUsingTool(KDataTool* tool, const TQString& command)
{
kdDebug(KBABEL) << "modifyUsingTool active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
int index = 0;
bool modified = false;
emit signalResetProgressBar(i18n("applying tool"),100);
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it, index++ )
{
CatalogItem dummyItem( *it );
@@ -1294,7 +1294,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
{
uint in = 0; // number of current lural form
// go over all plural forms and test, which changed
- for ( QStringList::Iterator itorig = (*it).msgstr().begin()
+ for ( TQStringList::Iterator itorig = (*it).msgstr().begin()
, itchanged = dummyItem.msgstr().begin()
; itorig != (*it).msgstr().end()
; ++itorig, ++itchanged) {
@@ -1334,7 +1334,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
kdDebug(KBABEL) << "modifyUsingTool not active" << endl;
d->_active=false;
d->_stop=false;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
emit signalClearProgressBar();
}
@@ -1653,7 +1653,7 @@ bool Catalog::isGeneratedFromDocbook() const
return d->_generatedFromDocbook;
}
-QString Catalog::package() const
+TQString Catalog::package() const
{
return packageDir()+packageName();
}
@@ -1672,7 +1672,7 @@ void Catalog::setSettings(IdentitySettings settings)
{
IdentitySettings oldsettings = d->_project->identitySettings();
- QString oldLanguageCode = oldsettings.languageCode;
+ TQString oldLanguageCode = oldsettings.languageCode;
int oldForms = oldsettings.numberOfPluralForms;
@@ -1711,7 +1711,7 @@ void Catalog::generateIndexLists()
clearErrorList();
uint counter=0;
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
{
if((*it).isUntranslated())
{
@@ -1727,9 +1727,9 @@ void Catalog::generateIndexLists()
}
-int Catalog::findNextInList(const QValueList<uint>& list,uint index) const
+int Catalog::findNextInList(const TQValueList<uint>& list,uint index) const
{
- QValueList<uint>::ConstIterator it;
+ TQValueList<uint>::ConstIterator it;
int nextIndex=-1;
@@ -1759,9 +1759,9 @@ int Catalog::findNextInList(const QValueList<uint>& list,uint index) const
return nextIndex;
}
-int Catalog::findPrevInList(const QValueList<uint>& list,uint index) const
+int Catalog::findPrevInList(const TQValueList<uint>& list,uint index) const
{
- QValueList<uint>::ConstIterator it;
+ TQValueList<uint>::ConstIterator it;
int prevIndex=-1;
@@ -1798,10 +1798,10 @@ int Catalog::findPrevInList(const QValueList<uint>& list,uint index) const
}
-QString Catalog::dateTime() const
+TQString Catalog::dateTime() const
{
- const QDateTime dt = QDateTime::currentDateTime();
- QString dateTimeString;
+ const TQDateTime dt = TQDateTime::currentDateTime();
+ TQString dateTimeString;
const SaveSettings options = d->_project->saveSettings();
@@ -1815,7 +1815,7 @@ QString Catalog::dateTime() const
case Qt::ISODate:
{
dateTimeString = dt.toString("yyyy-MM-dd hh:mm");
- QTime t;
+ TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60 ;
t = t.addSecs( offset * correction );
@@ -1827,56 +1827,56 @@ QString Catalog::dateTime() const
{
dateTimeString = options.customDateFormat;
- const QDate date = dt.date();
- const QTime time = dt.time();
+ const TQDate date = dt.date();
+ const TQTime time = dt.time();
// the year
- dateTimeString.replace( "%Y", QString::number( date.year() ) );
- dateTimeString.replace( "%y", QString::number( date.year() ).right(2) );
+ dateTimeString.replace( "%Y", TQString::number( date.year() ) );
+ dateTimeString.replace( "%y", TQString::number( date.year() ).right(2) );
// the month
if(date.month()<10)
{
- dateTimeString.replace( "%m", "0"+QString::number( date.month() ) );
+ dateTimeString.replace( "%m", "0"+TQString::number( date.month() ) );
}
else
{
- dateTimeString.replace( "%m", QString::number( date.month() ) );
+ dateTimeString.replace( "%m", TQString::number( date.month() ) );
}
- dateTimeString.replace( "%f", QString::number( date.month() ) );
+ dateTimeString.replace( "%f", TQString::number( date.month() ) );
dateTimeString.replace( "%b", date.longMonthName(date.month()) );
dateTimeString.replace( "%h", date.longMonthName(date.month()) );
// the day
- dateTimeString.replace( "%j", QString::number( date.dayOfYear() ) );
- dateTimeString.replace( "%e", QString::number( date.day() ) );
+ dateTimeString.replace( "%j", TQString::number( date.dayOfYear() ) );
+ dateTimeString.replace( "%e", TQString::number( date.day() ) );
if(date.day() < 10)
{
- dateTimeString.replace( "%d", "0"+QString::number( date.day() ) );
+ dateTimeString.replace( "%d", "0"+TQString::number( date.day() ) );
}
else
{
- dateTimeString.replace( "%d", QString::number( date.day() ) );
+ dateTimeString.replace( "%d", TQString::number( date.day() ) );
}
dateTimeString.replace( "%a", date.longDayName( date.dayOfWeek() ) );
// hour
- dateTimeString.replace( "%k", QString::number( time.hour() ) );
+ dateTimeString.replace( "%k", TQString::number( time.hour() ) );
if(time.hour() < 10)
{
- dateTimeString.replace( "%H", "0"+QString::number( time.hour() ) );
+ dateTimeString.replace( "%H", "0"+TQString::number( time.hour() ) );
}
else
{
- dateTimeString.replace( "%H", QString::number( time.hour() ) );
+ dateTimeString.replace( "%H", TQString::number( time.hour() ) );
}
- QString zone; // AM or PM
+ TQString zone; // AM or PM
int hour = time.hour();
if( hour > 12 )
{
@@ -1888,15 +1888,15 @@ QString Catalog::dateTime() const
zone="AM";
}
- dateTimeString.replace( "%I", QString::number( hour ) );
+ dateTimeString.replace( "%I", TQString::number( hour ) );
if(hour < 10)
{
- dateTimeString.replace( "%i", "0"+QString::number( hour ) );
+ dateTimeString.replace( "%i", "0"+TQString::number( hour ) );
}
else
{
- dateTimeString.replace( "%i", QString::number( hour ) );
+ dateTimeString.replace( "%i", TQString::number( hour ) );
}
dateTimeString.replace( "%p", zone );
@@ -1904,26 +1904,26 @@ QString Catalog::dateTime() const
// minutes
if(time.minute() < 10)
{
- dateTimeString.replace( "%M", "0"+QString::number( time.minute() ) );
+ dateTimeString.replace( "%M", "0"+TQString::number( time.minute() ) );
}
else
{
- dateTimeString.replace( "%M", QString::number( time.minute() ) );
+ dateTimeString.replace( "%M", TQString::number( time.minute() ) );
}
// seconds
if(time.second() < 10)
{
- dateTimeString.replace( "%S", "0"+QString::number( time.second() ) );
+ dateTimeString.replace( "%S", "0"+TQString::number( time.second() ) );
}
else
{
- dateTimeString.replace( "%S", QString::number( time.second() ) );
+ dateTimeString.replace( "%S", TQString::number( time.second() ) );
}
// timezone
dateTimeString.replace( "%Z", d->_project->identitySettings().timeZone );
- QTime t;
+ TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60;
t = t.addSecs( offset * correction );
@@ -1973,15 +1973,15 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
if(targetURL.isLocalFile())
{
// test if the directory exists. If not, create it.
- QDir dir( targetURL.directory());
+ TQDir dir( targetURL.directory());
- QStringList dirList;
+ TQStringList dirList;
while(!dir.exists() && !dir.dirName().isEmpty())
{
dirList.prepend(dir.dirName());
dir.setPath(dir.path()+"/..");
}
- for ( QStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it )
+ for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it )
{
if(!dir.mkdir(*it))
{
@@ -1998,7 +1998,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
}
else
{
- QString tempFile=kapp->tempSaveName(targetURL.path(0));
+ TQString tempFile=kapp->tempSaveName(targetURL.path(0));
status = writeFile(tempFile,overwrite);
@@ -2010,7 +2010,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
}
}
- QFile::remove(tempFile);
+ TQFile::remove(tempFile);
}
if(status == OK)
@@ -2031,21 +2031,21 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
return status;
}
-QString Catalog::saveTempFile()
+TQString Catalog::saveTempFile()
{
- QString filename = kapp->tempSaveName("/temp/kbabel_temp.po");
+ TQString filename = kapp->tempSaveName("/temp/kbabel_temp.po");
if( writeFile(filename) != OK )
{
- filename = QString::null;
+ filename = TQString::null;
}
return filename;
}
-ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
+ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite)
{
- QFileInfo info(localFile);
+ TQFileInfo info(localFile);
if(info.isDir())
return NO_FILE;
@@ -2059,7 +2059,7 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
}
else // check if the directory is writable
{
- QFileInfo dir(info.dirPath());
+ TQFileInfo dir(info.dirPath());
if(!dir.isWritable())
{
return NO_PERMISSIONS;
@@ -2093,15 +2093,15 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
filter = static_cast<CatalogExportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
kdDebug(KBABEL) << "writeFile active" << endl;
@@ -2117,13 +2117,13 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
return error;
}
-QTextCodec* Catalog::codecForFile(QString gettextHeader)
+TQTextCodec* Catalog::codecForFile(TQString gettextHeader)
{
- QString charset;
+ TQString charset;
- QString head = gettextHeader;
+ TQString head = gettextHeader;
- QRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+");
+ TQRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+");
int begin=r.search(head);
int len=r.matchedLength();
if(begin<0) {
@@ -2133,13 +2133,13 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
head = head.mid(begin,len);
- QRegExp regexp("charset *= *([^\\\\\\\"]+)");
+ TQRegExp regexp("charset *= *([^\\\\\\\"]+)");
if( regexp.search( head ) > -1 )
{
charset = regexp.cap(1);
}
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -2148,20 +2148,20 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
// at least utf8, so utf8-codec can be used for both.
if( charset == "CHARSET")
{
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf8 encoding.")
+ << TQString("file seems to be a template: using utf8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
}
if(!codec)
{
kdWarning() << "charset found, but no codec available, using UTF8 instead" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
}
@@ -2170,81 +2170,81 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
PoInfo Catalog::headerInfo(const CatalogItem headerItem)
{
- QStringList header=headerItem.msgstrAsList();
+ TQStringList header=headerItem.msgstrAsList();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
PoInfo info;
// extract information from the header
for(it=header.begin();it!=header.end();++it)
{
- if((*it).contains(QRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
+ if((*it).contains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
{
- info.project=(*it).replace(QRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
+ info.project=(*it).replace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
if(info.project.right(2)=="\\n")
info.project.remove(info.project.length()-2,2);
info.project=info.project.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
{
- info.creation=(*it).replace(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
+ info.creation=(*it).replace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
if(info.creation.right(2)=="\\n")
info.creation.remove(info.creation.length()-2,2);
info.creation=info.creation.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
{
- info.revision=(*it).replace(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
+ info.revision=(*it).replace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
if(info.revision.right(2)=="\\n")
info.revision.remove(info.revision.length()-2,2);
info.revision=info.revision.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
{
- info.lastTranslator=(*it).replace(QRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
+ info.lastTranslator=(*it).replace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
if(info.lastTranslator.right(2)=="\\n")
info.lastTranslator.remove(info.lastTranslator.length()-2,2);
info.lastTranslator=info.lastTranslator.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
{
- info.languageTeam=(*it).replace(QRegExp("^\\s*Language-Team\\s*:\\s*"),"");
+ info.languageTeam=(*it).replace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
if(info.languageTeam.right(2)=="\\n")
info.languageTeam.remove(info.languageTeam.length()-2,2);
info.languageTeam=info.languageTeam.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
{
- info.mimeVersion=(*it).replace(QRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
+ info.mimeVersion=(*it).replace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
if(info.mimeVersion.right(2)=="\\n")
info.mimeVersion.remove(info.mimeVersion.length()-2,2);
info.mimeVersion=info.mimeVersion.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
{
- info.contentType=(*it).replace(QRegExp("^\\s*Content-Type\\s*:\\s*"),"");
+ info.contentType=(*it).replace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
if(info.contentType.right(2)=="\\n")
info.contentType.remove(info.contentType.length()-2,2);
info.contentType=info.contentType.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
{
- info.encoding=(*it).replace(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
+ info.encoding=(*it).replace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
if(info.encoding.right(2)=="\\n")
info.encoding.remove(info.encoding.length()-2,2);
@@ -2253,7 +2253,7 @@ PoInfo Catalog::headerInfo(const CatalogItem headerItem)
}
else
{
- QString line=(*it);
+ TQString line=(*it);
if(line.right(2)=="\\n")
line.remove(line.length()-2,2);
@@ -2455,7 +2455,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo)
if(checkUntranslated && item.isUntranslated())
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = d->_untransIndex.begin();
@@ -2478,7 +2478,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo)
}
else
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = d->_fuzzyIndex.begin();
@@ -2504,15 +2504,15 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
kdDebug(KBABEL) << "findNext active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
MiscSettings miscOptions = miscSettings();
len=0;
int pos=0;
- QString searchStr = findOpts->findStr;
- QRegExp regexp(searchStr);
+ TQString searchStr = findOpts->findStr;
+ TQRegExp regexp(searchStr);
if( findOpts->isRegExp ) {
regexp.setCaseSensitive(findOpts->caseSensitive);
@@ -2547,14 +2547,14 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
int accelMarkerPos = -1;
int contextInfoLength = 0;
int contextInfoPos = -1;
- QString targetStr;
+ TQString targetStr;
kapp->processEvents(10);
if( d->_stop || endReached)
{
kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findNext not active" << endl;
d->_active=false;
d->_stop=false;
@@ -2603,9 +2603,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
if ((pos=regexp.search(targetStr,docPos.offset)) >= 0 ) {
len = regexp.matchedLength();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2621,9 +2621,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
len=searchStr.length();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2763,7 +2763,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findNext not active" << endl;
d->_active=false;
d->_stop=false;
@@ -2779,15 +2779,15 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
MiscSettings miscOptions = miscSettings();
len=0;
int pos=0;
- QString searchStr = findOpts->findStr;
- QRegExp regexp(searchStr);
+ TQString searchStr = findOpts->findStr;
+ TQRegExp regexp(searchStr);
if( findOpts->isRegExp ) {
regexp.setCaseSensitive(findOpts->caseSensitive);
@@ -2796,14 +2796,14 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
int accelMarkerPos = -1;
int contextInfoLength = 0;
int contextInfoPos = -1;
- QString targetStr;
+ TQString targetStr;
kapp->processEvents(10);
if( d->_stop || beginReached)
{
kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=false;
d->_stop=false;
@@ -2869,9 +2869,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(found) {
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2886,9 +2886,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
&& (uint)pos < docPos.offset) {
len=searchStr.length();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -3034,7 +3034,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=false;
d->_stop=false;
@@ -3043,7 +3043,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
-Catalog::DiffResult Catalog::diff(uint entry, QString *result)
+Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
{
if(!result)
{
@@ -3057,7 +3057,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
}
// first look if the diff for this entry is in the cache
- QString *s = d->diffCache[entry];
+ TQString *s = d->diffCache[entry];
if(s)
{
if(s->isEmpty())
@@ -3070,7 +3070,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
// then look if the same msgid is contained in the diff file
// FIXME: should care about plural forms in msgid
- QString id = msgid(entry).first();
+ TQString id = msgid(entry).first();
id.replace( "\n","");
if(d->msgidDiffList.contains(id))
{
@@ -3080,21 +3080,21 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffOk;
}
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "diffv active" << endl;
d->_active=true;
d->_stop=false;
- QString idForDiff;
+ TQString idForDiff;
// then look if there are entries with the same translation
kdWarning() << "Diff feature (2) does not work with plural forms" << endl;
- QString str = msgstr(entry).first();
+ TQString str = msgstr(entry).first();
str.replace("\n","");
if(d->msgstr2MsgidDiffList.contains(str))
{
- QStringList list = d->msgstr2MsgidDiffList[str];
+ TQStringList list = d->msgstr2MsgidDiffList[str];
if(list.count() == 1)
{
@@ -3104,9 +3104,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
{
// find the best matching id
double bestWeight = 0.6;
- QString bestId;
+ TQString bestId;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it)
{
double weight = LevenshteinDistance()(id, (*it));
@@ -3130,13 +3130,13 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
// find the best matching id
double bestWeight = 0.6;
- QString bestId;
+ TQString bestId;
int counter=0;
int oldPercent=0;
int max = QMAX( d->msgidDiffList.count()-1, 1);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = d->msgidDiffList.begin();
it != d->msgidDiffList.end(); ++it)
{
@@ -3159,7 +3159,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
if( d->_stop )
{
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug
(KBABEL) << "diffv not active" << endl;
@@ -3180,7 +3180,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
if( idForDiff.isEmpty() )
{
- s = new QString(*result);
+ s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
delete s;
@@ -3190,16 +3190,16 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffNotFound;
}
- QString r = wordDiff(idForDiff,id);
+ TQString r = wordDiff(idForDiff,id);
//esp for plural forms
- *result = r.replace("\\n<KBABELADD>" + QString(QChar(0x00B6)) + "</KBABELADD>", "\\n\n");
+ *result = r.replace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
- s = new QString(*result);
+ s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
delete s;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "diffv not active" << endl;
d->_active=false;
d->_stop=false;
@@ -3207,9 +3207,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffOk;
}
-void Catalog::setDiffList( const QValueList<DiffEntry>& list)
+void Catalog::setDiffList( const TQValueList<DiffEntry>& list)
{
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "setDiffList active" << endl;
d->_active=true;
d->_stop=false;
@@ -3223,7 +3223,7 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
uint max = QMAX(list.count()-1,1);
int oldPercent=0;
uint counter=0;
- QValueList<DiffEntry>::ConstIterator it;
+ TQValueList<DiffEntry>::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it)
{
int percent = (100*counter)/max;
@@ -3235,9 +3235,9 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
kapp->processEvents(10);
}
- QString id = (*it).msgid;
+ TQString id = (*it).msgid;
id.replace("\n","");
- QString str = (*it).msgstr;
+ TQString str = (*it).msgstr;
str.replace("\n","");
d->msgidDiffList.append(id);
@@ -3245,12 +3245,12 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
{
if(d->msgstr2MsgidDiffList.contains(str))
{
- QStringList sl = d->msgstr2MsgidDiffList[str];
+ TQStringList sl = d->msgstr2MsgidDiffList[str];
sl.append(id);
}
else
{
- QStringList sl;
+ TQStringList sl;
sl.append(id);
d->msgstr2MsgidDiffList.insert(str,sl);
}
@@ -3259,17 +3259,17 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
emit signalClearProgressBar();
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "setDiffList not active" << endl;
d->_active=false;
d->_stop=false;
}
-QValueList<DiffEntry> Catalog::asDiffList()
+TQValueList<DiffEntry> Catalog::asDiffList()
{
- QValueList<DiffEntry> list;
+ TQValueList<DiffEntry> list;
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
DiffEntry e;
@@ -3299,7 +3299,7 @@ void Catalog::getNumberOfPluralForms()
return;
}
- QString lang=options.languageCode;
+ TQString lang=options.languageCode;
if(lang.isEmpty())
{
d->numberOfPluralForms=-1;
@@ -3309,7 +3309,7 @@ void Catalog::getNumberOfPluralForms()
d->numberOfPluralForms = getNumberOfPluralForms(lang);
}
-int Catalog::getNumberOfPluralForms(const QString& lang)
+int Catalog::getNumberOfPluralForms(const TQString& lang)
{
int nr=-1;
@@ -3323,7 +3323,7 @@ int Catalog::getNumberOfPluralForms(const QString& lang)
"that out if unsure, the programs will crash!!\n"
"Definition of PluralForm - to be set by the translator of kdelibs.po";
- QString formsTranslation = locale.translate(formsString);
+ TQString formsTranslation = locale.translate(formsString);
// no translation found
if(formsTranslation == formsString || formsTranslation.isEmpty())
@@ -3385,44 +3385,44 @@ bool Catalog::isModified() const
return d->_modified;
}
-void Catalog::setEntries(QValueVector<CatalogItem> entries)
+void Catalog::setEntries(TQValueVector<CatalogItem> entries)
{
d->_entries=entries;
// update the project for entries
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
it->setProject( d->_project );
}
}
-void Catalog::setObsoleteEntries(QValueList<CatalogItem> entries)
+void Catalog::setObsoleteEntries(TQValueList<CatalogItem> entries)
{
d->_obsoleteEntries=entries;
}
-QValueList<CatalogItem> Catalog::obsoleteEntries() const
+TQValueList<CatalogItem> Catalog::obsoleteEntries() const
{
return d->_obsoleteEntries;
}
-void Catalog::setCatalogExtraData(const QStringList& data)
+void Catalog::setCatalogExtraData(const TQStringList& data)
{
d->_catalogExtra = data;
}
-QStringList Catalog::catalogExtraData() const
+TQStringList Catalog::catalogExtraData() const
{
return d->_catalogExtra;
}
-QString Catalog::importPluginID() const
+TQString Catalog::importPluginID() const
{
return d->_importID;
}
-QTextCodec* Catalog::fileCodec() const
+TQTextCodec* Catalog::fileCodec() const
{
return d->fileCodec;
}
@@ -3432,17 +3432,17 @@ void Catalog::setGeneratedFromDocbook(const bool generated)
d->_generatedFromDocbook = generated;
}
-void Catalog::setFileCodec( QTextCodec* codec )
+void Catalog::setFileCodec( TQTextCodec* codec )
{
d->fileCodec = codec;
}
-void Catalog::setErrorIndex( const QValueList<uint>& list )
+void Catalog::setErrorIndex( const TQValueList<uint>& list )
{
d->_errorIndex = list;
}
-void Catalog::setImportPluginID( const QString& id )
+void Catalog::setImportPluginID( const TQString& id )
{
d->_importID = id;
}
@@ -3463,12 +3463,12 @@ bool Catalog::isActive()
return d->_active;
}
-void Catalog::setMimeTypes( const QString& mimeTypes )
+void Catalog::setMimeTypes( const TQString& mimeTypes )
{
d->_mimeTypes = mimeTypes;
}
-QString Catalog::mimeTypes() const
+TQString Catalog::mimeTypes() const
{
return d->_mimeTypes;
}
@@ -3479,21 +3479,21 @@ void Catalog::wordCount (uint &total, uint &fuzzy, uint &untranslated) const
fuzzy = 0;
untranslated = 0;
- QRegExp separator( "[ \n\t]+" );
+ TQRegExp separator( "[ \n\t]+" );
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
// find out the number of words for this message
// join all forms together
- QString message = (*it).msgid ().join (" ");
+ TQString message = (*it).msgid ().join (" ");
// remove tags first
d->_tagExtractor->setString( message );
message = d->_tagExtractor->plainString(false);
- QStringList words = QStringList::split ( separator, message );
+ TQStringList words = TQStringList::split ( separator, message );
total += words.count();
diff --git a/kbabel/common/catalog.h b/kbabel/common/catalog.h
index db47c48b..27b22bab 100644
--- a/kbabel/common/catalog.h
+++ b/kbabel/common/catalog.h
@@ -42,8 +42,8 @@
#include "catalogfileplugin.h"
#include "kbproject.h"
-#include <qptrlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
#include <kdemacros.h>
#include <kstandarddirs.h>
@@ -95,8 +95,8 @@ struct DocPosition
*/
struct DiffEntry
{
- QString msgid;
- QString msgstr;
+ TQString msgid;
+ TQString msgstr;
};
/**
@@ -121,17 +121,17 @@ public:
*
* @return Codec for found charset or 0, if no information has been found
*/
- static QTextCodec* codecForFile(QString gettextHeader);
+ static TQTextCodec* codecForFile(TQString gettextHeader);
static PoInfo headerInfo(const CatalogItem headerItem);
/**
* A constructor for an empty message catalog.
- * @param parent parent @ref QObject for this catalog
+ * @param parent parent @ref TQObject for this catalog
* @param name unique name for this object
* @param configFile configuration file to read config from
*/
- Catalog(QObject* parent=0, const char* name=0, QString projectFile = QString() );
+ Catalog(TQObject* parent=0, const char* name=0, TQString projectFile = TQString() );
/**
* Deprecated. A copy constructor. Do not use since each Catalog registers
@@ -146,7 +146,7 @@ public:
* @param index index of the requested message
* @return context for the given message
*/
- QString msgctxt(uint index) const;
+ TQString msgctxt(uint index) const;
/**
* Get list of texts for a given message in original language. Each entry in the list
@@ -157,7 +157,7 @@ public:
* (useful for searching etc)
* @return list of singular/plural forms of the original text
*/
- QStringList msgid(uint index, const bool noNewlines=false) const;
+ TQStringList msgid(uint index, const bool noNewlines=false) const;
/**
* Get list of translated texts for a given message. Each entry in the list
@@ -168,7 +168,7 @@ public:
* (useful for searching etc)
* @return list of translated singular/plural forms
*/
- QStringList msgstr(uint index, const bool noNewlines=false) const;
+ TQStringList msgstr(uint index, const bool noNewlines=false) const;
/**
* Get the comment for a given message.
@@ -176,7 +176,7 @@ public:
* @param index index of the requested message
* @return comment for the given message
*/
- QString comment(uint index) const;
+ TQString comment(uint index) const;
/**
* Get the context information for a given message. This works
@@ -187,7 +187,7 @@ public:
* @return context information found in the message comment
* @deprecated
*/
- QString context(uint index) const KDE_DEPRECATED;
+ TQString context(uint index) const KDE_DEPRECATED;
/**
* Get the header for the current file.
@@ -201,31 +201,31 @@ public:
*
* @return string representation of the name and e-mail address
*/
- QString lastTranslator() const;
+ TQString lastTranslator() const;
/**
* @return The list of obsolete entries. These cannot be changed at
* all and are stored for import/export purposes.
*/
- QValueList<CatalogItem> obsoleteEntries() const;
+ TQValueList<CatalogItem> obsoleteEntries() const;
/**
* @return The index of the item, that has the msgid id.
* If no item is found, -1 is returned.
*/
- int indexForMsgid(const QString& id) const;
+ int indexForMsgid(const TQString& id) const;
/** @return a list of tags in entry #index */
- QStringList tagList(uint index);
+ TQStringList tagList(uint index);
/** @return a list of arguments in entry #index */
- QStringList argList(uint index);
+ TQStringList argList(uint index);
/**
* @return the list of errors found for a given item index
* @param index index of the item to check
*/
- QStringList itemStatus(uint index);
+ TQStringList itemStatus(uint index);
/**
* @return the list of errors found for a given item index
@@ -233,18 +233,18 @@ public:
* @param recheck flag, if the item status should be checked now
* @param whatToCheck what checks to do (a list of tools to be used
*/
- QStringList itemStatus(uint index, bool recheck, QPtrList<KDataTool> whatToCheck);
+ TQStringList itemStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck);
/**
* replaces msgstr in catalog item at index index with msgstr
* returns true, if untranslated status changed
*/
- //bool setMsgstr(uint index,QString msgstr);
+ //bool setMsgstr(uint index,TQString msgstr);
/**
* replaces comment in catalog item at index index with comment
* returns true, if fuzzy status changed
*/
- //bool setComment(uint index,QString comment);
+ //bool setComment(uint index,TQString comment);
/**
* replaces header with given String
* @return false if the header is not valid
@@ -270,40 +270,40 @@ public:
/**
* @return package name for the current catalog
*/
- QString packageName() const;
+ TQString packageName() const;
/**
* @return directory for the package of the current catalog
*/
- QString packageDir() const;
+ TQString packageDir() const;
/**
* @return package name and directory for the current catalog
*/
- QString package() const;
+ TQString package() const;
/**
* Setup the package for the catalog. It tries to parse the
* package and split it to name and directory
* @param package the name and directory to be set as package
*/
- void setPackage(const QString& package);
+ void setPackage(const TQString& package);
/**
* @return encoding for the current catalog
*/
- QString encoding() const;
+ TQString encoding() const;
/**
* opens file url by using KDE's network downlad and calls
* openFile with a local filename
*/
- ConversionStatus openURL(const KURL& url, const QString& package=QString::null);
+ ConversionStatus openURL(const KURL& url, const TQString& package=TQString::null);
/**
* opens file openURL by using KDE's network downlad and calls
* openFile with a local filename
* sets current URL to saveURL
*/
- ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const QString& package=QString::null);
+ ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString::null);
/** save the file under the old filename */
ConversionStatus saveFile();
@@ -314,25 +314,25 @@ public:
* saves the current catalog in a temporary file and
* returns the name and path of the file.
*/
- QString saveTempFile();
+ TQString saveTempFile();
/**
* @return extra data for the catalog as set by the import filter
*/
- QStringList catalogExtraData() const;
+ TQStringList catalogExtraData() const;
/**
* @return ID string of the used import filter
*/
- QString importPluginID() const;
+ TQString importPluginID() const;
/**
* @return list of MIME types (separated by comma) this catalog
* can be viewed as. It is set by the used import filter.
*/
- QString mimeTypes() const;
+ TQString mimeTypes() const;
/**
* @return the file codec used for the current catalog
*/
- QTextCodec* fileCodec() const;
+ TQTextCodec* fileCodec() const;
/**
* Check syntax of the GNU gettext PO file using 'msgfmt'.
@@ -341,7 +341,7 @@ public:
* @param clearError should the errors be cleared before running msgfmt
* @return the file codec used for the current catalog
*/
- Msgfmt::Status checkSyntax(QString& output, bool clearErrors=true);
+ Msgfmt::Status checkSyntax(TQString& output, bool clearErrors=true);
/**
* checks using an external tool. The tool must provide the "validate" command
@@ -355,7 +355,7 @@ public:
* with the datatype expected to be CatalogItem *. The MIME type
* is application/x-kbabel-catalogitem.
*/
- void modifyUsingTool(KDataTool* tool, const QString& command);
+ void modifyUsingTool(KDataTool* tool, const TQString& command);
/**
* Returns true, if there is an ongoing activity, such as load/save
@@ -483,7 +483,7 @@ public:
* the search in po-files. This way, I can easily find the first
* catalog entry in the textstream
*/
-// static ConversionStatus readHeader(QTextStream& stream,CatalogItem& header);
+// static ConversionStatus readHeader(TQTextStream& stream,CatalogItem& header);
void registerView(CatalogView* view);
@@ -531,23 +531,23 @@ public:
* tries to find a corresponding entry for entry entry
* from the list of old messages and calculates the diff for it
*/
- DiffResult diff(uint entry, QString* result);
+ DiffResult diff(uint entry, TQString* result);
/**
* sets a list of entries to generate a diff from
*/
- void setDiffList( const QValueList<DiffEntry>& );
+ void setDiffList( const TQValueList<DiffEntry>& );
/**
* @return the contents of this catalog as list for diffs
*/
- QValueList<DiffEntry> asDiffList();
+ TQValueList<DiffEntry> asDiffList();
/**
* @return how many plural forms are used in language lang.
* If nothing is found -1 is returned.
*/
- static int getNumberOfPluralForms(const QString& lang);
+ static int getNumberOfPluralForms(const TQString& lang);
public slots:
/**
@@ -611,7 +611,7 @@ private:
void processCommand(EditCommand* cmd, CatalogView* view2exclude=0, bool undo=false);
/** do the actual file write using plugin */
- ConversionStatus writeFile(QString localfile, bool overwrite=false);
+ ConversionStatus writeFile(TQString localfile, bool overwrite=false);
/**
* generates lists that contain indexes of all fuzzy and untranslated entries
@@ -622,15 +622,15 @@ private:
* returns value in list that is lower than parameter index
* or -1 if there is none
*/
- int findPrevInList(const QValueList<uint>& list,uint index) const;
+ int findPrevInList(const TQValueList<uint>& list,uint index) const;
/**
* returns value in list that is bigger than parameter index
* or -1 if there is none
*/
- int findNextInList(const QValueList<uint>& list,uint index) const;
+ int findNextInList(const TQValueList<uint>& list,uint index) const;
/** returns the current date and time in the format of the users choice */
- QString dateTime() const;
+ TQString dateTime() const;
/** clear the list of all errors */
void clearErrorList();
@@ -648,26 +648,26 @@ private:
/** set the flag that the catalog is generated from docbook */
void setGeneratedFromDocbook(const bool generated);
/** set the entries of the catalog */
- void setEntries( QValueVector<CatalogItem> entries);
+ void setEntries( TQValueVector<CatalogItem> entries);
/** set the obsolete entries of the catalog */
- void setObsoleteEntries( QValueList<CatalogItem> entries);
+ void setObsoleteEntries( TQValueList<CatalogItem> entries);
/** set extra data for the catalog as defined by import plugin */
- void setCatalogExtraData(const QStringList& data);
+ void setCatalogExtraData(const TQStringList& data);
/** set file codec for the catalog */
- void setFileCodec(QTextCodec* codec);
+ void setFileCodec(TQTextCodec* codec);
/** set the list of import errors */
- void setErrorIndex(const QValueList<uint>&errors);
+ void setErrorIndex(const TQValueList<uint>&errors);
/** set ID of the used import plugin */
- void setImportPluginID(const QString& id);
+ void setImportPluginID(const TQString& id);
/** set the MIME types for the current catalog as defined by import plugin */
- void setMimeTypes(const QString& mimeTypes);
+ void setMimeTypes(const TQString& mimeTypes);
private:
CatalogPrivate* d;
signals:
- void signalError(QString);
- void signalResetProgressBar(QString,int);
+ void signalError(TQString);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
diff --git a/kbabel/common/catalog_private.h b/kbabel/common/catalog_private.h
index 645353f3..153c8486 100644
--- a/kbabel/common/catalog_private.h
+++ b/kbabel/common/catalog_private.h
@@ -35,12 +35,12 @@
#ifndef CATALOGPRIVATE_H
#define CATALOGPRIVATE_H
-#include <qintcache.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqintcache.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
#include <kurl.h>
#include "msgfmt.h"
@@ -66,20 +66,20 @@ public:
/** url of the po-file, that belongs to this catalog */
KURL _url;
- QString _packageName;
- QString _packageDir;
+ TQString _packageName;
+ TQString _packageDir;
/** holds the entries in the catalog */
- QValueVector<CatalogItem> _entries;
+ TQValueVector<CatalogItem> _entries;
/** The header of the po-file. */
CatalogItem _header;
/** list of obsolete entries */
- QValueList<CatalogItem> _obsoleteEntries;
+ TQValueList<CatalogItem> _obsoleteEntries;
/** identification string for used import filter*/
- QString _importID;
- QString _mimeTypes;
+ TQString _importID;
+ TQString _mimeTypes;
bool _modified;
bool _readOnly;
@@ -87,34 +87,34 @@ public:
bool _active;
bool _stop;
- QValueList<uint> _fuzzyIndex;
- QValueList<uint> _untransIndex;
- QValueList<uint> _errorIndex;
+ TQValueList<uint> _fuzzyIndex;
+ TQValueList<uint> _untransIndex;
+ TQValueList<uint> _errorIndex;
- QPtrList<CatalogView> _views;
+ TQPtrList<CatalogView> _views;
TagSettings _tagSettings;
- QPtrList<EditCommand> _undoList;
- QPtrList<EditCommand> _redoList;
+ TQPtrList<EditCommand> _undoList;
+ TQPtrList<EditCommand> _redoList;
- QTextCodec *fileCodec;
+ TQTextCodec *fileCodec;
- QStringList msgidDiffList;
- QMap< QString, QStringList > msgstr2MsgidDiffList;
- QIntCache<QString> diffCache;
+ TQStringList msgidDiffList;
+ TQMap< TQString, TQStringList > msgstr2MsgidDiffList;
+ TQIntCache<TQString> diffCache;
int numberOfPluralForms;
Project::Ptr _project;
RegExpExtractor *_tagExtractor, *_argExtractor;
- QStringList _catalogExtra;
+ TQStringList _catalogExtra;
CatalogPrivate(Project::Ptr project) :
- _packageName( QString::null ), _packageDir( QString::null ),
+ _packageName( TQString::null ), _packageDir( TQString::null ),
_header (project),
- _importID( QString::null ), _mimeTypes( "text/plain" ),
+ _importID( TQString::null ), _mimeTypes( "text/plain" ),
_modified(false), _readOnly(false), _generatedFromDocbook(false),
_active(false), _stop(false),
fileCodec(0), diffCache(30,76), numberOfPluralForms(-1),
@@ -129,8 +129,8 @@ public:
_undoList.setAutoDelete(true);
_redoList.setAutoDelete(true);
- _tagExtractor = new RegExpExtractor(QStringList());
- _argExtractor = new RegExpExtractor(QStringList());
+ _tagExtractor = new RegExpExtractor(TQStringList());
+ _argExtractor = new RegExpExtractor(TQStringList());
_catalogExtra.clear();
}
diff --git a/kbabel/common/catalogfileplugin.h b/kbabel/common/catalogfileplugin.h
index f47e0d89..caa94c17 100644
--- a/kbabel/common/catalogfileplugin.h
+++ b/kbabel/common/catalogfileplugin.h
@@ -32,7 +32,7 @@
#ifndef IMPORTPLUGIN_H
#define IMPORTPLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
@@ -84,7 +84,7 @@ class KDE_EXPORT CatalogImportPlugin: public QObject
Q_OBJECT
public:
- CatalogImportPlugin(QObject* parent, const char* name);
+ CatalogImportPlugin(TQObject* parent, const char* name);
virtual ~CatalogImportPlugin();
/**
@@ -96,7 +96,7 @@ public:
* @param catalog the catalog to be filled
* @return result of the operation
*/
- ConversionStatus open(const QString& file, const QString& mimetype, Catalog* catalog);
+ ConversionStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog);
/**
* Reimplement this method to load the local file passed as an argument.
@@ -108,16 +108,16 @@ public:
* @param file file to be loaded
* @param mimetype the expected MIME type (the type used for plugin selection
*/
- virtual ConversionStatus load(const QString& file, const QString& mimetype) = 0;
+ virtual ConversionStatus load(const TQString& file, const TQString& mimetype) = 0;
/**
* Reimplement this method to return unique identification of your plugin
*/
- virtual const QString id() = 0;
+ virtual const TQString id() = 0;
/** @return the list of all available MIME types for which there
* is a import plugin.
*/
- static QStringList availableImportMimeTypes();
+ static TQStringList availableImportMimeTypes();
public slots:
/** stop the current operation */
@@ -133,17 +133,17 @@ protected:
/** set flag that the file is generated from DocBook */
void setGeneratedFromDocbook(const bool fromDocbook);
/** set the list of parse error indexes */
- void setErrorIndex(const QValueList<uint>& errors);
+ void setErrorIndex(const TQValueList<uint>& errors);
/** set the file codec */
- void setFileCodec(QTextCodec* codec);
+ void setFileCodec(TQTextCodec* codec);
/** set extra data for the catalog, which can't be stored in
* @ref CatalogItem. The format can be arbitrary */
- void setCatalogExtraData( const QStringList& data );
+ void setCatalogExtraData( const TQStringList& data );
/** set the header catalog item */
void setHeader( const CatalogItem& header );
/** set the MIME types which can be used for this catalog */
- void setMimeTypes( const QString& catalog );
+ void setMimeTypes( const TQString& catalog );
/** start a new transaction. You should never call this method. */
void startTransaction();
@@ -155,7 +155,7 @@ protected:
signals:
/** Signal start of the operation */
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
/** Signal progress of the operation */
void signalProgress(int);
/** Signal end of the operation */
@@ -179,11 +179,11 @@ class KDE_EXPORT CatalogExportPlugin: public QObject
Q_OBJECT
public:
- CatalogExportPlugin(QObject* parent, const char* name);
+ CatalogExportPlugin(TQObject* parent, const char* name);
virtual ~CatalogExportPlugin();
- virtual ConversionStatus save(const QString& file, const QString& mimetype, const Catalog* catalog) = 0;
+ virtual ConversionStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0;
- static QStringList availableExportMimeTypes();
+ static TQStringList availableExportMimeTypes();
public slots:
void stop();
@@ -192,7 +192,7 @@ protected:
bool isStopped() const;
signals:
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp
index ced02e8c..bd55d7b6 100644
--- a/kbabel/common/catalogitem.cpp
+++ b/kbabel/common/catalogitem.cpp
@@ -40,9 +40,9 @@
#include "regexpextractor.h"
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qdom.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqdom.h>
using namespace KBabel;
@@ -65,16 +65,16 @@ CatalogItem::~CatalogItem()
delete d;
}
-QString CatalogItem::comment() const
+TQString CatalogItem::comment() const
{
return d->_comment;
}
-QString CatalogItem::msgctxt(const bool noNewlines) const
+TQString CatalogItem::msgctxt(const bool noNewlines) const
{
if( noNewlines )
{
- QString tmp = d->_msgctxt;
+ TQString tmp = d->_msgctxt;
tmp.replace("\n", " "); // ### TODO: " " or "" ?
return tmp;
}
@@ -82,9 +82,9 @@ QString CatalogItem::msgctxt(const bool noNewlines) const
return d->_msgctxt;
}
-QStringList CatalogItem::msgid(const bool noNewlines) const
+TQStringList CatalogItem::msgid(const bool noNewlines) const
{
- QStringList result=d->_msgid;
+ TQStringList result=d->_msgid;
if( noNewlines )
{
result.gres( "\n", "" );
@@ -92,9 +92,9 @@ QStringList CatalogItem::msgid(const bool noNewlines) const
return result;
}
-QStringList CatalogItem::msgstr(const bool noNewlines) const
+TQStringList CatalogItem::msgstr(const bool noNewlines) const
{
- QStringList result=d->_msgstr;
+ TQStringList result=d->_msgstr;
if( noNewlines )
{
result.gres( "\n", "" );
@@ -102,12 +102,12 @@ QStringList CatalogItem::msgstr(const bool noNewlines) const
return result;
}
-QStringList CatalogItem::msgstrAsList(int nr) const
+TQStringList CatalogItem::msgstrAsList(int nr) const
{
- QString str;
+ TQString str;
if(d->_gettextPluralForm && nr > 0)
{
- QStringList::ConstIterator it = d->_msgstr.at(nr);
+ TQStringList::ConstIterator it = d->_msgstr.at(nr);
if(it != d->_msgstr.end())
{
str = *it;
@@ -123,7 +123,7 @@ QStringList CatalogItem::msgstrAsList(int nr) const
str = d->_msgstr.first();
}
- QStringList list=QStringList::split("\n",str);
+ TQStringList list=TQStringList::split("\n",str);
if(str.left(1)=="\n")
list.prepend("");
@@ -139,32 +139,32 @@ bool CatalogItem::isValid() const
return d->_valid;
}
-void CatalogItem::setMsgctxt(QString msg)
+void CatalogItem::setMsgctxt(TQString msg)
{
d->_msgctxt=msg;
}
-void CatalogItem::setMsgid(QString msg)
+void CatalogItem::setMsgid(TQString msg)
{
d->_msgid=msg;
}
-void CatalogItem::setMsgid(QStringList msg)
+void CatalogItem::setMsgid(TQStringList msg)
{
d->_msgid=msg;
}
-void CatalogItem::setMsgstr(QString msg)
+void CatalogItem::setMsgstr(TQString msg)
{
d->_msgstr=msg;
}
-void CatalogItem::setMsgstr(QStringList msg)
+void CatalogItem::setMsgstr(TQStringList msg)
{
d->_msgstr=msg;
}
-void CatalogItem::setComment(QString com)
+void CatalogItem::setComment(TQString com)
{
d->_comment=com;
}
@@ -174,31 +174,31 @@ void CatalogItem::setGettextPluralForm( bool _gettextPlural )
d->_gettextPluralForm = _gettextPlural;
}
-QStringList CatalogItem::errors() const
+TQStringList CatalogItem::errors() const
{
return d->_errors;
}
-QStringList CatalogItem::tagList( RegExpExtractor& te)
+TQStringList CatalogItem::tagList( RegExpExtractor& te)
{
if(!d->_haveTagList)
{
// FIXME: should care about plural forms in msgid
te.setString(msgid(true).first());
- d->_tagList = QStringList(te.matches());
+ d->_tagList = TQStringList(te.matches());
d->_haveTagList = true;
}
return d->_tagList;
}
-QStringList CatalogItem::argList( RegExpExtractor& te)
+TQStringList CatalogItem::argList( RegExpExtractor& te)
{
if(!d->_haveArgList)
{
// FIXME: should care about plural forms in msgid
te.setString(msgid(true).first());
- d->_argList = QStringList(te.matches());
+ d->_argList = TQStringList(te.matches());
}
return d->_argList;
@@ -207,29 +207,29 @@ QStringList CatalogItem::argList( RegExpExtractor& te)
bool CatalogItem::isFuzzy() const
{
- return d->_comment.find( QRegExp(",\\s*fuzzy") ) != -1;
+ return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1;
}
bool CatalogItem::isCformat() const
{
// Allow "possible-c-format" (from xgettext --debug) or "c-format"
// Note the regexp (?: ) is similar to () but it does not capture (so it is faster)
- return d->_comment.find( QRegExp(",\\s*(?:possible-)c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
}
bool CatalogItem::isNoCformat() const
{
- return d->_comment.find( QRegExp(",\\s*no-c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1;
}
bool CatalogItem::isQtformat() const
{
- return d->_comment.find( QRegExp(",\\s*qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1;
}
bool CatalogItem::isNoQtformat() const
{
- return d->_comment.find( QRegExp(",\\s*no-qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1;
}
bool CatalogItem::isUntranslated() const
@@ -260,7 +260,7 @@ int CatalogItem::totalLines() const
msgctxtLines=d->_msgctxt.contains('\n')+1;
}
int msgidLines=0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it)
{
msgidLines += (*it).contains('\n')+1;
@@ -292,17 +292,17 @@ void CatalogItem::setSyntaxError(bool on)
d->_errors.remove("syntax error");
}
-QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
+TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
{
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
editList.setAutoDelete(false);
- QString comment=d->_comment;
+ TQString comment=d->_comment;
if(isFuzzy())
{
EditCommand *cmd;
- QRegExp fuzzyStr(",\\s*fuzzy");
+ TQRegExp fuzzyStr(",\\s*fuzzy");
int offset;
offset=comment.find(fuzzyStr);
@@ -318,7 +318,7 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
}
// remove empty comment lines
- if( comment.contains( QRegExp("^#\\s*$") ))
+ if( comment.contains( TQRegExp("^#\\s*$") ))
{
cmd = new DelTextCmd(0,comment,0);
cmd->setPart(Comment);
@@ -326,9 +326,9 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment="";
}
- if( comment.contains( QRegExp("\n#\\s*$") ))
+ if( comment.contains( TQRegExp("\n#\\s*$") ))
{
- offset=comment.find( QRegExp("\n#\\s*$") );
+ offset=comment.find( TQRegExp("\n#\\s*$") );
while(offset>=0)
{
cmd = new DelTextCmd(offset,comment.mid(offset),0);
@@ -337,12 +337,12 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,comment.length()-offset);
- offset=comment.find( QRegExp("\n#\\s*$"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 );
}
}
- if( comment.contains( QRegExp("\n#\\s*\n") ))
+ if( comment.contains( TQRegExp("\n#\\s*\n") ))
{
- offset=comment.find( QRegExp("\n#\\s*\n") )+1;
+ offset=comment.find( TQRegExp("\n#\\s*\n") )+1;
while(offset>=0)
{
int endIndex=comment.find("\n",offset)+1;
@@ -353,7 +353,7 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,endIndex-offset);
- offset=comment.find( QRegExp("\n#\\s*\n"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 );
}
}
@@ -367,9 +367,9 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
-QPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
+TQPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
{
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
editList.setAutoDelete(false);
@@ -378,7 +378,7 @@ QPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
EditCommand *cmd;
int offset=d->_comment.length();
- QString addStr;
+ TQString addStr;
if(offset > 0 && d->_comment[offset-1] != '\n')
{
addStr='\n';
@@ -487,7 +487,7 @@ void CatalogItem::operator=(const CatalogItem& rhs)
d->_gettextPluralForm = rhs.d->_gettextPluralForm;
}
-QString CatalogItem::nextError() const
+TQString CatalogItem::nextError() const
{
return d->_errors.first();
}
@@ -497,13 +497,13 @@ void CatalogItem::clearErrors()
d->_errors.clear();
}
-void CatalogItem::appendError(const QString& error )
+void CatalogItem::appendError(const TQString& error )
{
if( !d->_errors.contains( error ) )
d->_errors.append(error);
}
-void CatalogItem::removeError(const QString& error )
+void CatalogItem::removeError(const TQString& error )
{
d->_errors.remove(error);
}
diff --git a/kbabel/common/catalogitem.h b/kbabel/common/catalogitem.h
index 91e6cc25..9a7d6071 100644
--- a/kbabel/common/catalogitem.h
+++ b/kbabel/common/catalogitem.h
@@ -34,8 +34,8 @@
#ifndef CATALOGITEM_H
#define CATALOGITEM_H
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "pluralforms.h"
#include "editcmd.h"
@@ -127,14 +127,14 @@ public:
* @param doIt if false, the comment is not changed, just the
* commands for doing it are calculated
*/
- QPtrList<EditCommand> removeFuzzy(bool doIt=true);
+ TQPtrList<EditCommand> removeFuzzy(bool doIt=true);
/**
* adds the string ", fuzzy" to the comment
* @param doIt if false, the comment is not changed, just the
* commands for doing it are calculated
*/
- QPtrList<EditCommand> addFuzzy(bool doIt=true);
+ TQPtrList<EditCommand> addFuzzy(bool doIt=true);
/** cleares the item */
@@ -142,13 +142,13 @@ public:
/** returns the comment of this entry */
- QString comment() const;
+ TQString comment() const;
/** returns the msgctxt of this entry */
- QString msgctxt(const bool noNewlines = false) const;
+ TQString msgctxt(const bool noNewlines = false) const;
/** returns the msgid of the entry */
- QStringList msgid(const bool noNewlines = false) const;
+ TQStringList msgid(const bool noNewlines = false) const;
/** returns the msgstr of the entry */
- QStringList msgstr(const bool noNewlines = false) const;
+ TQStringList msgstr(const bool noNewlines = false) const;
/**
* @param pluralNr If this item is a gettext plural form item,
@@ -156,14 +156,14 @@ public:
* is returned
* @return the msgstr as list
*/
- QStringList msgstrAsList(int pluralNr=0) const;
-
- void setComment(QString com);
- void setMsgctxt(QString msg);
- void setMsgid(QString msg);
- void setMsgid(QStringList msg);
- void setMsgstr(QString msg);
- void setMsgstr(QStringList msg);
+ TQStringList msgstrAsList(int pluralNr=0) const;
+
+ void setComment(TQString com);
+ void setMsgctxt(TQString msg);
+ void setMsgid(TQString msg);
+ void setMsgid(TQStringList msg);
+ void setMsgstr(TQString msg);
+ void setMsgstr(TQStringList msg);
void setGettextPluralForm( bool _gettextPlurals );
@@ -173,20 +173,20 @@ public:
/** @return a list of tags in the msgid */
- QStringList tagList( RegExpExtractor& tagExtractor );
+ TQStringList tagList( RegExpExtractor& tagExtractor );
/** @return a list of args in the msgid */
- QStringList argList( RegExpExtractor& argExtractor);
+ TQStringList argList( RegExpExtractor& argExtractor);
/**
* @return the list of all errors of this item
*/
- QStringList errors() const;
+ TQStringList errors() const;
- QString nextError() const;
+ TQString nextError() const;
void clearErrors();
- void removeError(const QString& error);
- void appendError(const QString& error);
+ void removeError(const TQString& error);
+ void appendError(const TQString& error);
/**
* makes some sanity checks and set status accordingly
@@ -200,8 +200,8 @@ public:
* @param neededLines how many lines a string with singular-plural form
* must have
*/
- int checkErrors(QChar accelMarker, const QRegExp& contextInfo
- , const QRegExp& singularPlural, const int neededLines);
+ int checkErrors(TQChar accelMarker, const TQRegExp& contextInfo
+ , const TQRegExp& singularPlural, const int neededLines);
void operator=(const CatalogItem& rhs);
diff --git a/kbabel/common/catalogitem_private.h b/kbabel/common/catalogitem_private.h
index 15c81fc7..411e76b2 100644
--- a/kbabel/common/catalogitem_private.h
+++ b/kbabel/common/catalogitem_private.h
@@ -34,7 +34,7 @@
#ifndef CATALOGITEMPRIVATE_H
#define CATALOGITEMPRIVATE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KBabel
{
@@ -55,18 +55,18 @@ class CatalogItemPrivate
public:
- QString _comment;
- QString _msgctxt;
- QStringList _msgid;
- QStringList _msgstr;
+ TQString _comment;
+ TQString _msgctxt;
+ TQStringList _msgid;
+ TQStringList _msgstr;
- QStringList _tagList;
- QStringList _argList;
+ TQStringList _tagList;
+ TQStringList _argList;
bool _valid;
bool _haveTagList;
bool _haveArgList;
- QStringList _errors;
+ TQStringList _errors;
/** flag, if this entry is a plural forms entry */
bool _gettextPluralForm;
diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp
index 480f4cb9..4b87f522 100644
--- a/kbabel/common/catalogsettings.cpp
+++ b/kbabel/common/catalogsettings.cpp
@@ -43,19 +43,19 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <stdlib.h>
using namespace KBabel;
-QString KBabel::charsetString(const QTextCodec *codec)
+TQString KBabel::charsetString(const TQTextCodec *codec)
{
if(codec)
{
- QString encodingStr = codec->mimeName();
+ TQString encodingStr = codec->mimeName();
if ( encodingStr.startsWith("CP " ) )
encodingStr.remove( 2, 1 );
else if ( encodingStr.startsWith("IBM " ) )
@@ -63,14 +63,14 @@ QString KBabel::charsetString(const QTextCodec *codec)
return encodingStr;
}
else
- return QString::null;
+ return TQString::null;
}
-QString KBabel::GNUPluralForms(const QString& lang)
+TQString KBabel::GNUPluralForms(const TQString& lang)
{
KTempFile infile, outfile;
- QTextStream* str = infile.textStream();
+ TQTextStream* str = infile.textStream();
*str << "# SOME DESCRIPTIVE TITLE." << endl;
*str << "# Copyright (C) YEAR Free Software Foundation, Inc." << endl;
@@ -105,24 +105,24 @@ QString KBabel::GNUPluralForms(const QString& lang)
msginit.start( KProcess::Block );
- QString res("");
+ TQString res("");
if( msginit.normalExit() )
{
// parse out the plural form string
- QFile f(outfile.name());
+ TQFile f(outfile.name());
if( f.open (IO_ReadOnly) )
{
- QTextStream str(&f);
+ TQTextStream str(&f);
- QString line;
+ TQString line;
do {
line = str.readLine();
if( line.startsWith( "\"Plural-Forms:" ) )
{
kdDebug() << "Plural form line: " << line << endl;
- QRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" );
+ TQRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" );
re.search( line );
res = re.cap(1);
break;
@@ -141,15 +141,15 @@ QString KBabel::GNUPluralForms(const QString& lang)
return res;
}
-QString KBabel::charsetString(const int e)
+TQString KBabel::charsetString(const int e)
{
- QString encodingStr;
+ TQString encodingStr;
switch(e)
{
case ProjectSettingsBase::Locale:
{
- QTextCodec *codec=QTextCodec::codecForLocale();
+ TQTextCodec *codec=TQTextCodec::codecForLocale();
if(codec)
encodingStr=charsetString(codec);
else
@@ -172,36 +172,36 @@ QString KBabel::charsetString(const int e)
return encodingStr;
}
-QString Defaults::Identity::authorName()
+TQString Defaults::Identity::authorName()
{
KEMailSettings emSet;
return emSet.getSetting(KEMailSettings::RealName);
}
-QString Defaults::Identity::authorLocalizedName()
+TQString Defaults::Identity::authorLocalizedName()
{
return authorName();
}
-QString Defaults::Identity::authorEmail()
+TQString Defaults::Identity::authorEmail()
{
KEMailSettings emSet;
return emSet.getSetting(KEMailSettings::EmailAddress);
}
-QString Defaults::Identity::mailingList()
+TQString Defaults::Identity::mailingList()
{
- QString lang=Defaults::Identity::languageCode();
+ TQString lang=Defaults::Identity::languageCode();
int temp=lang.find("_");
lang=lang.left(temp);
return lang+"@li.org";
}
-QString Defaults::Identity::languageCode()
+TQString Defaults::Identity::languageCode()
{
// first try to get the language from KDE settings
KLocale *locale = KGlobal::locale();
- QString lang;
+ TQString lang;
if(locale)
{
lang=locale->languageList().first();
@@ -223,18 +223,18 @@ QString Defaults::Identity::languageCode()
return lang;
}
-QString Defaults::Identity::timezone()
+TQString Defaults::Identity::timezone()
{
- QString timezone=getenv("TIMEZONE");
+ TQString timezone=getenv("TIMEZONE");
if(timezone.isEmpty())
timezone="GMT";
return timezone;
}
-QStringList Defaults::Tag::tagExpressions()
+TQStringList Defaults::Tag::tagExpressions()
{
- QStringList list;
+ TQStringList list;
list.append("</[A-Za-z0-9\\n]+>");
list.append("<[A-Za-z0-9\\n]+[^>]*/?>");
@@ -246,9 +246,9 @@ QStringList Defaults::Tag::tagExpressions()
return list;
}
-QStringList Defaults::Tag::argExpressions()
+TQStringList Defaults::Tag::argExpressions()
{
- QStringList list;
+ TQStringList list;
list.append("%[ndioxXucsfeEgGp]");
list.append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]");
diff --git a/kbabel/common/catalogsettings.h b/kbabel/common/catalogsettings.h
index f87ec673..5d220e57 100644
--- a/kbabel/common/catalogsettings.h
+++ b/kbabel/common/catalogsettings.h
@@ -34,9 +34,9 @@
#ifndef CATALOGSETTINGS_H
#define CATALOGSETTINGS_H
-#include <qstring.h>
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
#include <kdemacros.h>
class QTextCodec;
@@ -56,7 +56,7 @@ struct KDE_EXPORT SaveSettings
bool updateProject;
bool updateDescription;
- QString descriptionString;
+ TQString descriptionString;
bool updateTranslatorCopyright;
int FSFCopyright;
@@ -64,9 +64,9 @@ struct KDE_EXPORT SaveSettings
bool useOldEncoding;
Qt::DateFormat dateFormat;
- QString customDateFormat;
+ TQString customDateFormat;
- QString projectString;
+ TQString projectString;
bool autoSyntaxCheck;
bool saveObsolete;
@@ -76,13 +76,13 @@ struct KDE_EXPORT SaveSettings
struct KDE_EXPORT IdentitySettings
{
- QString authorName;
- QString authorLocalizedName;
- QString authorEmail;
- QString languageName;
- QString languageCode;
- QString mailingList;
- QString timeZone;
+ TQString authorName;
+ TQString authorLocalizedName;
+ TQString authorEmail;
+ TQString languageName;
+ TQString languageCode;
+ TQString mailingList;
+ TQString timeZone;
/**
* The number of plural forms. If <= 0 the number is determined
@@ -94,7 +94,7 @@ struct KDE_EXPORT IdentitySettings
*/
bool checkPluralArgument;
- QString gnuPluralFormHeader;
+ TQString gnuPluralFormHeader;
};
@@ -104,19 +104,19 @@ struct KDE_EXPORT MiscSettings
* The char, that marks keyboard accelerators.
* Default is '&' as used by Qt
*/
- QChar accelMarker;
+ TQChar accelMarker;
/**
* The regular expression for what is context information.
* Default is "^_:.+" as used in KDE
*/
- QRegExp contextInfo;
+ TQRegExp contextInfo;
/**
* The regular expression for strings that contain a message for
* singular and one for plural
*/
- QRegExp singularPlural;
+ TQRegExp singularPlural;
/**
* The method used for compresion of email attachments. Use
@@ -137,35 +137,35 @@ struct TagSettings
/**
* A list of regular expressions defining tags
*/
- QStringList tagExpressions;
+ TQStringList tagExpressions;
/**
* A list of regular expressions defining arguments
*/
- QStringList argExpressions;
+ TQStringList argExpressions;
};
-KDE_EXPORT QString charsetString(const int encoding);
-KDE_EXPORT QString charsetString(const QTextCodec *codec);
-KDE_EXPORT QString GNUPluralForms(const QString& lang);
+KDE_EXPORT TQString charsetString(const int encoding);
+KDE_EXPORT TQString charsetString(const TQTextCodec *codec);
+KDE_EXPORT TQString GNUPluralForms(const TQString& lang);
namespace Defaults
{
class KDE_EXPORT Identity
{
public:
- static QString authorName();
- static QString authorLocalizedName();
- static QString authorEmail();
- static QString languageCode();
- static QString mailingList();
- static QString timezone();
+ static TQString authorName();
+ static TQString authorLocalizedName();
+ static TQString authorEmail();
+ static TQString languageCode();
+ static TQString mailingList();
+ static TQString timezone();
};
class KDE_EXPORT Tag
{
public:
- static QStringList tagExpressions();
- static QStringList argExpressions();
+ static TQStringList tagExpressions();
+ static TQStringList argExpressions();
};
}
diff --git a/kbabel/common/diff.cpp b/kbabel/common/diff.cpp
index 7a54e4d3..455a26f1 100644
--- a/kbabel/common/diff.cpp
+++ b/kbabel/common/diff.cpp
@@ -37,7 +37,7 @@
#include <kdebug.h>
-LCSprinter::LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector<LCSMarker> *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_)
+LCSprinter::LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector<LCSMarker> *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_)
{
it1=s1.begin();
it2=s2.begin();
@@ -93,24 +93,24 @@ void LCSprinter::printLCS(uint index)
-QString wordDiff(const QString& str1, const QString& str2)
+TQString wordDiff(const TQString& str1, const TQString& str2)
{
//separate punctuation marks etc from words as _only_ they may have changed
- QStringList s1, s2;
+ TQStringList s1, s2;
uint i=0;
uint j=0;
uint l1=str1.length();
uint l2=str2.length();
- QString temp;
+ TQString temp;
temp.reserve(16);
/*
while ( i<l1 )
{
- if (str1[i]==QChar(0x003C) && (str1[i+1]==QChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str1[i]==TQChar(0x003C) && (str1[i+1]==TQChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l1 && str1[i]!=QChar(0x003E)) temp += str1[i++];
- if (i++ <l1) temp += QChar(0x003E);
+ while(i<l1 && str1[i]!=TQChar(0x003E)) temp += str1[i++];
+ if (i++ <l1) temp += TQChar(0x003E);
s1.append(temp);
temp.truncate(0);
}
@@ -125,15 +125,15 @@ QString wordDiff(const QString& str1, const QString& str2)
temp.truncate(0);
};
- if (str1[i]==QChar(0x003C) && (str1[i+1]==QChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str1[i]==TQChar(0x003C) && (str1[i+1]==TQChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l1 && str1[i]!=QChar(0x003E)) temp += str1[i++];
- if (i++ <l1) temp += QChar(0x003E);
+ while(i<l1 && str1[i]!=TQChar(0x003E)) temp += str1[i++];
+ if (i++ <l1) temp += TQChar(0x003E);
s1.append(temp);
temp.truncate(0);
}
- while ( i<l1 && !(str1[i].isLetter() || str1[i]==QChar(0x003C)) )
+ while ( i<l1 && !(str1[i].isLetter() || str1[i]==TQChar(0x003C)) )
{
temp += str1[i++];
}
@@ -147,10 +147,10 @@ QString wordDiff(const QString& str1, const QString& str2)
i=0;
while ( i<l2 )
{
- if (str2[i]==QChar(0x003C) && (str2[i+1]==QChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str2[i]==TQChar(0x003C) && (str2[i+1]==TQChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l2 && str2[i]!=QChar(0x003E)) temp += str2[i++];
- if (i++ <l2) temp += QChar(0x003E);
+ while(i<l2 && str2[i]!=TQChar(0x003E)) temp += str2[i++];
+ if (i++ <l2) temp += TQChar(0x003E);
s2.append(temp);
temp.truncate(0);
}
@@ -165,15 +165,15 @@ QString wordDiff(const QString& str1, const QString& str2)
temp.truncate(0);
};
//FIXME bounds
- if (str2[i]==QChar(0x003C) && (str2[i+1]==QChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str2[i]==TQChar(0x003C) && (str2[i+1]==TQChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l2 && str2[i]!=QChar(0x003E)) temp += str2[i++];
- if (i++ <l2) temp += QChar(0x003E);
+ while(i<l2 && str2[i]!=TQChar(0x003E)) temp += str2[i++];
+ if (i++ <l2) temp += TQChar(0x003E);
s2.append(temp);
temp.truncate(0);
}
- while ( i<l2 && !(str2[i].isLetter() || str2[i]==QChar(0x003C)) )
+ while ( i<l2 && !(str2[i].isLetter() || str2[i]==TQChar(0x003C)) )
{
temp += str2[i++];
}
@@ -199,7 +199,7 @@ QString wordDiff(const QString& str1, const QString& str2)
while ( i<l1 && !str1[i].isLetter() )
{
- s1.append(QString(str1[i++]));
+ s1.append(TQString(str1[i++]));
}
}
@@ -218,7 +218,7 @@ QString wordDiff(const QString& str1, const QString& str2)
while ( i<l2 && !str2[i].isLetter() )
{
- s2.append(QString(str2[i++]));
+ s2.append(TQString(str2[i++]));
}
}
@@ -228,14 +228,14 @@ QString wordDiff(const QString& str1, const QString& str2)
uint mT = mX+1;
uint nT = nY+1;
- QValueVector<LCSMarker> b(mT*nT, NOTHING);
- QValueVector<uint> c(mT*nT, 0);
+ TQValueVector<LCSMarker> b(mT*nT, NOTHING);
+ TQValueVector<uint> c(mT*nT, 0);
// calculate the LCS
b[0] = FINAL;
uint index_cache;
- QStringList::iterator it1, it2;
+ TQStringList::iterator it1, it2;
for (i=1, it1 = s1.begin(); i<mT; ++i, ++it1)
{
@@ -295,7 +295,7 @@ QString wordDiff(const QString& str1, const QString& str2)
/*
// old algorithm by Wolfram Diestel <wolfram@steloj.de>
-QString Diff::charDiff(QString s1, QString s2)
+TQString Diff::charDiff(TQString s1, TQString s2)
{
int n = 3;
s1+="xxx";
@@ -305,7 +305,7 @@ QString Diff::charDiff(QString s1, QString s2)
int pos2=0;
int len1 = s1.length();
int len2 = s2.length();
- QString resultstr;
+ TQString resultstr;
bool found = true;
bool swap = false;
while (found && pos1+n < len1 && pos2+n < len2)
@@ -346,7 +346,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
@@ -375,7 +375,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
@@ -427,7 +427,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
diff --git a/kbabel/common/diff.h b/kbabel/common/diff.h
index 4e7dfb72..2ce055bf 100644
--- a/kbabel/common/diff.h
+++ b/kbabel/common/diff.h
@@ -35,8 +35,8 @@
#ifndef DIFF_H
#define DIFF_H
-#include <qvaluevector.h>
-#include <qstringlist.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
typedef enum
{
@@ -54,7 +54,7 @@ typedef enum
* @short Word-by-word diff algorithm
* @author Nick Shaforostoff <shafff@ukr.net>
*/
- QString wordDiff(const QString& oldString, const QString& newString);
+ TQString wordDiff(const TQString& oldString, const TQString& newString);
/**
@@ -66,22 +66,22 @@ typedef enum
class LCSprinter
{
public:
- LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector<LCSMarker>* b_, const uint nT_, uint index);
+ LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector<LCSMarker>* b_, const uint nT_, uint index);
void printLCS(uint index);
- inline QString getString();
+ inline TQString getString();
~LCSprinter() {};
private:
- QStringList s1, s2, resultString;
+ TQStringList s1, s2, resultString;
uint nT;//for use 1d vector as 2d
- QValueVector<LCSMarker> *b;
- QStringList::iterator it1, it2;
+ TQValueVector<LCSMarker> *b;
+ TQStringList::iterator it1, it2;
};
-inline QString LCSprinter::getString()
+inline TQString LCSprinter::getString()
{
- return resultString.join("").replace(QChar('\n'), ""); //w/o replace we'd get whole line colored
+ return resultString.join("").replace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
}
#endif // DIFF_H
diff --git a/kbabel/common/editcmd.cpp b/kbabel/common/editcmd.cpp
index 1643ed0b..4ea98364 100644
--- a/kbabel/common/editcmd.cpp
+++ b/kbabel/common/editcmd.cpp
@@ -31,7 +31,7 @@
**************************************************************************** */
#include "editcmd.h"
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
@@ -49,7 +49,7 @@ EditCommand::EditCommand(const int index, const Part part)
// have to handle deletion of current selection
-DelTextCmd::DelTextCmd(int _offset, const QString &_str, int _pluralNumber )
+DelTextCmd::DelTextCmd(int _offset, const TQString &_str, int _pluralNumber )
: EditCommand(),
offset( _offset ),
str ( _str ),
@@ -68,7 +68,7 @@ bool DelTextCmd::merge( EditCommand* other)
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
DelTextCmd* o = (DelTextCmd*) other;
- if ( offset + int(str.length()) == o->offset && !str.contains(QRegExp("^\\s$")) )
+ if ( offset + int(str.length()) == o->offset && !str.contains(TQRegExp("^\\s$")) )
{
o->str.prepend( str );
o->offset = offset;
@@ -80,7 +80,7 @@ bool DelTextCmd::merge( EditCommand* other)
-InsTextCmd::InsTextCmd(int offset,const QString &str, int pluralNumber )
+InsTextCmd::InsTextCmd(int offset,const TQString &str, int pluralNumber )
: DelTextCmd( offset, str, pluralNumber )
{
}
@@ -95,7 +95,7 @@ bool InsTextCmd::merge( EditCommand* other)
if ( o->index()==index() && o->part() == part()
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
- if ( offset == o->offset + int(o->str.length()) && !str.contains(QRegExp("^\\s$")) )
+ if ( offset == o->offset + int(o->str.length()) && !str.contains(TQRegExp("^\\s$")) )
{
o->str += str;
return true;
diff --git a/kbabel/common/editcmd.h b/kbabel/common/editcmd.h
index 458d2c57..64bd4b93 100644
--- a/kbabel/common/editcmd.h
+++ b/kbabel/common/editcmd.h
@@ -34,7 +34,7 @@
#include "itempart.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
namespace KBabel
@@ -87,11 +87,11 @@ class KDE_EXPORT DelTextCmd : public EditCommand
{
public:
int offset;
- QString str;
+ TQString str;
int pluralNumber;
// have to handle deletion of current selection
- DelTextCmd(int offset, const QString &str, int pluralNumber );
+ DelTextCmd(int offset, const TQString &str, int pluralNumber );
virtual Commands type() const { return Delete; }
bool merge( EditCommand* other);
@@ -101,7 +101,7 @@ class KDE_EXPORT InsTextCmd : public DelTextCmd
{
public:
- InsTextCmd(int offset,const QString &str, int pluralNumber );
+ InsTextCmd(int offset,const TQString &str, int pluralNumber );
virtual Commands type() const { return Insert; }
bool merge( EditCommand* other);
diff --git a/kbabel/common/exportplugin.cpp b/kbabel/common/exportplugin.cpp
index 99a727f8..327e85d0 100644
--- a/kbabel/common/exportplugin.cpp
+++ b/kbabel/common/exportplugin.cpp
@@ -33,7 +33,7 @@
#include "catalogfileplugin.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <ktrader.h>
@@ -45,7 +45,7 @@ struct KBabel::CatalogExportPluginPrivate
bool _stop;
};
-CatalogExportPlugin::CatalogExportPlugin(QObject* parent, const char* name) : QObject(parent,name)
+CatalogExportPlugin::CatalogExportPlugin(TQObject* parent, const char* name) : TQObject(parent,name)
{
d = new CatalogExportPluginPrivate;
d->_stop=false;
@@ -56,9 +56,9 @@ CatalogExportPlugin::~CatalogExportPlugin()
delete d;
}
-QStringList CatalogExportPlugin::availableExportMimeTypes()
+TQStringList CatalogExportPlugin::availableExportMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Export]");
diff --git a/kbabel/common/findoptions.h b/kbabel/common/findoptions.h
index 45c29e25..4b5f94a9 100644
--- a/kbabel/common/findoptions.h
+++ b/kbabel/common/findoptions.h
@@ -35,7 +35,7 @@
#ifndef FINDOPTIONS_H
#define FINDOPTIONS_H
-#include <qregexp.h>
+#include <tqregexp.h>
class QString;
class QChar;
@@ -46,7 +46,7 @@ namespace KBabel
class FindOptions
{
public:
- QString findStr;
+ TQString findStr;
bool caseSensitive;
bool wholeWords;
@@ -69,15 +69,15 @@ public:
// these are non-persistent options - not saved into configuration database
bool askFile; // whether findNext should ask catalog manager for next file
- QRegExp contextInfo; // actual settings of context info regular expression
- QChar accelMarker; // actual settings of accelerator marker
+ TQRegExp contextInfo; // actual settings of context info regular expression
+ TQChar accelMarker; // actual settings of accelerator marker
};
class ReplaceOptions : public FindOptions
{
public:
- QString replaceStr;
+ TQString replaceStr;
bool ask;
};
diff --git a/kbabel/common/importplugin.cpp b/kbabel/common/importplugin.cpp
index d763e670..711d77cd 100644
--- a/kbabel/common/importplugin.cpp
+++ b/kbabel/common/importplugin.cpp
@@ -36,14 +36,14 @@
#include "catalog.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <ktrader.h>
using namespace KBabel;
-CatalogImportPlugin::CatalogImportPlugin(QObject* parent, const char* name) : QObject(parent,name)
+CatalogImportPlugin::CatalogImportPlugin(TQObject* parent, const char* name) : TQObject(parent,name)
{
d = new CatalogImportPluginPrivate;
d->_catalog = 0;
@@ -64,7 +64,7 @@ void CatalogImportPlugin::appendCatalogItem( const CatalogItem& item, const bool
d->_entries.append(item);
}
-void CatalogImportPlugin::setCatalogExtraData( const QStringList& data )
+void CatalogImportPlugin::setCatalogExtraData( const TQStringList& data )
{
d->_catalogExtraData=data;
d->_updateCatalogExtraData=true;
@@ -76,13 +76,13 @@ void CatalogImportPlugin::setGeneratedFromDocbook( const bool generated )
d->_updateGeneratedFromDocbook = true;
}
-void CatalogImportPlugin::setErrorIndex(const QValueList<uint>& errors)
+void CatalogImportPlugin::setErrorIndex(const TQValueList<uint>& errors)
{
d->_errorList = errors;
d->_updateErrorList = true;
}
-void CatalogImportPlugin::setFileCodec(QTextCodec* codec)
+void CatalogImportPlugin::setFileCodec(TQTextCodec* codec)
{
d->_codec=codec;
d->_updateCodec = true;
@@ -94,12 +94,12 @@ void CatalogImportPlugin::setHeader( const CatalogItem& item )
d->_updateHeader=true;
}
-void CatalogImportPlugin::setMimeTypes( const QString& mimetypes )
+void CatalogImportPlugin::setMimeTypes( const TQString& mimetypes )
{
d->_mimeTypes=mimetypes;
}
-ConversionStatus CatalogImportPlugin::open(const QString& file, const QString& mimetype, Catalog* catalog)
+ConversionStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog)
{
d->_stopped=false;
d->_catalog=catalog;
@@ -138,9 +138,9 @@ void CatalogImportPlugin::commitTransaction()
d->_catalog->clear();
// fill in the entries
- QValueVector<CatalogItem> e;
+ TQValueVector<CatalogItem> e;
e.reserve( d->_entries.count() );
- for( QValueList<CatalogItem>::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
+ for( TQValueList<CatalogItem>::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
{
e.append( *it );
}
@@ -167,9 +167,9 @@ void CatalogImportPlugin::commitTransaction()
d->_started = false;
}
-QStringList CatalogImportPlugin::availableImportMimeTypes()
+TQStringList CatalogImportPlugin::availableImportMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Import]");
diff --git a/kbabel/common/importplugin_private.h b/kbabel/common/importplugin_private.h
index 3c45919c..bff1ed90 100644
--- a/kbabel/common/importplugin_private.h
+++ b/kbabel/common/importplugin_private.h
@@ -48,14 +48,14 @@ public:
bool _started;
bool _stopped;
- QValueList<CatalogItem> _entries;
- QValueList<CatalogItem> _obsoleteEntries;
+ TQValueList<CatalogItem> _entries;
+ TQValueList<CatalogItem> _obsoleteEntries;
CatalogItem _header;
bool _generatedFromDocbook;
- QTextCodec* _codec;
- QValueList<uint> _errorList;
- QStringList _catalogExtraData;
- QString _mimeTypes;
+ TQTextCodec* _codec;
+ TQValueList<uint> _errorList;
+ TQStringList _catalogExtraData;
+ TQString _mimeTypes;
bool _updateHeader;
bool _updateGeneratedFromDocbook;
diff --git a/kbabel/common/kbabeldatatool.h b/kbabel/common/kbabeldatatool.h
index 57d9f771..207f8bc5 100644
--- a/kbabel/common/kbabeldatatool.h
+++ b/kbabel/common/kbabeldatatool.h
@@ -49,13 +49,13 @@ class KBabelDataTool: public KDataTool
Q_OBJECT
protected:
- KBabelDataTool( QObject* parent, const char* name ) : KDataTool( parent, name ) {}
+ KBabelDataTool( TQObject* parent, const char* name ) : KDataTool( parent, name ) {}
public slots:
/** The only method to be redefined in inherited classes.
* This method is called everytime the settings are changed.
* @param project is ID of the project, for which the settings changed.
*/
- virtual void settingsChanged(const QString &project) = 0;
+ virtual void settingsChanged(const TQString &project) = 0;
};
}
diff --git a/kbabel/common/kbmailer.cpp b/kbabel/common/kbmailer.cpp
index fb3ab3b1..0526bd74 100644
--- a/kbabel/common/kbmailer.cpp
+++ b/kbabel/common/kbmailer.cpp
@@ -33,11 +33,11 @@
**************************************************************************** */
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kio/netaccess.h>
@@ -53,7 +53,7 @@
using namespace KBabel;
-KBabelMailer::KBabelMailer( QWidget* parent, Project::Ptr project)
+KBabelMailer::KBabelMailer( TQWidget* parent, Project::Ptr project)
: _project( project ), m_parent( parent )
{
m_tempDir.setAutoDelete( true );
@@ -65,12 +65,12 @@ KBabelMailer::~KBabelMailer()
saveConfig( );
}
-void KBabelMailer::sendOneFile(const QString& fileName)
+void KBabelMailer::sendOneFile(const TQString& fileName)
{
if (!singleFileCompression) {
kapp->invokeMailer("", "", "", "", "", "", fileName);
} else {
- const QString archive ( createArchive( QStringList( fileName ), QFileInfo( fileName ).baseName() ) );
+ const TQString archive ( createArchive( TQStringList( fileName ), TQFileInfo( fileName ).baseName() ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
@@ -91,13 +91,13 @@ void KBabelMailer::sendOneFile( const KURL& url)
}
if (!singleFileCompression) {
- QString fileName( url.filename() );
+ TQString fileName( url.filename() );
if ( fileName.isEmpty() )
{
fileName = "attachment";
}
// ### TODO: the current implementation has the default to possibly overwrite an already existing temporary file
- QString tempName( m_tempDir.name() );
+ TQString tempName( m_tempDir.name() );
tempName += fileName;
if ( KIO::NetAccess::download( url, tempName, m_parent ) )
kapp->invokeMailer("", "", "", "", "", "", fileName);
@@ -108,47 +108,47 @@ void KBabelMailer::sendOneFile( const KURL& url)
}
else
{
- const QString archive ( createArchive( QStringList( url.url() ), url.filename() ) );
+ const TQString archive ( createArchive( TQStringList( url.url() ), url.filename() ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
}
}
-void KBabelMailer::sendFiles(QStringList fileList, const QString& initialName)
+void KBabelMailer::sendFiles(TQStringList fileList, const TQString& initialName)
{
- const QString archive ( createArchive( fileList, initialName ) );
+ const TQString archive ( createArchive( fileList, initialName ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
}
-QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
+TQString KBabelMailer::createArchive(TQStringList fileList, TQString initialName)
{
if ( m_tempDir.name().isEmpty() )
{
kdWarning() << "KBabelMailer has not a valid temporary directory!" << endl;
- return QString(); // No temporary directory!
+ return TQString(); // No temporary directory!
}
// do nothing if there are no files in the list
if (fileList.empty())
- return QString::null;
+ return TQString::null;
// determine the name of the archive, do nothing if none is given
// or Cancel was pressed
- initialName = ( initialName.isEmpty() ? QString("translations") : initialName );
+ initialName = ( initialName.isEmpty() ? TQString("translations") : initialName );
bool ok = false;
- QStringList list( archiveList );
+ TQStringList list( archiveList );
list.prepend( initialName );
- QString archiveName ( KInputDialog::getItem( i18n("Save"),
+ TQString archiveName ( KInputDialog::getItem( i18n("Save"),
i18n( "Enter the name of the archive without file extension" ),
archiveList, 0, true, &ok, m_parent ) );
if ( !ok || archiveName.isEmpty() )
- return QString();
+ return TQString();
// file extensions are determined from the type of compression
- archiveName.remove( QRegExp( "\\.tar\\.(gz|bz2)$" ) );
+ archiveName.remove( TQRegExp( "\\.tar\\.(gz|bz2)$" ) );
// Update the list of archive names, keep only the ten most recent ones.
archiveList.remove( archiveName );
@@ -157,7 +157,7 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
archiveList.pop_back();
// set the correct extension and mimetype
- QString mimetype;
+ TQString mimetype;
if (bzipCompression) {
archiveName += ".tar.bz2";
mimetype = "application/x-bzip2";
@@ -169,18 +169,18 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
return buildArchive (fileList, m_tempDir.name()+archiveName, mimetype, true);
}
-QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QString mimetype, bool remove)
+TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName, TQString mimetype, bool remove)
{
Q_UNUSED( remove );
// create a new archive
KTar archive(archiveName, mimetype);
if (!archive.open(IO_WriteOnly)) {
KMessageBox::error( m_parent, i18n("Error while trying to create archive file.") );
- return QString::null;
+ return TQString::null;
}
// add files to this archive
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = fileList.constBegin(); it != fileList.constEnd(); ++it) {
#if KDE_IS_VERSION( 3, 5, 0 )
// Try to get a local URL instead of a remote one
@@ -188,7 +188,7 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS
#else
const KURL url( KURL::fromPathOrURL( *it ) );
#endif
- QString poTempName;
+ TQString poTempName;
if ( !KIO::NetAccess::download( url, poTempName, m_parent ) ) {
KMessageBox::error( m_parent, i18n("Error while trying to read file %1.").arg( url.prettyURL() ) );
continue;
@@ -198,11 +198,11 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS
// but only if "PoBaseDir" in the config file is set and the files
// actually reside in one of its subdirectories. Else they are stored
// without relative path.
- QString poArchFileName = url.path();
+ TQString poArchFileName = url.path();
if (_poBaseDir.isEmpty( ) || poArchFileName.find(_poBaseDir) != 0)
- poArchFileName = QFileInfo( poArchFileName ).fileName();
+ poArchFileName = TQFileInfo( poArchFileName ).fileName();
else
- poArchFileName.remove( QRegExp( "^" + QRegExp::escape( _poBaseDir ) + "/?" ) );
+ poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) );
if ( !archive.addLocalFile( poTempName, poArchFileName ) )
{
KMessageBox::error( m_parent, i18n("Error while trying to copy file %1 into archive.").arg( url.prettyURL() ) );
diff --git a/kbabel/common/kbmailer.h b/kbabel/common/kbmailer.h
index 7df5ce9d..c83c9371 100644
--- a/kbabel/common/kbmailer.h
+++ b/kbabel/common/kbmailer.h
@@ -66,7 +66,7 @@ class KDE_EXPORT KBabelMailer
* @param project The project to be used.
* @since 1.11.2 (KDE 3.5.2): @p parent parameter
*/
- KBabelMailer( QWidget* parent, Project::Ptr project);
+ KBabelMailer( TQWidget* parent, Project::Ptr project);
virtual ~KBabelMailer();
/**
@@ -75,7 +75,7 @@ class KDE_EXPORT KBabelMailer
*
* @param fileName the name of the file to be sent.
*/
- void sendOneFile(const QString& fileName);
+ void sendOneFile(const TQString& fileName);
/**
* Send only one file as a mail attachment. The file can either be sent
* as a compressed or an uncompressed file.
@@ -91,13 +91,13 @@ class KDE_EXPORT KBabelMailer
* @param fileList contains the names of the files to be sent.
* @param initialName the possible name of the archive
*/
- void sendFiles(QStringList fileList, const QString& initialName = QString::null);
+ void sendFiles(TQStringList fileList, const TQString& initialName = TQString::null);
/**
* Sets the the PO files' base directory.
*
* @param dir the PO file base dir.
*/
- void setPOBaseDir(const QString& dir) { _poBaseDir = dir; }
+ void setPOBaseDir(const TQString& dir) { _poBaseDir = dir; }
/**
@@ -109,14 +109,14 @@ class KDE_EXPORT KBabelMailer
* name is queried.
*
* @return name of the archive if it was created successfully,
- * otherwise QString::null.
+ * otherwise TQString::null.
*/
- QString createArchive(QStringList fileList, QString initialName);
+ TQString createArchive(TQStringList fileList, TQString initialName);
/**
* Write the archive file.
*/
- QString buildArchive(QStringList fileList, QString fileName, QString mimetype, bool remove = true);
+ TQString buildArchive(TQStringList fileList, TQString fileName, TQString mimetype, bool remove = true);
private:
/**
* Read the config file to extract the values for compression
@@ -145,9 +145,9 @@ class KDE_EXPORT KBabelMailer
*/
bool singleFileCompression;
/**
- * This QStringList stores the recently used archive names.
+ * This TQStringList stores the recently used archive names.
*/
- QStringList archiveList;
+ TQStringList archiveList;
/**
* The project object.
*/
@@ -155,10 +155,10 @@ class KDE_EXPORT KBabelMailer
/**
* The path to the PO Base directory
*/
- QString _poBaseDir;
+ TQString _poBaseDir;
/// The parent widget
- QWidget* m_parent;
+ TQWidget* m_parent;
};
}
diff --git a/kbabel/common/kbproject.cpp b/kbabel/common/kbproject.cpp
index 38996b51..73ac9dbd 100644
--- a/kbabel/common/kbproject.cpp
+++ b/kbabel/common/kbproject.cpp
@@ -36,7 +36,7 @@
#include "kbprojectmanager.h"
#include "kbprojectsettings.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,15 +47,15 @@
namespace KBabel
{
-Project::Project( const QString& file ) :
- QObject ()
+Project::Project( const TQString& file ) :
+ TQObject ()
, _filename (file)
, _name (i18n("unnamed"))
, _valid (false)
, _config (NULL)
, _settings (NULL)
{
- QFileInfo info(file);
+ TQFileInfo info(file);
if(info.isDir())
return;
@@ -96,12 +96,12 @@ Project::Project( const QString& file ) :
// read the project name
_config->setGroup( "Project" );
- _name = _config->readEntry( "Name", QString() );
+ _name = _config->readEntry( "Name", TQString() );
if ( _name.isEmpty() )
_name = "Default-Project"; // set default project name
// ### FIXME: why is the Version number not written to the project file?
- if ( _config->readEntry( "Version", QString() ) != "1.0.1" )
+ if ( _config->readEntry( "Version", TQString() ) != "1.0.1" )
{
kdWarning() << "Old project format assumed" << endl;
@@ -266,7 +266,7 @@ MiscSettings Project::miscSettings ()
{
MiscSettings settings;
- QString temp=_settings->accelMarker();
+ TQString temp=_settings->accelMarker();
if(temp.length() > 0)
{
settings.accelMarker=temp[0];
diff --git a/kbabel/common/kbproject.h b/kbabel/common/kbproject.h
index 1e1ebc79..4c3d6fc7 100644
--- a/kbabel/common/kbproject.h
+++ b/kbabel/common/kbproject.h
@@ -33,7 +33,7 @@
#ifndef KBPROJECT_H
#define KBPROJECT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kconfig.h>
#include "catalogsettings.h"
@@ -43,19 +43,19 @@ namespace KBabel
{
class ProjectSettingsBase;
- class KDE_EXPORT Project : public QObject, public KShared
+ class KDE_EXPORT Project : public TQObject, public KShared
{
Q_OBJECT
public:
typedef KSharedPtr <Project> Ptr;
- Project( const QString& file );
+ Project( const TQString& file );
virtual ~Project ();
- QString filename () const { return _filename; }
- QString name () const { return _name; }
+ TQString filename () const { return _filename; }
+ TQString name () const { return _name; }
- void setName( const QString& name ) { _name = name; }
+ void setName( const TQString& name ) { _name = name; }
KConfig* config ();
/**
@@ -97,8 +97,8 @@ namespace KBabel
void signalSettingsChanged();
private:
- QString _filename;
- QString _name;
+ TQString _filename;
+ TQString _name;
bool _valid;
KSharedConfig::Ptr _config;
ProjectSettingsBase* _settings;
diff --git a/kbabel/common/kbprojectmanager.cpp b/kbabel/common/kbprojectmanager.cpp
index 048c530a..ab117c97 100644
--- a/kbabel/common/kbprojectmanager.cpp
+++ b/kbabel/common/kbprojectmanager.cpp
@@ -39,15 +39,15 @@
namespace KBabel
{
-QPtrList<Project> ProjectManager::p_list;
-QString ProjectManager::strDefaultProjectName = QString();
+TQPtrList<Project> ProjectManager::p_list;
+TQString ProjectManager::strDefaultProjectName = TQString();
-Project::Ptr ProjectManager::open( const QString& file )
+Project::Ptr ProjectManager::open( const TQString& file )
{
kdDebug() << k_funcinfo << " " << file << endl;
// TODO: ensure full path
// TODO: isn't a map better?
- for(QPtrList<Project>::ConstIterator it = p_list.constBegin();
+ for(TQPtrList<Project>::ConstIterator it = p_list.constBegin();
it != p_list.constEnd(); ++it)
{
if ((*it)->filename() == file)
@@ -77,7 +77,7 @@ void ProjectManager::close( Project::Ptr project)
project->config()->sync();
}
-QString ProjectManager::defaultProjectName( void )
+TQString ProjectManager::defaultProjectName( void )
{
if ( strDefaultProjectName.isEmpty() )
strDefaultProjectName = locateLocal("config", "kbabel.defaultproject" );
diff --git a/kbabel/common/kbprojectmanager.h b/kbabel/common/kbprojectmanager.h
index 418183bb..abfce3e4 100644
--- a/kbabel/common/kbprojectmanager.h
+++ b/kbabel/common/kbprojectmanager.h
@@ -33,8 +33,8 @@
#ifndef KBPROJECTMANAGER_H
#define KBPROJECTMANAGER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
#include "kbproject.h"
@@ -45,16 +45,16 @@ namespace KBabel
class KDE_EXPORT ProjectManager
{
public:
- static Project::Ptr open( const QString& file );
+ static Project::Ptr open( const TQString& file );
static void close( Project::Ptr project );
static Project::Ptr create();
- static QString defaultProjectName( void );
+ static TQString defaultProjectName( void );
friend class Project;
private:
static void remove (Project*);
- static QPtrList<Project> p_list;
- static QString strDefaultProjectName;
+ static TQPtrList<Project> p_list;
+ static TQString strDefaultProjectName;
};
}
diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp
index ef8ca895..61525a2f 100644
--- a/kbabel/common/msgfmt.cpp
+++ b/kbabel/common/msgfmt.cpp
@@ -35,33 +35,33 @@
#include <kapplication.h>
#include <kprocess.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <stdlib.h>
using namespace KBabel;
-Msgfmt::Msgfmt(QObject* parent,const char* name)
- : QObject(parent , name)
+Msgfmt::Msgfmt(TQObject* parent,const char* name)
+ : TQObject(parent , name)
{
}
-Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
+Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu)
{
Status stat=Ok;
// this method does not return the right retrun values at the moment :-(
KProcess proc;
- connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)),
- this,SLOT(addToOutput(KProcess*,char *, int )));
- connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)),
- this,SLOT(addToOutput(KProcess*,char *, int)));
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int )));
+ connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int)));
// remove last output
_output="";
@@ -80,7 +80,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@@ -92,7 +92,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
return stat;
}
-Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& output)
+Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output)
{
Status stat=Ok;
@@ -100,10 +100,10 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
KProcess proc;
proc.setUseShell(true);
- connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)),
- this,SLOT(addToOutput(KProcess*,char *, int )));
- connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)),
- this,SLOT(addToOutput(KProcess*,char *, int)));
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int )));
+ connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int)));
// remove last output
_output="";
@@ -117,7 +117,7 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@@ -133,13 +133,13 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
void Msgfmt::addToOutput(KProcess*,char *buffer, int buflen)
{
- QString newString = QString::fromLocal8Bit(buffer, buflen);
+ TQString newString = TQString::fromLocal8Bit(buffer, buflen);
_output+=newString;
}
-QString Msgfmt::tempSaveName()
+TQString Msgfmt::tempSaveName()
{
return kapp->tempSaveName("/tmp/kbabel_msgfmt.po");
}
diff --git a/kbabel/common/msgfmt.h b/kbabel/common/msgfmt.h
index bf983b2f..846501c1 100644
--- a/kbabel/common/msgfmt.h
+++ b/kbabel/common/msgfmt.h
@@ -33,7 +33,7 @@
#ifndef MSGFMT_H
#define MSGFMT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
class KProcess;
@@ -47,17 +47,17 @@ class KDE_EXPORT Msgfmt : private QObject
Q_OBJECT
public:
enum Status{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported};
- Msgfmt(QObject* parent=0,const char* name=0);
+ Msgfmt(TQObject* parent=0,const char* name=0);
- Status checkSyntax(QString file,QString& output, bool gnu = false);
- Status checkSyntaxInDir(QString dir,QString regexp,QString& output);
+ Status checkSyntax(TQString file,TQString& output, bool gnu = false);
+ Status checkSyntaxInDir(TQString dir,TQString regexp,TQString& output);
private slots:
void addToOutput(KProcess*,char *buffer, int buflen);
private:
- static QString tempSaveName();
- QString _output;
+ static TQString tempSaveName();
+ TQString _output;
};
}
diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp
index b7beba7d..68e13da8 100644
--- a/kbabel/common/poinfo.cpp
+++ b/kbabel/common/poinfo.cpp
@@ -42,13 +42,13 @@
#include <kstandarddirs.h>
#include <ksavefile.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include "libgettext/pofiles.h"
#include "libgettext/tokens.h"
@@ -61,10 +61,10 @@ using namespace KBabel;
struct poInfoCacheItem
{
PoInfo info;
- QDateTime lastModified;
+ TQDateTime lastModified;
};
-inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item )
+inline TQDataStream& operator << ( TQDataStream& stream, poInfoCacheItem* item )
{
// Note: if you change anything here, do not forget to increase the #define POINFOCACHE_VERSION
stream << item->info.total;
@@ -84,7 +84,7 @@ inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item )
return stream;
}
-inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item )
+inline TQDataStream& operator >> ( TQDataStream& stream, poInfoCacheItem* item )
{
stream >> item->info.total;
stream >> item->info.fuzzy;
@@ -104,10 +104,10 @@ inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item )
}
// Cache of PO-file items
-static QDict<poInfoCacheItem> _poInfoCache;
+static TQDict<poInfoCacheItem> _poInfoCache;
// File name of cache
-static QString _poInfoCacheName;
+static TQString _poInfoCacheName;
// flag to stop current reading
bool PoInfo::stopStaticRead;
@@ -117,9 +117,9 @@ bool PoInfo::_gettextPluralForm;
// Note: We only read the cache file if the data seems usable. If not, we will re-generate the data.
void PoInfo::cacheRead()
{
- QFile cacheFile( _poInfoCacheName );
+ TQFile cacheFile( _poInfoCacheName );
if( cacheFile.open( IO_ReadOnly ) ) {
- QDataStream s( &cacheFile );
+ TQDataStream s( &cacheFile );
// Check the file cache version.
// If it is not the current version, we do not read the cache file
@@ -132,13 +132,13 @@ void PoInfo::cacheRead()
}
/*
- * Check the version of the QDataStream with which the cache file was written
+ * Check the version of the TQDataStream with which the cache file was written
*
* If the cache file was written by an incompatible future version of Qt,
* the cache file will not be read.
*
* On the other side, a cache file written by a previous version of Qt can be read,
- * by setting the version of the QDataStream used.
+ * by setting the version of the TQDataStream used.
*/
Q_INT32 qdatastreamVersion;
s >> qdatastreamVersion;
@@ -146,12 +146,12 @@ void PoInfo::cacheRead()
s.setVersion( qdatastreamVersion );
}
else {
- // QDataStream version seems stupid, so abort
- kdDebug(KBABEL) << "Wrong QDataStream version: " << qdatastreamVersion << endl;
+ // TQDataStream version seems stupid, so abort
+ kdDebug(KBABEL) << "Wrong TQDataStream version: " << qdatastreamVersion << endl;
return;
}
- QString url;
+ TQString url;
while( !s.atEnd() ) {
poInfoCacheItem* item = new poInfoCacheItem;
s >> url;
@@ -168,7 +168,7 @@ void PoInfo::cacheWrite()
// (especially if two instances would write into the same cache file)
KSaveFile cacheFile( _poInfoCacheName );
- QDataStream* stream = cacheFile.dataStream();
+ TQDataStream* stream = cacheFile.dataStream();
if( stream ) {
@@ -182,9 +182,9 @@ void PoInfo::cacheWrite()
const Q_INT32 qdatastreamVersion = stream->version();
*stream << qdatastreamVersion;
- QDictIterator<poInfoCacheItem> it( _poInfoCache ); // iterator for dict
+ TQDictIterator<poInfoCacheItem> it( _poInfoCache ); // iterator for dict
for ( ; it.current(); ++it ) {
- if( QFile::exists( it.currentKey() ) ) {
+ if( TQFile::exists( it.currentKey() ) ) {
*stream << it.currentKey();
*stream << it.current();
}
@@ -194,12 +194,12 @@ void PoInfo::cacheWrite()
}
}
else {
- kdWarning(KBABEL) << "Could not create QDataStream for cache file: " << _poInfoCacheName << endl;
+ kdWarning(KBABEL) << "Could not create TQDataStream for cache file: " << _poInfoCacheName << endl;
cacheFile.abort();
}
}
-bool PoInfo::cacheFind(const QString url, PoInfo& info)
+bool PoInfo::cacheFind(const TQString url, PoInfo& info)
{
// Read cache if it has not been read, and set up post routine to write it
static bool _cacheIsRead = false;
@@ -211,7 +211,7 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info)
poInfoCacheItem *item = _poInfoCache.find( url );
if( item ) {
- QFileInfo fi( url );
+ TQFileInfo fi( url );
if( fi.lastModified() == item->lastModified ) {
info = item->info;
@@ -221,29 +221,29 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info)
return false;
}
-void PoInfo::cacheSave(const QString url, PoInfo& info)
+void PoInfo::cacheSave(const TQString url, PoInfo& info)
{
poInfoCacheItem *item = new poInfoCacheItem;
- QFileInfo fi( url );
+ TQFileInfo fi( url );
item->info = info;
item->lastModified = fi.lastModified();
_poInfoCache.insert( url, item );
}
-QTextCodec* PoInfo::codecForFile(QString gettextHeader)
+TQTextCodec* PoInfo::codecForFile(TQString gettextHeader)
{
- QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
+ TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
if( regexp.search(gettextHeader) == -1 )
{
kdDebug(KBABEL) << "no charset entry found" << endl;
return 0;
}
- const QString charset = regexp.cap(1);
+ const TQString charset = regexp.cap(1);
kdDebug(KBABEL) << "charset: " << charset << endl;
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -252,27 +252,27 @@ QTextCodec* PoInfo::codecForFile(QString gettextHeader)
// at least utf8, so utf8-codec can be used for both.
if( charset == "CHARSET")
{
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf8 encoding.")
+ << TQString("file seems to be a template: using utf8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
}
if(!codec)
{
kdWarning(KBABEL) << "charset found, but no codec available, using UTF8 instead" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
}
else
{
// No charset? So it is probably ASCII, therefore UTF-8
kdWarning(KBABEL) << "No charset defined! Assuming UTF-8!" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
return codec;
@@ -285,12 +285,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
// Note that the "line" defined by the \n can be different than the line of the file.
// We join all lines of the header and then split the result again at the \n sequence
- const QStringList header=QStringList::split("\\n",headerItem.msgstrAsList().join(QString()));
+ const TQStringList header=TQStringList::split("\\n",headerItem.msgstrAsList().join(TQString()));
PoInfo info;
// extract information from the header
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
// The header of a Gettext .po file is consisted of lines of key and value
for(it=header.begin();it!=header.end();++it)
@@ -301,8 +301,8 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
if (res>=0)
{
knownKey=true; // We know most keys, if not it will be changed to false in the "else" case
- const QString key=(*it).left(res).simplifyWhiteSpace();
- QString value=(*it).mid(res+1);
+ const TQString key=(*it).left(res).simplifyWhiteSpace();
+ TQString value=(*it).mid(res+1);
// "Chop" the \n at the end
if (value.endsWith("\\n"))
value.remove(value.length()-2,2); // ### Qt4: use value.chop(2)
@@ -332,7 +332,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
}
if (!knownKey)
{
- QString line=(*it);
+ TQString line=(*it);
if(line.right(2)=="\\n")
line.remove(line.length()-2,2); // ### Qt4: use value.chop(2)
@@ -350,28 +350,28 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
}
-ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive)
+ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive)
{
return PoInfo::info( url, info, wordList, updateWordList, interactive, true);
}
-ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
+ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
{
stopStaticRead = false;
if( !updateWordList && PoInfo::cacheFind( url, info ) )
return OK;
- QString target;
+ TQString target;
if(KIO::NetAccess::download(KURL( url ), target, 0))
{
- QFile file(target);
+ TQFile file(target);
if ( msgfmt )
{
// First check file with msgfmt to be sure, it is syntactically correct
Msgfmt msgfmt;
- QString output;
+ TQString output;
Msgfmt::Status stat = msgfmt.checkSyntax( target , output );
if(stat == Msgfmt::SyntaxError)
{
@@ -422,7 +422,7 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
if( temp.isFuzzy() ) temp.removeFuzzy();
//find out the codec
- QTextCodec* codec = codecForFile( temp.msgstr().first() );
+ TQTextCodec* codec = codecForFile( temp.msgstr().first() );
if( !codec ) return PARSE_ERROR;
// convert from UTF-8 using codec
@@ -447,27 +447,27 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
if( updateWordList )
{
// FIXME: should care about plural forms in msgid
- QString st = temp.msgid().first().simplifyWhiteSpace().lower();
- QStringList sl = QStringList::split( ' ', st );
+ TQString st = temp.msgid().first().simplifyWhiteSpace().lower();
+ TQStringList sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower();
- sl = QStringList::split( ' ', st );
+ sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.comment().simplifyWhiteSpace().lower();
- sl = QStringList::split( ' ', st );
+ sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
@@ -504,12 +504,12 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
return OK;
}
-bool PoInfo::findInFile( const QString& url, FindOptions options )
+bool PoInfo::findInFile( const TQString& url, FindOptions options )
{
enum {Begin, Comment, Msgid, Msgstr, Msgctxt} part = Begin;
stopStaticRead = false;
- QString target;
+ TQString target;
if(KIO::NetAccess::download(KURL( url ), target, 0))
{
std::ifstream* stream = new std::ifstream( target.local8Bit());
@@ -523,8 +523,8 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
// prepare the search
- QString searchStr = options.findStr;
- QRegExp regexp( searchStr );
+ TQString searchStr = options.findStr;
+ TQRegExp regexp( searchStr );
if( options.isRegExp )
regexp.setCaseSensitive( options.caseSensitive );
@@ -540,14 +540,14 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
return false; // header is not at the beginning, broken file
}
- QTextCodec* codec = codecForFile( temp.msgstr().first() );
+ TQTextCodec* codec = codecForFile( temp.msgstr().first() );
if( !codec )
{
return false;
}
// now parse the rest of the file
- QString text;
+ TQString text;
int pos,len;
while(lexer->lastToken != T_EOF)
@@ -565,10 +565,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
{
if( options.wholeWords) {
len = searchStr.length();
- QString pre = text.mid(pos-1,1);
- QString post = text.mid(pos+len,1);
- if( !pre.contains( QRegExp("[a-zA-Z0-9]")) &&
- !post.contains( QRegExp("[a-zA-Z0-9]") )
+ TQString pre = text.mid(pos-1,1);
+ TQString post = text.mid(pos+len,1);
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -615,10 +615,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
{
if( options.wholeWords) {
len = searchStr.length();
- QString pre = text.mid(pos-1,1);
- QString post = text.mid(pos+len,1);
- if( !pre.contains( QRegExp("[a-zA-Z0-9]")) &&
- !post.contains( QRegExp("[a-zA-Z0-9]") )
+ TQString pre = text.mid(pos-1,1);
+ TQString post = text.mid(pos+len,1);
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -674,9 +674,9 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
// comment
if( lexer->lastToken == T_COMMENT )
{
- QString _comment = QString::fromUtf8(lexer->YYText());
+ TQString _comment = TQString::fromUtf8(lexer->YYText());
while( lexer->yylex() == T_COMMENT )
- _comment += "\n"+QString::fromUtf8(lexer->YYText());
+ _comment += "\n"+TQString::fromUtf8(lexer->YYText());
item.setComment( _comment );
// kdDebug(KBABEL) << "Comment: " << _comment << endl;
}
@@ -700,12 +700,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
if( lexer->lastToken != T_MSGID ) return PARSE_ERROR;
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgids = item.msgid();
- QStringList::Iterator it = msgids.begin();
- *it = QString::fromUtf8(lexer->YYText());
+ TQStringList msgids = item.msgid();
+ TQStringList::Iterator it = msgids.begin();
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
while( lexer->yylex() == T_STRING )
- (*it) += ("\n"+ QString::fromUtf8(lexer->YYText()) );
+ (*it) += ("\n"+ TQString::fromUtf8(lexer->YYText()) );
else {
if( lexer->yylex() == T_STRING ) // this is not header
{
@@ -721,12 +721,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
{
_gettextPluralForm = true;
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgids = item.msgid();
+ TQStringList msgids = item.msgid();
it = msgids.fromLast();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
while( lexer->yylex() == T_STRING )
- (*it)+="\n"+ QString::fromUtf8(lexer->YYText());
+ (*it)+="\n"+ TQString::fromUtf8(lexer->YYText());
else while( lexer->yylex() == T_STRING );
item.setMsgid( msgids );
// kdDebug(KBABEL) << "Msgid_plural: " << *it << endl;
@@ -739,12 +739,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgstrs = item.msgstr();
+ TQStringList msgstrs = item.msgstr();
it = msgstrs.begin();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText || item.msgid().first().isEmpty() ) // if we should store the text or it is a header
while( lexer->yylex() == T_STRING )
- (*it)+= ("\n"+ QString::fromUtf8(lexer->YYText()));
+ (*it)+= ("\n"+ TQString::fromUtf8(lexer->YYText()));
else
if( lexer->yylex() == T_STRING ) // check next token, whether it is really translated
{
@@ -756,21 +756,21 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
}
else
{
- QStringList msgstrs = item.msgstr();
- QString s = QString::fromUtf8(lexer->YYText());
- while( lexer->lastToken == T_MSGSTR && s.contains( QRegExp("^msgstr\\[[0-9]+\\]" ) ) )
+ TQStringList msgstrs = item.msgstr();
+ TQString s = TQString::fromUtf8(lexer->YYText());
+ while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
it = msgstrs.fromLast();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
do {
- (*it)+="\n"+QString::fromUtf8(lexer->YYText());
+ (*it)+="\n"+TQString::fromUtf8(lexer->YYText());
} while( lexer->yylex() == T_STRING );
else while( lexer->yylex() == T_STRING );
// kdDebug(KBABEL) << "Msgstr: " << *it << endl;
- s = QString::fromUtf8(lexer->YYText());
+ s = TQString::fromUtf8(lexer->YYText());
}
item.setMsgstr( msgstrs );
}
diff --git a/kbabel/common/poinfo.h b/kbabel/common/poinfo.h
index 21b8d72d..830d35eb 100644
--- a/kbabel/common/poinfo.h
+++ b/kbabel/common/poinfo.h
@@ -38,7 +38,7 @@
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
/**
* @brief File cache version number.
@@ -64,17 +64,17 @@ public:
int fuzzy;
int untranslated;
- QString project;
- QString creation;
- QString revision;
- QString lastTranslator;
- QString languageTeam;
- QString mimeVersion;
- QString contentType;
- QString encoding;
- QString others;
+ TQString project;
+ TQString creation;
+ TQString revision;
+ TQString lastTranslator;
+ TQString languageTeam;
+ TQString mimeVersion;
+ TQString contentType;
+ TQString encoding;
+ TQString others;
- QString headerComment;
+ TQString headerComment;
/**
* Find PO-file information in the cache.
@@ -83,7 +83,7 @@ public:
* @param info Returned cached information.
* @return true if found, false otherwise.
*/
- static bool cacheFind(const QString url, PoInfo& info);
+ static bool cacheFind(const TQString url, PoInfo& info);
/**
* Save PO-file information in the cache.
@@ -91,7 +91,7 @@ public:
* @param url The URL of the PO-file.
* @param info Information to save.
*/
- static void cacheSave(const QString url, PoInfo& info);
+ static void cacheSave(const TQString url, PoInfo& info);
/**
* @brief Get information about the PO file
@@ -105,7 +105,7 @@ public:
* being parsed?
* @since KBabel 1.11 (KDE 3.5)
*/
- static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt);
+ static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt);
/**
* @brief Get information about the PO file
@@ -121,10 +121,10 @@ public:
* KBabel 1.11.1 (KDE 3.5.1)
* @note This function always call Gettext's mgfmt before parsing each file
*/
- static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive = true);
+ static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true);
static PoInfo headerInfo(const CatalogItem&);
- static bool findInFile(const QString& url, FindOptions options );
+ static bool findInFile(const TQString& url, FindOptions options );
static bool stopStaticRead;
@@ -135,7 +135,7 @@ public:
*
* @return Codec for found charset or 0, if no information has been found
*/
- static QTextCodec* codecForFile(QString gettextHeader);
+ static TQTextCodec* codecForFile(TQString gettextHeader);
/**
* @brief Write the entire cache.
diff --git a/kbabel/common/projectsettings.cpp b/kbabel/common/projectsettings.cpp
index 3687c9d4..3f8f47a3 100644
--- a/kbabel/common/projectsettings.cpp
+++ b/kbabel/common/projectsettings.cpp
@@ -35,16 +35,16 @@
#include "projectsettings.h"
#include "resources.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kspell.h>
-QString KBabel::Defaults::Spellcheck::ignoreURL()
+TQString KBabel::Defaults::Spellcheck::ignoreURL()
{
- QString _ignoreURL;
+ TQString _ignoreURL;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
@@ -89,7 +89,7 @@ int KBabel::Defaults::Spellcheck::spellClient()
return defaultsettings->client();
}
-QString KBabel::Defaults::Spellcheck::spellDictionary()
+TQString KBabel::Defaults::Spellcheck::spellDictionary()
{
if( ! defaultsettings )
{
@@ -109,9 +109,9 @@ int KBabel::Defaults::Spellcheck::spellEncoding()
return defaultsettings->encoding();
}
-QString KBabel::Defaults::CatalogManager::ignoreURL()
+TQString KBabel::Defaults::CatalogManager::ignoreURL()
{
- QString _ignoreURL;
+ TQString _ignoreURL;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
diff --git a/kbabel/common/projectsettings.h b/kbabel/common/projectsettings.h
index 186b21e5..49afc0a6 100644
--- a/kbabel/common/projectsettings.h
+++ b/kbabel/common/projectsettings.h
@@ -35,10 +35,10 @@
#ifndef PROJECTSETTINGS_H
#define PROJECTSETTINGS_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqcolor.h>
#include <kurl.h>
#include "catalogsettings.h"
@@ -54,10 +54,10 @@ struct SpellcheckSettings
bool runTogether;
int spellEncoding;
int spellClient;
- QString spellDict;
+ TQString spellDict;
bool rememberIgnored;
- QString ignoreURL;
+ TQString ignoreURL;
bool onFlySpellcheck;
@@ -66,17 +66,17 @@ struct SpellcheckSettings
struct CatManSettings
{
- QString poBaseDir;
- QString potBaseDir;
+ TQString poBaseDir;
+ TQString potBaseDir;
bool openWindow;
- QStringList dirCommands;
- QStringList dirCommandNames;
- QStringList fileCommands;
- QStringList fileCommandNames;
+ TQStringList dirCommands;
+ TQStringList dirCommandNames;
+ TQStringList fileCommands;
+ TQStringList fileCommandNames;
- QString ignoreURL;
+ TQString ignoreURL;
bool killCmdOnExit;
bool indexWords;
@@ -99,16 +99,16 @@ struct SourceContextSettings
* A path, which can be used as @CODEROOT@ variable in @ref sourcePaths .
* Defaults to empty string.
*/
- QString codeRoot;
+ TQString codeRoot;
/**
* List of paths, where the source file should be lookup. Can use @CODEROOT@ (replaced by @ref codeRoot),
* @PACKAGE@ (replaced by package name), @PACKAGEDIR@ (replaced by the
* longest known path of the package) and @COMMENTPATH@ (path extracted from comment specs.
*/
- QStringList sourcePaths;
+ TQStringList sourcePaths;
- void SourceContextSettins() { codeRoot = QString::null; sourcePaths.clear(); }
+ void SourceContextSettins() { codeRoot = TQString::null; sourcePaths.clear(); }
};
/**
@@ -120,11 +120,11 @@ namespace Defaults
class KDE_EXPORT Spellcheck
{
public:
- static QString ignoreURL();
+ static TQString ignoreURL();
static bool noRootAffix();
static bool runTogether();
static int spellClient();
- static QString spellDictionary();
+ static TQString spellDictionary();
static int spellEncoding();
private:
static KSpellConfig* defaultsettings;
@@ -133,7 +133,7 @@ namespace Defaults
class KDE_EXPORT CatalogManager
{
public:
- static QString ignoreURL();
+ static TQString ignoreURL();
};
}
diff --git a/kbabel/common/regexpextractor.cpp b/kbabel/common/regexpextractor.cpp
index b69398c6..058834ea 100644
--- a/kbabel/common/regexpextractor.cpp
+++ b/kbabel/common/regexpextractor.cpp
@@ -35,18 +35,18 @@
#include "regexpextractor.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
-RegExpExtractor::RegExpExtractor(const QStringList& regexps) :
+RegExpExtractor::RegExpExtractor(const TQStringList& regexps) :
_regExpList( regexps )
{
- _string=QString::null;
+ _string=TQString::null;
_matches.setAutoDelete(true);
}
-void RegExpExtractor::setString(QString string)
+void RegExpExtractor::setString(TQString string)
{
_string=string;
processString();
@@ -57,17 +57,17 @@ uint RegExpExtractor::countMatches()
return _matches.count();
}
-QString RegExpExtractor::firstMatch()
+TQString RegExpExtractor::firstMatch()
{
MatchedEntryInfo *ti = _matches.first();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::nextMatch()
+TQString RegExpExtractor::nextMatch()
{
MatchedEntryInfo *ti=_matches.next();
if(!ti)
@@ -76,16 +76,16 @@ QString RegExpExtractor::nextMatch()
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::match(uint tagnumber)
+TQString RegExpExtractor::match(uint tagnumber)
{
MatchedEntryInfo *ti=_matches.at(tagnumber);
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
int RegExpExtractor::matchIndex(uint tagnumber)
@@ -97,27 +97,27 @@ int RegExpExtractor::matchIndex(uint tagnumber)
return -1;
}
-QString RegExpExtractor::prevMatch()
+TQString RegExpExtractor::prevMatch()
{
MatchedEntryInfo *ti=_matches.prev();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::lastMatch()
+TQString RegExpExtractor::lastMatch()
{
MatchedEntryInfo *ti=_matches.last();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QStringList RegExpExtractor::matches()
+TQStringList RegExpExtractor::matches()
{
- QStringList list;
+ TQStringList list;
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti!=0; ti = _matches.next())
{
@@ -127,15 +127,15 @@ QStringList RegExpExtractor::matches()
return list;
}
-QString RegExpExtractor::plainString(bool keepPos)
+TQString RegExpExtractor::plainString(bool keepPos)
{
- QString tmp=_string;
+ TQString tmp=_string;
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti != 0; ti=_matches.next())
{
uint len=ti->extracted.length();
- QString s;
+ TQString s;
for(uint i=0; i<len; i++)
{
s+=' ';
@@ -151,9 +151,9 @@ QString RegExpExtractor::plainString(bool keepPos)
return tmp;
}
-QString RegExpExtractor::matchesReplaced(const QString& replace)
+TQString RegExpExtractor::matchesReplaced(const TQString& replace)
{
- QString tmp=_string;
+ TQString tmp=_string;
int posCorrection=0;
int replaceLen=replace.length();
@@ -177,20 +177,20 @@ void RegExpExtractor::processString()
// if there is no regexp to be matched, quit
if( regExpList().empty() ) return;
- QValueList<MatchedEntryInfo> tmpList;
+ TQValueList<MatchedEntryInfo> tmpList;
bool found=false;
- QString tmp=_string;
+ TQString tmp=_string;
do
{
found=false;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it=_regExpList.begin();it!=_regExpList.end();++it)
{
int pos=-1;
- QString tag;
+ TQString tag;
- QRegExp reg = QRegExp((*it));
+ TQRegExp reg = TQRegExp((*it));
pos = reg.search(tmp);
int len=reg.matchedLength();
@@ -208,7 +208,7 @@ void RegExpExtractor::processString()
ti.extracted=tag;
tmpList.append(ti);
- QString s;
+ TQString s;
for(uint i=0; i<tag.length(); i++)
{
s+=' ';
@@ -228,7 +228,7 @@ void RegExpExtractor::processString()
uint n= 0;
uint min=_string.length();
uint counter=0;
- QValueList<MatchedEntryInfo>::Iterator it;
+ TQValueList<MatchedEntryInfo>::Iterator it;
for(it=tmpList.begin();it!=tmpList.end();++it)
{
if((*it).index < min)
@@ -249,22 +249,22 @@ void RegExpExtractor::processString()
}
}
-QStringList RegExpExtractor::regExpList()
+TQStringList RegExpExtractor::regExpList()
{
return _regExpList;
}
-void RegExpExtractor::setRegExpList( const QStringList& regexps )
+void RegExpExtractor::setRegExpList( const TQStringList& regexps )
{
_regExpList = regexps;
}
-void RegExpExtractor::addRegExpIdentifier(QString regExp)
+void RegExpExtractor::addRegExpIdentifier(TQString regExp)
{
_regExpList.append(regExp);
}
-void RegExpExtractor::deleteRegExpIdentifier(QString regExp)
+void RegExpExtractor::deleteRegExpIdentifier(TQString regExp)
{
_regExpList.remove(regExp);
}
diff --git a/kbabel/common/regexpextractor.h b/kbabel/common/regexpextractor.h
index 89703fba..83ff8f60 100644
--- a/kbabel/common/regexpextractor.h
+++ b/kbabel/common/regexpextractor.h
@@ -34,11 +34,11 @@
#ifndef _REGEXP_EXTRACTOR_H_
#define _REGEXP_EXTRACTOR_H_
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include <kdemacros.h>
namespace KBabel
@@ -46,7 +46,7 @@ namespace KBabel
struct KDE_EXPORT MatchedEntryInfo{
uint index;
- QString extracted;
+ TQString extracted;
};
@@ -61,14 +61,14 @@ public:
/**
* Create a regexp extractor for "string"
*/
- RegExpExtractor(const QStringList& regexps);
+ RegExpExtractor(const TQStringList& regexps);
virtual ~RegExpExtractor() {}
/**
* Set the string of this extractor
*/
- void setString(QString string);
+ void setString(TQString string);
/**
* @return the number of matches found
@@ -79,17 +79,17 @@ public:
* @return the first match, and set the internal cursor to
* the beginning
*/
- QString firstMatch();
+ TQString firstMatch();
/**
* @return the next match and move cursor forward
*/
- QString nextMatch();
+ TQString nextMatch();
/**
* @return the n-th match. It also moves the cursor.
*/
- QString match(uint matchnumber);
+ TQString match(uint matchnumber);
/**
* @return the n-th match. It also moves the cursor. -1 is there
@@ -100,17 +100,17 @@ public:
/**
* @return the next match and move cursor forward
*/
- QString prevMatch();
+ TQString prevMatch();
/**
* @return the last match and move the cursor to the end
*/
- QString lastMatch();
+ TQString lastMatch();
/**
* @return a list of all matches
*/
- QStringList matches();
+ TQStringList matches();
/**
* @return the string without matched text
@@ -120,36 +120,36 @@ public:
* the matches are replaced with ' ' and therefore the position of the
* words will not change
*/
- QString plainString(bool keepPos=false);
+ TQString plainString(bool keepPos=false);
/**
* @return the string, where matches are replaced with the given string
*/
- QString matchesReplaced(const QString& replace);
+ TQString matchesReplaced(const TQString& replace);
//Functions that allow user to define his own regexps.
/**
* Add a regexp to the list of regexp identifier.
*/
- void addRegExpIdentifier(QString regexp);
+ void addRegExpIdentifier(TQString regexp);
/**
* Delete from the regexp list the regexp.
*/
- void deleteRegExpIdentifier(QString regexp);
+ void deleteRegExpIdentifier(TQString regexp);
- void setRegExpList( const QStringList& regexps );
+ void setRegExpList( const TQStringList& regexps );
- QStringList regExpList();
+ TQStringList regExpList();
protected:
void processString();
- QPtrList<MatchedEntryInfo> _matches;
- QString _string;
- QStringList _regExpList;
+ TQPtrList<MatchedEntryInfo> _matches;
+ TQString _string;
+ TQStringList _regExpList;
};
diff --git a/kbabel/common/stringdistance.cpp b/kbabel/common/stringdistance.cpp
index 32cb9b96..8de11c98 100644
--- a/kbabel/common/stringdistance.cpp
+++ b/kbabel/common/stringdistance.cpp
@@ -46,7 +46,7 @@ const int LevenshteinDistance::editCost_insert = 1;
const int LevenshteinDistance::editCost_delete = 1;
-double relativeDistance(double distance, const QString& left_string, const QString& right_string)
+double relativeDistance(double distance, const TQString& left_string, const TQString& right_string)
{
double maxsize=0;
double compsize=0;
@@ -63,7 +63,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri
* This function sums all the distances between all trees.
* For the calculation of the distance between two trees, it calls the function calculate.
*/
-double Distance::operator()(const QString& left_string, const QString& right_string)
+double Distance::operator()(const TQString& left_string, const TQString& right_string)
{
m_distance = 0.00;
if (left_string == right_string)
@@ -86,7 +86,7 @@ double Distance::operator()(const QString& left_string, const QString& right_str
/** This function calculates the distance between two nodes.
* For the calculation you can specify two variables gap & distance.
*/
-int Distance::nodeDistance(const QString& left_letter, const QString& right_letter)
+int Distance::nodeDistance(const TQString& left_letter, const TQString& right_letter)
{
if ( left_letter == right_letter )
{
@@ -105,7 +105,7 @@ int Distance::nodeDistance(const QString& left_letter, const QString& right_lett
* This function sums all the distances between all nodes.
* For the calculation you can specify the distance between two nodes in variable distance
*/
-double HammingDistance::calculate(const QString& left_string, const QString& right_string)
+double HammingDistance::calculate(const TQString& left_string, const TQString& right_string)
{
double hammingDistance = 0.00;
// if (debug > 0)
@@ -135,7 +135,7 @@ double HammingDistance::calculate(const QString& left_string, const QString& rig
* A matrice D is generated which represent the distribution of distances between two trees.
* The last element represent the Levenshtein-distance.
*/
-double LevenshteinDistance::calculate(const QString& left_string, const QString& right_string)
+double LevenshteinDistance::calculate(const TQString& left_string, const TQString& right_string)
{
// if (debug > 0)
// cout << left_string.length() << " " << right_string.length() << "\t";
diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h
index 6f5aa185..89c60627 100644
--- a/kbabel/common/stringdistance.h
+++ b/kbabel/common/stringdistance.h
@@ -34,7 +34,7 @@
#ifndef STRINGDISTANCE_H
#define STRINGDISTANCE_H
-#include <qstring.h>
+#include <tqstring.h>
//#include <boost/numeric/ublas/matrix.hpp>
@@ -69,20 +69,20 @@ class Distance : public NonCopyable
{
public:
virtual ~Distance(){}
- double operator()(const QString& left, const QString& right);
+ double operator()(const TQString& left, const TQString& right);
int editCostReplace() { return editCost_replace_base; }
static int debug;
protected:
- virtual double calculate(const QString& left_string, const QString& right_string) = 0;
- int nodeDistance(const QString& left_letter, const QString& right_letter);
+ virtual double calculate(const TQString& left_string, const TQString& right_string) = 0;
+ int nodeDistance(const TQString& left_letter, const TQString& right_letter);
static const int editCost_replace_base;
double m_distance;
};
-double relativeDistance(double distance, const QString& left_string, const QString right_string);
+double relativeDistance(double distance, const TQString& left_string, const TQString right_string);
/**
@@ -96,7 +96,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri
class HammingDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost; }
static const int editCost;
};
@@ -113,7 +113,7 @@ protected:
class LevenshteinDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost_replace; }
static const int editCost_replace;
static const int editCost_insert;
@@ -122,7 +122,7 @@ protected:
/** wrapper function for replacement of fstrcmp from gettext */
-inline double fstrcmp(const QString& left, const QString& right)
+inline double fstrcmp(const TQString& left, const TQString& right)
{
return LevenshteinDistance()(left,right);
}
diff --git a/kbabel/common/tagextractor.cpp b/kbabel/common/tagextractor.cpp
index 45b8ad9f..fded2703 100644
--- a/kbabel/common/tagextractor.cpp
+++ b/kbabel/common/tagextractor.cpp
@@ -40,13 +40,13 @@
using namespace KBabel;
-TagExtractor::TagExtractor() : RegExpExtractor(QStringList())
+TagExtractor::TagExtractor() : RegExpExtractor(TQStringList())
{
KConfig* config = KGlobal::config();
config->setGroup("Tags");
- QStringList s=config->readListEntry("TagExpressions");
+ TQStringList s=config->readListEntry("TagExpressions");
if( s.empty() ) s = Defaults::Tag::tagExpressions();
RegExpExtractor::setRegExpList(s);
diff --git a/kbabel/commonui/cmdedit.cpp b/kbabel/commonui/cmdedit.cpp
index bfe95293..07a35c2f 100644
--- a/kbabel/commonui/cmdedit.cpp
+++ b/kbabel/commonui/cmdedit.cpp
@@ -32,67 +32,67 @@
**************************************************************************** */
#include "cmdedit.h"
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
#include <kdialog.h>
-CmdEdit::CmdEdit(QWidget* parent, const char* name)
- : QWidget(parent,name)
+CmdEdit::CmdEdit(TQWidget* parent, const char* name)
+ : TQWidget(parent,name)
{
- QGridLayout* layout = new QGridLayout( this , 1 , 1 );
+ TQGridLayout* layout = new TQGridLayout( this , 1 , 1 );
layout->setSpacing( KDialog::spacingHint() );
- QLabel* nameLabel = new QLabel( i18n("Command &Label:"), this);
- QLabel* cmdLabel = new QLabel( i18n("Co&mmand:"), this);
+ TQLabel* nameLabel = new TQLabel( i18n("Command &Label:"), this);
+ TQLabel* cmdLabel = new TQLabel( i18n("Co&mmand:"), this);
layout->addWidget( nameLabel, 0 , 0 );
layout->addWidget( cmdLabel, 0 , 1 );
- _cmdNameEdit = new QLineEdit( this , "cmdNameEdit" );
+ _cmdNameEdit = new TQLineEdit( this , "cmdNameEdit" );
_cmdNameEdit->setMaxLength(20);
nameLabel->setBuddy(_cmdNameEdit);
layout->addWidget( _cmdNameEdit , 1 , 0 );
- _cmdEdit = new QLineEdit( this , "cmdEdit" );
+ _cmdEdit = new TQLineEdit( this , "cmdEdit" );
cmdLabel->setBuddy(_cmdEdit);
layout->addWidget( _cmdEdit , 1 , 1 );
- _addButton = new QPushButton( i18n("&Add"), this );
+ _addButton = new TQPushButton( i18n("&Add"), this );
_addButton->setEnabled(false);
layout->addWidget( _addButton , 1 , 2 );
- _editButton = new QPushButton( i18n("&Edit"), this );
+ _editButton = new TQPushButton( i18n("&Edit"), this );
_editButton->setEnabled(false);
layout->addWidget( _editButton , 3 , 2 );
- _removeButton = new QPushButton( i18n("&Remove"), this );
+ _removeButton = new TQPushButton( i18n("&Remove"), this );
_removeButton->setEnabled(false);
layout->addWidget( _removeButton , 4 , 2 );
- QHBoxLayout* hbox = new QHBoxLayout();
+ TQHBoxLayout* hbox = new TQHBoxLayout();
layout->addLayout(hbox,5,2);
- _upButton = new QToolButton(UpArrow,this);
+ _upButton = new TQToolButton(UpArrow,this);
_upButton->setFixedSize(20,20);
_upButton->setEnabled(false);
hbox->addWidget( _upButton );
- _downButton = new QToolButton(DownArrow,this);
+ _downButton = new TQToolButton(DownArrow,this);
_downButton->setFixedSize(20,20);
_downButton->setEnabled(false);
hbox->addWidget( _downButton);
- _commandNames = new QListBox( this , "commandNamesBox" );
+ _commandNames = new TQListBox( this , "commandNamesBox" );
_commandNames->setMinimumSize(100, 100);
layout->addMultiCellWidget( _commandNames , 3 , 6 , 0 , 0);
- _commands = new QListBox( this , "commandsBox" );
+ _commands = new TQListBox( this , "commandsBox" );
_commands->setMinimumSize(160, 100);
layout->addMultiCellWidget( _commands , 3 , 6 , 1 ,1 );
@@ -107,22 +107,22 @@ CmdEdit::CmdEdit(QWidget* parent, const char* name)
setMinimumSize(layout->sizeHint());
- connect(_addButton , SIGNAL(clicked()) , this , SLOT(addCmd()) ) ;
- connect(_editButton , SIGNAL(clicked()) , this , SLOT(editCmd()) );
- connect(_removeButton , SIGNAL(clicked()) , this , SLOT(removeCmd()) );
- connect(_upButton , SIGNAL(clicked()) , this , SLOT(upCmd()) ) ;
- connect(_downButton , SIGNAL(clicked()) , this , SLOT(downCmd()) );
+ connect(_addButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(addCmd()) ) ;
+ connect(_editButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(editCmd()) );
+ connect(_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(removeCmd()) );
+ connect(_upButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(upCmd()) ) ;
+ connect(_downButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(downCmd()) );
- connect(_commands , SIGNAL(highlighted(int)) , this, SLOT(cmdHighlighted(int)) );
- connect(_commandNames , SIGNAL(highlighted(int)) , this, SLOT(cmdNameHighlighted(int)) );
- connect(_commands , SIGNAL(selected(int)) , this, SLOT(editCmd()) );
- connect(_commandNames , SIGNAL(selected(int)) , this, SLOT(editCmd()) );
+ connect(_commands , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdHighlighted(int)) );
+ connect(_commandNames , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdNameHighlighted(int)) );
+ connect(_commands , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) );
+ connect(_commandNames , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) );
- connect(_cmdEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) );
- connect(_cmdNameEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) );
+ connect(_cmdEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) );
+ connect(_cmdNameEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) );
}
-void CmdEdit::setCommands(const QStringList& commands,const QStringList& commandNames)
+void CmdEdit::setCommands(const TQStringList& commands,const TQStringList& commandNames)
{
_commands->clear();
_commands->insertStringList(commands);
@@ -131,7 +131,7 @@ void CmdEdit::setCommands(const QStringList& commands,const QStringList& command
_commandNames->insertStringList(commandNames);
}
-void CmdEdit::commands(QStringList& commands, QStringList& commandNames)
+void CmdEdit::commands(TQStringList& commands, TQStringList& commandNames)
{
commands.clear();
commandNames.clear();
@@ -148,8 +148,8 @@ void CmdEdit::commands(QStringList& commands, QStringList& commandNames)
void CmdEdit::addCmd()
{
- QString cmd = _cmdEdit->text();
- QString cmdName = _cmdNameEdit->text();
+ TQString cmd = _cmdEdit->text();
+ TQString cmdName = _cmdNameEdit->text();
_cmdEdit->clear();
_cmdNameEdit->clear();
@@ -197,8 +197,8 @@ void CmdEdit::removeCmd()
void CmdEdit::upCmd()
{
- QString cmd = _commands->currentText();
- QString cmdName = _commandNames->currentText();
+ TQString cmd = _commands->currentText();
+ TQString cmdName = _commandNames->currentText();
int index=_commands->currentItem();
_commands->removeItem(index);
@@ -220,8 +220,8 @@ void CmdEdit::upCmd()
void CmdEdit::downCmd()
{
- QString cmd = _commands->currentText();
- QString cmdName = _commandNames->currentText();
+ TQString cmd = _commands->currentText();
+ TQString cmdName = _commandNames->currentText();
int index=_commands->currentItem();
_commands->removeItem(index);
diff --git a/kbabel/commonui/cmdedit.h b/kbabel/commonui/cmdedit.h
index dc61679b..64abd815 100644
--- a/kbabel/commonui/cmdedit.h
+++ b/kbabel/commonui/cmdedit.h
@@ -37,8 +37,8 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
class QListBox;
class QLineEdit;
@@ -49,10 +49,10 @@ class CmdEdit : public QWidget
{
Q_OBJECT
public:
- CmdEdit(QWidget* parent=0,const char* name=0);
+ CmdEdit(TQWidget* parent=0,const char* name=0);
- void setCommands(const QStringList& commands,const QStringList& commandNames);
- void commands(QStringList& commands, QStringList& commandNames);
+ void setCommands(const TQStringList& commands,const TQStringList& commandNames);
+ void commands(TQStringList& commands, TQStringList& commandNames);
signals:
void widgetChanged();
@@ -78,17 +78,17 @@ private slots:
void checkAdd();
private:
- QListBox* _commands;
- QListBox* _commandNames;
+ TQListBox* _commands;
+ TQListBox* _commandNames;
- QLineEdit* _cmdEdit;
- QLineEdit* _cmdNameEdit;
+ TQLineEdit* _cmdEdit;
+ TQLineEdit* _cmdNameEdit;
- QPushButton* _addButton;
- QPushButton* _editButton;
- QPushButton* _removeButton;
- QToolButton* _upButton;
- QToolButton* _downButton;
+ TQPushButton* _addButton;
+ TQPushButton* _editButton;
+ TQPushButton* _removeButton;
+ TQToolButton* _upButton;
+ TQToolButton* _downButton;
};
#endif // CMDEDIT_H
diff --git a/kbabel/commonui/context.cpp b/kbabel/commonui/context.cpp
index db468795..55c0f196 100644
--- a/kbabel/commonui/context.cpp
+++ b/kbabel/commonui/context.cpp
@@ -34,17 +34,17 @@
#include "klisteditor.h"
#include "kbprojectsettings.h"
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qvgroupbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqvgroupbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -62,7 +62,7 @@
#include <ktexteditor/selectioninterface.h>
#include <ktexteditor/viewcursorinterface.h>
-SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWidget(parent)
+SourceContext::SourceContext(TQWidget *parent, KBabel::Project::Ptr project): TQWidget(parent)
, m_parent( parent )
, _part(0)
, _view(0)
@@ -71,20 +71,20 @@ SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWi
, _project(project)
{
_referenceList.clear();
- _referenceCombo = new QComboBox( this );
- connect( _referenceCombo, SIGNAL(activated(int)), this, SLOT(updateToSelected(int)));
+ _referenceCombo = new TQComboBox( this );
+ connect( _referenceCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateToSelected(int)));
- _layout= new QVBoxLayout(this);
+ _layout= new TQVBoxLayout(this);
_layout->addWidget(_referenceCombo);
}
-void SourceContext::setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile )
+void SourceContext::setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile )
{
if( !_part && !loadPart() ) return;
_referenceCombo->clear();
_referenceList = resolvePath( packageDir, packageName, gettextComment, urlPoFile );
- for( QValueList<ContextInfo>::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it )
+ for( TQValueList<ContextInfo>::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it )
_referenceCombo->insertItem((*it).path);
_referenceCombo->setEnabled( !_referenceList.isEmpty() );
@@ -120,24 +120,24 @@ void SourceContext::updateToSelected(int index)
(dynamic_cast<KTextEditor::SelectionInterface *>(_part))->setSelection(ci.line-1,0,ci.line,0);
}
-QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile )
+TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile )
{
//kdDebug() << "GETTEXTCOMMENT:" << gettextComment << endl;
// Find the directory name of the PO file, if the PO file is local
// ### TODO: find a way to allow remote files too
- QString poDir;
+ TQString poDir;
#if KDE_IS_VERSION( 3, 5, 0 )
const KURL localUrl( KIO::NetAccess::mostLocalURL( urlPoFile, m_parent ) );
if ( localUrl.isLocalFile() )
{
- const QFileInfo fi( localUrl.path() );
+ const TQFileInfo fi( localUrl.path() );
poDir = fi.dirPath( true );
}
#else
if ( urlPoFile.isLocalFile() )
{
- const QFileInfo fi( urlPoFile.path() );
+ const TQFileInfo fi( urlPoFile.path() );
poDir = fi.dirPath( true );
}
#endif
@@ -151,12 +151,12 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
kdDebug() << "CONTEXT VARIABLE END" << endl;
#endif
- QStringList prefixes;
- const QStringList paths = _project->settings()->paths();
+ TQStringList prefixes;
+ const TQStringList paths = _project->settings()->paths();
- for( QStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it )
+ for( TQStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it )
{
- QString pref = (*it);
+ TQString pref = (*it);
if ( !poDir.isEmpty() )
{
@@ -171,19 +171,19 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
prefixes.append(pref);
}
- QValueList<ContextInfo> rawRefList; // raw references
- QRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references
- QRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references
- QRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format
- const QStringList lines = QStringList::split( "\n", gettextComment );
- for ( QStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it)
+ TQValueList<ContextInfo> rawRefList; // raw references
+ TQRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references
+ TQRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references
+ TQRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format
+ const TQStringList lines = TQStringList::split( "\n", gettextComment );
+ for ( TQStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it)
{
- const QString curLine = (*it).stripWhiteSpace();
+ const TQString curLine = (*it).stripWhiteSpace();
if( curLine.startsWith( "#:" ) )
{
// We have a Gettext line with references
- const QStringList references( QStringList::split( " ", curLine.mid( 2 ), false ) );
- for ( QStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it )
+ const TQStringList references( TQStringList::split( " ", curLine.mid( 2 ), false ) );
+ for ( TQStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it )
{
if ( re.exactMatch( (*it) ) )
{
@@ -191,7 +191,7 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
ref.line = re.cap(2).toInt();
ref.path = re.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.replace( QChar( '\\' ), QChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -223,7 +223,7 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
ref.line = res.cap(2).toInt();
ref.path = res.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.replace( QChar( '\\' ), QChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -232,18 +232,18 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
}
// Now that we have gathered the references, we need to convert them to absolute paths
- QValueList<ContextInfo> results;
- for ( QValueList<ContextInfo>::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it )
+ TQValueList<ContextInfo> results;
+ for ( TQValueList<ContextInfo>::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it )
{
const int lineNum = (*it).line;
- const QString fileName = (*it).path;
- for ( QStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
+ const TQString fileName = (*it).path;
+ for ( TQStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
{
- QString path = (*it1);
+ TQString path = (*it1);
path.replace( "@COMMENTPATH@", fileName);
//kdDebug() << "CONTEXT PATH: " << path << endl; // DEBUG
- QFileInfo pathInfo( path );
+ TQFileInfo pathInfo( path );
if( pathInfo.exists() )
{
ContextInfo ref;
@@ -289,8 +289,8 @@ bool SourceContext::loadPart()
return false;
}
_view = _part->createView( this, 0 );
- _layout->addWidget(static_cast<QWidget *>(_view), 1);
- static_cast<QWidget *>(_view)->show();
+ _layout->addWidget(static_cast<TQWidget *>(_view), 1);
+ static_cast<TQWidget *>(_view)->show();
return true;
}
diff --git a/kbabel/commonui/context.h b/kbabel/commonui/context.h
index 2ccceecd..d68a2371 100644
--- a/kbabel/commonui/context.h
+++ b/kbabel/commonui/context.h
@@ -33,8 +33,8 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <ktexteditor/document.h>
#include <ktexteditor/view.h>
@@ -50,7 +50,7 @@ class KURL;
struct ContextInfo
{
- QString path;
+ TQString path;
uint line;
};
@@ -78,7 +78,7 @@ class KDE_EXPORT SourceContext : public QWidget
{
Q_OBJECT
public:
- SourceContext(QWidget* parent, KBabel::Project::Ptr project);
+ SourceContext(TQWidget* parent, KBabel::Project::Ptr project);
void setProject(KBabel::Project::Ptr project);
@@ -91,7 +91,7 @@ public slots:
* @param urlPoFile URL of the PO file
* @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet
*/
- void setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile );
+ void setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile );
private:
/**
@@ -103,17 +103,17 @@ private:
* @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet
* @private
*/
- QValueList<ContextInfo> resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile );
+ TQValueList<ContextInfo> resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile );
bool loadPart();
/// Parent widget (for KIO::NetAccess member functions)
- QWidget* m_parent;
+ TQWidget* m_parent;
KTextEditor::Document* _part;
KTextEditor::View* _view;
- QComboBox *_referenceCombo;
- QVBoxLayout *_layout;
+ TQComboBox *_referenceCombo;
+ TQVBoxLayout *_layout;
- QValueList<ContextInfo> _referenceList;
+ TQValueList<ContextInfo> _referenceList;
KBabel::Project::Ptr _project;
private slots:
diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp
index 7335f30a..d210811a 100644
--- a/kbabel/commonui/finddialog.cpp
+++ b/kbabel/commonui/finddialog.cpp
@@ -34,14 +34,14 @@
**************************************************************************** */
#include "finddialog.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -52,14 +52,14 @@
using namespace KBabel;
-FindDialog::FindDialog(bool forReplace, QWidget* parent)
+FindDialog::FindDialog(bool forReplace, TQWidget* parent)
:KDialogBase(parent, "finddialog",true, "", Ok|Cancel, Ok)
, _regExpEditDialog(0), _replaceDlg(forReplace)
{
- QWidget* page = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint());
+ TQWidget* page = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint());
- QLabel *label = new QLabel(i18n("&Find:"),page);
+ TQLabel *label = new TQLabel(i18n("&Find:"),page);
layout->addWidget(label);
_findCombo = new KComboBox(true, page, "findCombo");
@@ -68,20 +68,20 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
layout->addWidget(_findCombo);
label->setBuddy(_findCombo);
- QString msg=i18n("<qt><p><b>Find text</b></p>"
+ TQString msg=i18n("<qt><p><b>Find text</b></p>"
"<p>Here you can enter the text you want to search for. "
"If you want to search for a regular expression, "
"enable <b>Use regular expression</b> below.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(_findCombo,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(_findCombo,msg);
if(forReplace) {
setCaption(i18n("Replace"));
setButtonOK(i18n("&Replace"));
- _replaceLabel = new QLabel(i18n("&Replace with:"),page);
+ _replaceLabel = new TQLabel(i18n("&Replace with:"),page);
layout->addWidget(_replaceLabel);
_replaceCombo = new KComboBox(true, page, "replaceCombo");
_replaceCombo->setMaxCount(10);
@@ -94,8 +94,8 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
"replaced with. The text is used as is. It is not possible to make a back "
"reference, if you have searched for a regular expression.</p></qt>");
- QWhatsThis::add(_replaceLabel,msg);
- QWhatsThis::add(_replaceCombo,msg);
+ TQWhatsThis::add(_replaceLabel,msg);
+ TQWhatsThis::add(_replaceCombo,msg);
}
else {
setCaption(i18n("Find"));
@@ -105,48 +105,48 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
_replaceCombo=0;
}
- _buttonGrp = new QButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page);
- connect(_buttonGrp,SIGNAL(clicked(int)), this, SLOT(inButtonsClicked(int)));
+ _buttonGrp = new TQButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page);
+ connect(_buttonGrp,TQT_SIGNAL(clicked(int)), this, TQT_SLOT(inButtonsClicked(int)));
layout->addWidget(_buttonGrp);
- _inMsgid = new QCheckBox(i18n("&Msgid"),_buttonGrp);
- _inMsgstr = new QCheckBox(i18n("M&sgstr"),_buttonGrp);
- _inComment = new QCheckBox(i18n("Comm&ent"),_buttonGrp);
+ _inMsgid = new TQCheckBox(i18n("&Msgid"),_buttonGrp);
+ _inMsgstr = new TQCheckBox(i18n("M&sgstr"),_buttonGrp);
+ _inComment = new TQCheckBox(i18n("Comm&ent"),_buttonGrp);
- QWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>"
+ TQWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>"
"<p>Select here in which parts of a catalog entry you want "
"to search.</p></qt>"));
- QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("Options"), page);
+ TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("Options"), page);
layout->addWidget(box);
- _caseSensitive = new QCheckBox(i18n("C&ase sensitive"),box);
- _wholeWords = new QCheckBox(i18n("O&nly whole words"),box);
- _ignoreAccelMarker = new QCheckBox(i18n("I&gnore marker for keyboard accelerator"),box);
- _ignoreContextInfo = new QCheckBox(i18n("Ignore con&text information"),box);
- _fromCursor = new QCheckBox(i18n("From c&ursor position"),box);
- _backwards = new QCheckBox(i18n("F&ind backwards"),box);
+ _caseSensitive = new TQCheckBox(i18n("C&ase sensitive"),box);
+ _wholeWords = new TQCheckBox(i18n("O&nly whole words"),box);
+ _ignoreAccelMarker = new TQCheckBox(i18n("I&gnore marker for keyboard accelerator"),box);
+ _ignoreContextInfo = new TQCheckBox(i18n("Ignore con&text information"),box);
+ _fromCursor = new TQCheckBox(i18n("From c&ursor position"),box);
+ _backwards = new TQCheckBox(i18n("F&ind backwards"),box);
- QHBox *regexp = new QHBox(box);
+ TQHBox *regexp = new TQHBox(box);
- _isRegExp = new QCheckBox(i18n("Use regu&lar expression"),regexp);
+ _isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp);
_regExpButton = 0;
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
- _regExpButton = new QPushButton( i18n("&Edit..."), regexp );
- connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked()));
- connect( _isRegExp, SIGNAL( toggled(bool) ), _regExpButton, SLOT(setEnabled(bool)));
+ _regExpButton = new TQPushButton( i18n("&Edit..."), regexp );
+ connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));
+ connect( _isRegExp, TQT_SIGNAL( toggled(bool) ), _regExpButton, TQT_SLOT(setEnabled(bool)));
}
if(forReplace)
{
_inMsgid->setEnabled(false);
- _askForReplace = new QCheckBox(i18n("As&k before replacing"),box);
+ _askForReplace = new TQCheckBox(i18n("As&k before replacing"),box);
_ignoreContextInfo->setEnabled(false);
- QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
"<p>Here you can finetune replacing:"
"<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>"
"<li><b>Only whole words</b>: text found must not be part of a longer word</li>"
@@ -163,7 +163,7 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
else {
_askForReplace=0;
- QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
"<p>Here you can finetune the search:"
"<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>"
"<li><b>Only whole words</b>: text found must not be part of a longer word</li>"
@@ -186,7 +186,7 @@ FindDialog::~FindDialog()
saveSettings();
}
-int FindDialog::show(QString initialStr)
+int FindDialog::show(TQString initialStr)
{
if( !initialStr.isEmpty() ) {
_findCombo->setEditText( initialStr );
@@ -199,7 +199,7 @@ int FindDialog::show(QString initialStr)
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(_replaceDlg) {
_replaceList.remove(_replaceCombo->currentText());
_replaceList.prepend(_replaceCombo->currentText());
@@ -260,7 +260,7 @@ int FindDialog::show(QString initialStr)
return r;
}
-int FindDialog::exec(QString initialStr)
+int FindDialog::exec(TQString initialStr)
{
if( !initialStr.isEmpty() ) {
_findCombo->setEditText( initialStr );
@@ -273,7 +273,7 @@ int FindDialog::exec(QString initialStr)
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(_replaceDlg) {
_replaceList.remove(_replaceCombo->currentText());
_replaceList.prepend(_replaceCombo->currentText());
@@ -520,30 +520,30 @@ void FindDialog::inButtonsClicked(int id)
void FindDialog::regExpButtonClicked()
{
if ( _regExpEditDialog == 0 )
- _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( _regExpEditDialog );
if( iface )
{
iface->setRegExp( _findCombo->currentText() );
- if( _regExpEditDialog->exec() == QDialog::Accepted )
+ if( _regExpEditDialog->exec() == TQDialog::Accepted )
_findCombo->setCurrentText( iface->regExp() );
}
}
-ReplaceDialog::ReplaceDialog(QWidget* parent)
+ReplaceDialog::ReplaceDialog(TQWidget* parent)
:KDialogBase(Plain, "", Close|User1|User2|User3, User1, parent,"finddialog"
, true,false,i18n("&Replace"),i18n("&Goto Next"),i18n("R&eplace All"))
{
- QWidget* page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint());
+ TQWidget* page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint());
- QLabel *label = new QLabel(i18n("Replace this string?"),page);
+ TQLabel *label = new TQLabel(i18n("Replace this string?"),page);
layout->addWidget(label);
- connect(this,SIGNAL(user1Clicked()),this,SIGNAL(replace()));
- connect(this,SIGNAL(user2Clicked()),this,SIGNAL(next()));
- connect(this,SIGNAL(user3Clicked()),this,SIGNAL(replaceAll()));
+ connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace()));
+ connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next()));
+ connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll()));
}
ReplaceDialog::~ReplaceDialog()
diff --git a/kbabel/commonui/finddialog.h b/kbabel/commonui/finddialog.h
index 7baa0675..c7e6ac14 100644
--- a/kbabel/commonui/finddialog.h
+++ b/kbabel/commonui/finddialog.h
@@ -33,8 +33,8 @@
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
class QButtonGroup;
@@ -52,7 +52,7 @@ public:
* Constructor
* @param replaceDlg flag, if this is a replace dialog
*/
- FindDialog(bool replaceDlg, QWidget* parent);
+ FindDialog(bool replaceDlg, TQWidget* parent);
~FindDialog();
/**
@@ -62,7 +62,7 @@ public:
*
* @return the result code of the dialog
*/
- int show(QString initialStr);
+ int show(TQString initialStr);
/**
* executes the dialog as modal
@@ -71,7 +71,7 @@ public:
*
* @return the result code of the dialog
*/
- int exec(QString initialStr);
+ int exec(TQString initialStr);
KBabel::FindOptions findOpts();
void setFindOpts(KBabel::FindOptions options);
KBabel::ReplaceOptions replaceOpts();
@@ -90,31 +90,31 @@ private slots:
private:
KComboBox *_findCombo;
KComboBox *_replaceCombo;
- QLabel *_replaceLabel;
+ TQLabel *_replaceLabel;
- QButtonGroup *_buttonGrp;
- QCheckBox *_inMsgid;
- QCheckBox *_inMsgstr;
- QCheckBox *_inComment;
+ TQButtonGroup *_buttonGrp;
+ TQCheckBox *_inMsgid;
+ TQCheckBox *_inMsgstr;
+ TQCheckBox *_inComment;
- QCheckBox *_caseSensitive;
- QCheckBox *_wholeWords;
- QCheckBox *_ignoreAccelMarker;
- QCheckBox *_ignoreContextInfo;
- QCheckBox *_backwards;
- QCheckBox *_fromCursor;
- QCheckBox *_isRegExp;
- QCheckBox *_askForReplace;
+ TQCheckBox *_caseSensitive;
+ TQCheckBox *_wholeWords;
+ TQCheckBox *_ignoreAccelMarker;
+ TQCheckBox *_ignoreContextInfo;
+ TQCheckBox *_backwards;
+ TQCheckBox *_fromCursor;
+ TQCheckBox *_isRegExp;
+ TQCheckBox *_askForReplace;
- QPushButton *_regExpButton;
- QDialog *_regExpEditDialog;
+ TQPushButton *_regExpButton;
+ TQDialog *_regExpEditDialog;
KBabel::FindOptions _findOptions;
KBabel::ReplaceOptions _replaceOptions;
- QStringList _findList;
- QStringList _replaceFindList;
- QStringList _replaceList;
+ TQStringList _findList;
+ TQStringList _replaceFindList;
+ TQStringList _replaceList;
bool _replaceDlg;
};
@@ -123,7 +123,7 @@ class KDE_EXPORT ReplaceDialog : public KDialogBase
{
Q_OBJECT
public:
- ReplaceDialog(QWidget* parent);
+ ReplaceDialog(TQWidget* parent);
~ReplaceDialog();
signals:
diff --git a/kbabel/commonui/kactionselector.cpp b/kbabel/commonui/kactionselector.cpp
index b214a49f..b699480c 100644
--- a/kbabel/commonui/kactionselector.cpp
+++ b/kbabel/commonui/kactionselector.cpp
@@ -35,37 +35,37 @@
#include <kdialog.h> // for spacingHint()
#include <kdebug.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
class KActionSelectorPrivate {
public:
- QListBox *availableListBox, *selectedListBox;
- QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
- QLabel *lAvailable, *lSelected;
+ TQListBox *availableListBox, *selectedListBox;
+ TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
+ TQLabel *lAvailable, *lSelected;
bool moveOnDoubleClick, keyboardEnabled;
KActionSelector::ButtonIconSize iconSize;
- QString addIcon, removeIcon, upIcon, downIcon;
+ TQString addIcon, removeIcon, upIcon, downIcon;
KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy;
bool showUpDownButtons;
};
//BEGIN Constructor/destructor
-KActionSelector::KActionSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KActionSelector::KActionSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new KActionSelectorPrivate();
d->moveOnDoubleClick = true;
d->keyboardEnabled = true;
d->iconSize = SmallIcon;
- d->addIcon = QApplication::reverseLayout() ? "back" : "forward";
- d->removeIcon = QApplication::reverseLayout() ? "forward" : "back";
+ d->addIcon = TQApplication::reverseLayout() ? "back" : "forward";
+ d->removeIcon = TQApplication::reverseLayout() ? "forward" : "back";
d->upIcon = "up";
d->downIcon = "down";
d->availableInsertionPolicy = Sorted;
@@ -74,53 +74,53 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name )
//int isz = IconSize( KIcon::Small );
- QHBoxLayout *lo = new QHBoxLayout( this );
+ TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- d->lAvailable = new QLabel( i18n("&Available:"), this );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ d->lAvailable = new TQLabel( i18n("&Available:"), this );
loAv->addWidget( d->lAvailable );
- d->availableListBox = new QListBox( this );
+ d->availableListBox = new TQListBox( this );
loAv->addWidget( d->availableListBox );
d->lAvailable->setBuddy( d->availableListBox );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- d->btnAdd = new QToolButton( this );
+ d->btnAdd = new TQToolButton( this );
loHBtns->addWidget( d->btnAdd );
- d->btnRemove = new QToolButton( this );
+ d->btnRemove = new TQToolButton( this );
loHBtns->addWidget( d->btnRemove );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- d->lSelected = new QLabel( i18n("&Selected:"), this );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ d->lSelected = new TQLabel( i18n("&Selected:"), this );
loS->addWidget( d->lSelected );
- d->selectedListBox = new QListBox( this );
+ d->selectedListBox = new TQListBox( this );
loS->addWidget( d->selectedListBox );
d->lSelected->setBuddy( d->selectedListBox );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- d->btnUp = new QToolButton( this );
+ d->btnUp = new TQToolButton( this );
loVBtns->addWidget( d->btnUp );
- d->btnDown = new QToolButton( this );
+ d->btnDown = new TQToolButton( this );
loVBtns->addWidget( d->btnDown );
loVBtns->addStretch( 1 );
loadIcons();
- connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) );
- connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) );
- connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) );
- connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) );
- connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
- connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
+ connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) );
+ connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) );
+ connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) );
+ connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) );
+ connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
+ connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
d->availableListBox->installEventFilter( this );
d->selectedListBox->installEventFilter( this );
@@ -135,17 +135,17 @@ KActionSelector::~KActionSelector()
//BEGIN Public Methods
-QListBox *KActionSelector::availableListBox()
+TQListBox *KActionSelector::availableListBox()
{
return d->availableListBox;
}
-QListBox *KActionSelector::selectedListBox()
+TQListBox *KActionSelector::selectedListBox()
{
return d->selectedListBox;
}
-void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
+void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{
int isz;
if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small );
@@ -177,7 +177,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
}
}
-void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button )
+void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button )
{
switch ( button )
{
@@ -198,7 +198,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt
}
}
-void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
+void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button )
{
switch ( button )
{
@@ -219,21 +219,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
}
}
-void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button )
+void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button )
{
switch ( button )
{
case ButtonAdd:
- QWhatsThis::add( d->btnAdd, text );
+ TQWhatsThis::add( d->btnAdd, text );
break;
case ButtonRemove:
- QWhatsThis::add( d->btnRemove, text );
+ TQWhatsThis::add( d->btnRemove, text );
break;
case ButtonUp:
- QWhatsThis::add( d->btnUp, text );
+ TQWhatsThis::add( d->btnUp, text );
break;
case ButtonDown:
- QWhatsThis::add( d->btnDown, text );
+ TQWhatsThis::add( d->btnDown, text );
break;
default:
kdDebug(KBABEL)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl;
@@ -273,22 +273,22 @@ void KActionSelector::setKeyboardEnabled( bool b )
d->keyboardEnabled = b;
}
-QString KActionSelector::availableLabel() const
+TQString KActionSelector::availableLabel() const
{
return d->lAvailable->text();
}
-void KActionSelector::setAvailableLabel( const QString &text )
+void KActionSelector::setAvailableLabel( const TQString &text )
{
d->lAvailable->setText( text );
}
-QString KActionSelector::selectedLabel() const
+TQString KActionSelector::selectedLabel() const
{
return d->lSelected->text();
}
-void KActionSelector::setSelectedLabel( const QString &text )
+void KActionSelector::setSelectedLabel( const TQString &text )
{
d->lSelected->setText( text );
}
@@ -357,7 +357,7 @@ void KActionSelector::polish()
//END Public Slots
//BEGIN Protected
-void KActionSelector::keyPressEvent( QKeyEvent *e )
+void KActionSelector::keyPressEvent( TQKeyEvent *e )
{
if ( ! d->keyboardEnabled ) return;
if ( (e->state() & Qt::ControlButton) )
@@ -383,13 +383,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e )
}
}
-bool KActionSelector::eventFilter( QObject *o, QEvent *e )
+bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
{
- if ( d->keyboardEnabled && e->type() == QEvent::KeyPress )
+ if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress )
{
- if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) )
+ if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Right:
buttonAddClicked();
@@ -404,18 +404,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
buttonDownClicked();
break;
default:
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
break;
}
return true;
}
- else if ( o->inherits( "QListBox" ) )
+ else if ( o->inherits( "TQListBox" ) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Return:
case Key_Enter:
- QListBox *lb = (QListBox*)o;
+ TQListBox *lb = (TQListBox*)o;
int index = lb->currentItem();
if ( index < 0 ) break;
moveItem( lb->item( index ) );
@@ -423,7 +423,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -433,7 +433,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
void KActionSelector::buttonAddClicked()
{
// move all selected items from available to selected listbox
- QListBoxItem *item = d->availableListBox->firstItem();
+ TQListBoxItem *item = d->availableListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->availableListBox->takeItem( item );
@@ -451,7 +451,7 @@ void KActionSelector::buttonAddClicked()
void KActionSelector::buttonRemoveClicked()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = d->selectedListBox->firstItem();
+ TQListBoxItem *item = d->selectedListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->selectedListBox->takeItem( item );
@@ -470,7 +470,7 @@ void KActionSelector::buttonUpClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c-1 );
d->selectedListBox->setCurrentItem( item );
@@ -481,14 +481,14 @@ void KActionSelector::buttonDownClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c+1 );
d->selectedListBox->setCurrentItem( item );
emit movedDown( item );
}
-void KActionSelector::itemDoubleClicked( QListBoxItem *item )
+void KActionSelector::itemDoubleClicked( TQListBoxItem *item )
{
if ( d->moveOnDoubleClick )
moveItem( item );
@@ -513,10 +513,10 @@ void KActionSelector::loadIcons()
d->btnDown->setIconSet( SmallIconSet( d->downIcon, isz ) );
}
-void KActionSelector::moveItem( QListBoxItem *item )
+void KActionSelector::moveItem( TQListBoxItem *item )
{
- QListBox *lbFrom = item->listBox();
- QListBox *lbTo;
+ TQListBox *lbFrom = item->listBox();
+ TQListBox *lbTo;
if ( lbFrom == d->availableListBox )
lbTo = d->selectedListBox;
else if ( lbFrom == d->selectedListBox )
@@ -540,7 +540,7 @@ void KActionSelector::moveItem( QListBoxItem *item )
emit removed( item );
}
-int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy )
+int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy )
{
int index;
switch ( policy )
diff --git a/kbabel/commonui/kactionselector.h b/kbabel/commonui/kactionselector.h
index 324ed54f..04139570 100644
--- a/kbabel/commonui/kactionselector.h
+++ b/kbabel/commonui/kactionselector.h
@@ -30,7 +30,7 @@
#ifndef _KACTION_SELECTOR_H_
#define _KACTION_SELECTOR_H_
-#include <qwidget.h>
+#include <tqwidget.h>
class QListBox;
class QListBoxItem;
@@ -56,13 +56,13 @@ class KActionSelectorPrivate;
see keyboardEnabled.
Note that this may conflist with keyboard selection in the selected list box,
- if you set that to anything else than QListBox::Single (which is the default).
+ if you set that to anything else than TQListBox::Single (which is the default).
To use it, simply construct an instance and then add items to the two listboxes,
available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve
- the selected options using QListBox methods on lbSelected().
+ the selected options using TQListBox methods on lbSelected().
- This way, you can use your own QListBoxItem class, allowing you to easily
+ This way, you can use your own TQListBoxItem class, allowing you to easily
store object data in those.
When an item is moved to a listbox, it is placed below the current item
@@ -84,31 +84,31 @@ class KActionSelectorPrivate;
@author Anders Lund <anders@alweb.dk>
*/
-class KActionSelector : public QWidget {
+class KActionSelector : public TQWidget {
Q_OBJECT
Q_ENUMS( ButtonIconSize InsertionPolicy )
Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
- Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel )
- Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel )
+ Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
+ Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
public:
- KActionSelector( QWidget *parent=0, const char *name=0 );
+ KActionSelector( TQWidget *parent=0, const char *name=0 );
~KActionSelector();
/**
- @return The QListBox holding the available actions
+ @return The TQListBox holding the available actions
*/
- QListBox *availableListBox();
+ TQListBox *availableListBox();
/**
- @return The QListBox holding the selected actions
+ @return The TQListBox holding the selected actions
*/
- QListBox *selectedListBox();
+ TQListBox *selectedListBox();
/**
This enum indentifies the moving buttons
@@ -201,7 +201,7 @@ public:
/**
@return The text of the label for the available items listbox.
*/
- QString availableLabel() const;
+ TQString availableLabel() const;
/**
Sets the label for the available items listbox to @p text.
@@ -209,12 +209,12 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setAvailableLabel( const QString & text );
+ void setAvailableLabel( const TQString & text );
/**
@return the label of the selected items listbox.
*/
- QString selectedLabel() const;
+ TQString selectedLabel() const;
/**
Sets the label for the selected items listbox to @p text.
@@ -222,7 +222,7 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setSelectedLabel( const QString & text );
+ void setSelectedLabel( const TQString & text );
/**
@return the current ButtonIconSize.
@@ -276,25 +276,25 @@ public:
Sets the pixmap of the button @p button to @p icon.
It calls @ref SmallIconSet(pm) to generate the icon set.
*/
- void setButtonIcon( const QString &icon, MoveButton button );
+ void setButtonIcon( const TQString &icon, MoveButton button );
/**
Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either
- created by @ref QIconSet, or use the application instance of
+ created by @ref TQIconSet, or use the application instance of
@ref KIconLoader (recommended).
*/
- void setButtonIconSet( const QIconSet &iconset, MoveButton button );
+ void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
/**
Sets the tooltip for the button @p button to @p tip.
*/
- void setButtonTooltip( const QString &tip, MoveButton button );
+ void setButtonTooltip( const TQString &tip, MoveButton button );
/**
Sets the whatsthis help for button @p button to @p text.
*/
- void setButtonWhatsThis( const QString &text, MoveButton button );
+ void setButtonWhatsThis( const TQString &text, MoveButton button );
/**
Sets the enabled state of all moving buttons to reflect the current
@@ -309,27 +309,27 @@ signals:
/**
Emitted when an item is moved to the "selected" listbox.
*/
- void added( QListBoxItem *item );
+ void added( TQListBoxItem *item );
/**
Emitted when an item is moved out of the "selected" listbox.
*/
- void removed( QListBoxItem *item );
+ void removed( TQListBoxItem *item );
/**
Emitted when an item is moved upwards in the "selected" listbox.
*/
- void movedUp( QListBoxItem *item );
+ void movedUp( TQListBoxItem *item );
/**
Emitted when an item is moved downwards in the "selected" listbox.
*/
- void movedDown( QListBoxItem *item );
+ void movedDown( TQListBoxItem *item );
/**
Emitted when an item is moved to the "selected" listbox.
*/
-// void addedToSelection( QListBoxItem *item );
+// void addedToSelection( TQListBoxItem *item );
public slots:
/**
@@ -342,12 +342,12 @@ protected:
/**
Reimplamented for internal reasons.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
/**
Reimplemented for internal reasons.
*/
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
/**
@@ -373,19 +373,19 @@ private slots:
/**
Moves the item @p item to the other listbox if moveOnDoubleClick is enabled.
*/
- void itemDoubleClicked( QListBoxItem *item );
+ void itemDoubleClicked( TQListBoxItem *item );
/**
connected to both list boxes to set the buttons enabled
*/
- void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); };
+ void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); };
private:
/**
Move item @p item to the other listbox
*/
- void moveItem( QListBoxItem *item );
+ void moveItem( TQListBoxItem *item );
/**
loads the icons for the move buttons.
@@ -399,7 +399,7 @@ private:
Note that if policy is Sorted, this will return -1.
Sort the listbox after inserting the item in that case.
*/
- int insertionIndex( QListBox *lb, InsertionPolicy policy );
+ int insertionIndex( TQListBox *lb, InsertionPolicy policy );
/** @private
Private data storage
diff --git a/kbabel/commonui/klisteditor.ui.h b/kbabel/commonui/klisteditor.ui.h
index bc916e56..3d0e17df 100644
--- a/kbabel/commonui/klisteditor.ui.h
+++ b/kbabel/commonui/klisteditor.ui.h
@@ -50,7 +50,7 @@ void KListEditor::downInList()
{
int i=_list->currentItem();
if( i< (int)_list->count()-1 ) {
- QString ci = _list->currentText();
+ TQString ci = _list->currentText();
_list->removeItem(i);
_list->insertItem(ci,i+1);
_list->setCurrentItem(i+1);
@@ -70,7 +70,7 @@ void KListEditor::upInList()
{
int i=_list->currentItem();
if( i>0 ) {
- QString ci = _list->currentText();
+ TQString ci = _list->currentText();
_list->removeItem(i);
_list->insertItem(ci,i-1);
_list->setCurrentItem(i-1);
@@ -92,7 +92,7 @@ void KListEditor::updateList()
else _list->changeItem(_edit->text(), i );
}
-void KListEditor::setList( QStringList contents )
+void KListEditor::setList( TQStringList contents )
{
_list->clear();
_list->insertStringList(contents);
@@ -101,21 +101,21 @@ void KListEditor::setList( QStringList contents )
}
-void KListEditor::editChanged( const QString &s )
+void KListEditor::editChanged( const TQString &s )
{
_addButton->setEnabled(!s.isEmpty());
}
-void KListEditor::setTitle( const QString &s )
+void KListEditor::setTitle( const TQString &s )
{
_frame->setTitle(s);
}
-QStringList KListEditor::list()
+TQStringList KListEditor::list()
{
- QStringList result;
+ TQStringList result;
for( uint i=0; i<_list->count() ; i++ )
result.append(_list->text(i));
return result;
diff --git a/kbabel/commonui/projectpref.cpp b/kbabel/commonui/projectpref.cpp
index 1bffa2e6..16e6c114 100644
--- a/kbabel/commonui/projectpref.cpp
+++ b/kbabel/commonui/projectpref.cpp
@@ -37,9 +37,9 @@
#include "diffpreferences.h"
#include "kbprojectsettings.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -82,15 +82,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project)
addPage(_spellPage, i18n("title of page in preferences dialog","Spelling")
, "spellcheck"
, i18n("Options for Spell Checking"));
- connect( _spellPage, SIGNAL( settingsChanged() )
- , this, SLOT(updateButtons()) );
+ connect( _spellPage, TQT_SIGNAL( settingsChanged() )
+ , this, TQT_SLOT(updateButtons()) );
_sourcePage = new SourceContextPreferences(0);
addPage(_sourcePage, i18n("title of page in preferences dialog","Source")
, "source"
,i18n("Options for Showing Source Context"));
- connect(_sourcePage, SIGNAL (itemsChanged())
- , this, SLOT (updateButtons()) );
+ connect(_sourcePage, TQT_SIGNAL (itemsChanged())
+ , this, TQT_SLOT (updateButtons()) );
_miscPage = new MiscPreferences(0);
addPage(_miscPage, i18n("title of page in preferences dialog","Miscellaneous")
@@ -106,15 +106,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project)
addPage(_dirCommandsPage, i18n("title of page in preferences dialog","Folder Commands")
, "folder"
, i18n("User-Defined Commands for Folder Items"));
- connect( _dirCommandsPage, SIGNAL( settingsChanged() ),
- this, SLOT(updateButtons()) );
+ connect( _dirCommandsPage, TQT_SIGNAL( settingsChanged() ),
+ this, TQT_SLOT(updateButtons()) );
_fileCommandsPage = new FileCommandsPreferences(0);
addPage(_fileCommandsPage, i18n("title of page in preferences dialog","File Commands")
, "files"
, i18n("User-Defined Commands for File Items"));
- connect( _fileCommandsPage, SIGNAL( settingsChanged() ),
- this, SLOT(updateButtons()) );
+ connect( _fileCommandsPage, TQT_SIGNAL( settingsChanged() ),
+ this, TQT_SLOT(updateButtons()) );
_viewPage = new ViewPreferences(0);
addPage(_viewPage, i18n("title of page in preferences dialog","Catalog Manager")
diff --git a/kbabel/commonui/projectpref.h b/kbabel/commonui/projectpref.h
index 90561c5b..ce4e7f86 100644
--- a/kbabel/commonui/projectpref.h
+++ b/kbabel/commonui/projectpref.h
@@ -36,7 +36,7 @@
#define PROJECTPREF_H
#include <kconfigdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class SavePreferences;
class IdentityPreferences;
diff --git a/kbabel/commonui/projectprefwidgets.cpp b/kbabel/commonui/projectprefwidgets.cpp
index 16bc2da4..0357065e 100644
--- a/kbabel/commonui/projectprefwidgets.cpp
+++ b/kbabel/commonui/projectprefwidgets.cpp
@@ -58,25 +58,25 @@
#include <kurldrag.h>
#include <kurlrequester.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qvbuttongroup.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtextcodec.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqvbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtextcodec.h>
+#include <tqwhatsthis.h>
using namespace KBabel;
-static QSize sizeHintForWidget(const QWidget* widget)
+static TQSize sizeHintForWidget(const TQWidget* widget)
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -84,23 +84,23 @@ static QSize sizeHintForWidget(const QWidget* widget)
// layout()->margin() and layout()->spacing()
//
- QSize size;
+ TQSize size;
int numChild = 0;
- QObjectList *l = (QObjectList*)(widget->children());
+ TQObjectList *l = (TQObjectList*)(widget->children());
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
numChild += 1;
- QWidget *w=((QWidget*)o);
+ TQWidget *w=((TQWidget*)o);
- QSize s = w->sizeHint();
+ TQSize s = w->sizeHint();
if( s.isEmpty() == true )
{
- s = QSize( 50, 100 ); // Default size
+ s = TQSize( 50, 100 ); // Default size
}
size.setHeight( size.height() + s.height() );
if( s.width() > size.width() ) { size.setWidth( s.width() ); }
@@ -110,11 +110,11 @@ static QSize sizeHintForWidget(const QWidget* widget)
if( numChild > 0 )
{
size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) );
- size += QSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
+ size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
}
else
{
- size = QSize( 1, 1 );
+ size = TQSize( 1, 1 );
}
return( size );
@@ -123,44 +123,44 @@ static QSize sizeHintForWidget(const QWidget* widget)
-SavePreferences::SavePreferences(QWidget *parent)
+SavePreferences::SavePreferences(TQWidget *parent)
: KTabCtl(parent)
{
- QWidget* page = new QWidget(this);
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = new TQWidget(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
layout->addWidget(box);
box->setMargin(KDialog::marginHint());
- _updateButton = new QCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate");
- _descriptionButton = new QCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription");
- _autoCheckButton = new QCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck");
- _saveObsoleteButton = new QCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete");
+ _updateButton = new TQCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate");
+ _descriptionButton = new TQCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription");
+ _autoCheckButton = new TQCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck");
+ _saveObsoleteButton = new TQCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete");
- QGroupBox* descBox=new QGroupBox(1,Qt::Horizontal,i18n("De&scription"),page);
+ TQGroupBox* descBox=new TQGroupBox(1,Qt::Horizontal,i18n("De&scription"),page);
layout->addWidget(descBox);
descBox->setMargin(KDialog::marginHint());
- _descriptionEdit = new QLineEdit(descBox, "kcfg_DescriptionString");
+ _descriptionEdit = new TQLineEdit(descBox, "kcfg_DescriptionString");
- QGroupBox* encodingBox = new QGroupBox(1,Qt::Horizontal,i18n("Encoding")
+ TQGroupBox* encodingBox = new TQGroupBox(1,Qt::Horizontal,i18n("Encoding")
,page);
encodingBox->setMargin(KDialog::marginHint());
layout->addWidget(encodingBox);
- QHBox *b = new QHBox(encodingBox);
+ TQHBox *b = new TQHBox(encodingBox);
- QLabel* tempLabel=new QLabel(i18n("Default:"),b);
- _encodingBox = new QComboBox(b, "kcfg_Encoding");
+ TQLabel* tempLabel=new TQLabel(i18n("Default:"),b);
+ _encodingBox = new TQComboBox(b, "kcfg_Encoding");
b->setStretchFactor(_encodingBox,2);
b->setSpacing(KDialog::spacingHint());
- QString defaultName=charsetString(ProjectSettingsBase::Locale);
+ TQString defaultName=charsetString(ProjectSettingsBase::Locale);
defaultName+=" "+i18n("(default)");
- QString utf8Name=charsetString(ProjectSettingsBase::UTF8);
- QString utf16Name=charsetString(ProjectSettingsBase::UTF16);
+ TQString utf8Name=charsetString(ProjectSettingsBase::UTF8);
+ TQString utf16Name=charsetString(ProjectSettingsBase::UTF16);
_encodingBox->insertItem(defaultName,(int)ProjectSettingsBase::Locale);
_encodingBox->insertItem(utf8Name,(int)ProjectSettingsBase::UTF8);
@@ -172,10 +172,10 @@ SavePreferences::SavePreferences(QWidget *parent)
tempLabel->setBuddy(_encodingBox);
- _oldEncodingButton = new QCheckBox(i18n("Kee&p the encoding of the file")
+ _oldEncodingButton = new TQCheckBox(i18n("Kee&p the encoding of the file")
,encodingBox, "kcfg_UseOldEncoding");
- _autoSaveBox = new QGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page );
+ _autoSaveBox = new TQGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page );
_autoSaveBox->setMargin( KDialog::marginHint( ) );
layout->addWidget( _autoSaveBox );
_autoSaveDelay = new KIntNumInput( _autoSaveBox, "kcfg_AutoSaveDelay" );
@@ -187,49 +187,49 @@ SavePreferences::SavePreferences(QWidget *parent)
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("&General"));
- page = new QWidget(this);
- layout=new QVBoxLayout(page);
+ page = new TQWidget(this);
+ layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* gridBox = new QGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page);
+ TQGroupBox* gridBox = new TQGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page);
layout->addWidget(gridBox);
gridBox->setMargin(KDialog::marginHint());
- _revisionButton = new QCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate");
- _lastButton = new QCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator");
- _languageButton = new QCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam");
- _charsetButton = new QCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset");
- _encodingButton = new QCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding");
- _projectButton = new QCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject");
+ _revisionButton = new TQCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate");
+ _lastButton = new TQCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator");
+ _languageButton = new TQCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam");
+ _charsetButton = new TQCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset");
+ _encodingButton = new TQCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding");
+ _projectButton = new TQCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject");
- QButtonGroup* dateBox = new QButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat");
+ TQButtonGroup* dateBox = new TQButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat");
layout->addWidget(dateBox);
box->setMargin(KDialog::marginHint());
// we remove/insert default date button to correctly map Qt::DateFormat to our Ids
- _defaultDateButton = new QRadioButton( i18n("De&fault date format"),dateBox );
+ _defaultDateButton = new TQRadioButton( i18n("De&fault date format"),dateBox );
dateBox->remove (_defaultDateButton);
- _localDateButton = new QRadioButton( i18n("Local date fo&rmat"),dateBox );
+ _localDateButton = new TQRadioButton( i18n("Local date fo&rmat"),dateBox );
dateBox->remove (_localDateButton);
- _customDateButton = new QRadioButton( i18n("Custo&m date format:"),dateBox );
+ _customDateButton = new TQRadioButton( i18n("Custo&m date format:"),dateBox );
dateBox->insert (_defaultDateButton);
dateBox->insert (_localDateButton);
- _dateFormatEdit = new QLineEdit(dateBox, "kcfg_CustomDateFormat");
+ _dateFormatEdit = new TQLineEdit(dateBox, "kcfg_CustomDateFormat");
_dateFormatEdit->setEnabled(false);
- connect( _customDateButton, SIGNAL(toggled(bool)), this, SLOT( customDateActivated(bool) ) );
+ connect( _customDateButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( customDateActivated(bool) ) );
- QGroupBox* projectBox = new QGroupBox(1,Qt::Horizontal,i18n("Project String")
+ TQGroupBox* projectBox = new TQGroupBox(1,Qt::Horizontal,i18n("Project String")
,page);
projectBox->setMargin(KDialog::marginHint());
layout->addWidget(projectBox);
- b = new QHBox(projectBox);
+ b = new TQHBox(projectBox);
- tempLabel=new QLabel(i18n("Project-Id:"),b);
- _projectEdit = new QLineEdit(b, "kcfg_ProjectString");
+ tempLabel=new TQLabel(i18n("Project-Id:"),b);
+ _projectEdit = new TQLineEdit(b, "kcfg_ProjectString");
b->setStretchFactor(_projectEdit,2);
b->setSpacing(KDialog::spacingHint());
tempLabel->setBuddy(_projectEdit);
@@ -238,31 +238,31 @@ SavePreferences::SavePreferences(QWidget *parent)
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("&Header"));
- page = new QWidget(this);
- layout=new QVBoxLayout(page);
+ page = new TQWidget(this);
+ layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* translatorCopyrightBox = new QGroupBox(1,Qt::Horizontal, page);
+ TQGroupBox* translatorCopyrightBox = new TQGroupBox(1,Qt::Horizontal, page);
translatorCopyrightBox->setMargin(KDialog::marginHint());
_translatorCopyrightButton =
- new QCheckBox(i18n("Update &translator copyright")
+ new TQCheckBox(i18n("Update &translator copyright")
,translatorCopyrightBox, "kcfg_UpdateTranslatorCopyright");
layout->addWidget(translatorCopyrightBox);
- QGroupBox* fsfBox=new QButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright");
+ TQGroupBox* fsfBox=new TQButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright");
layout->addWidget(fsfBox);
fsfBox->setMargin(KDialog::marginHint());
- _removeFSFButton = new QRadioButton(i18n("&Remove copyright if empty"),fsfBox);
- _updateFSFButton = new QRadioButton(i18n("&Update copyright"),fsfBox);
- _nochangeFSFButton = new QRadioButton(i18n("Do &not change"),fsfBox);
+ _removeFSFButton = new TQRadioButton(i18n("&Remove copyright if empty"),fsfBox);
+ _updateFSFButton = new TQRadioButton(i18n("&Update copyright"),fsfBox);
+ _nochangeFSFButton = new TQRadioButton(i18n("Do &not change"),fsfBox);
layout->addStretch(1);
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("Cop&yright"));
- QWhatsThis::add(_updateButton,
+ TQWhatsThis::add(_updateButton,
i18n("<qt><p><b>Update Header</b></p>\n"
"<p>Check this button to update the header "
"information of the file "
@@ -275,7 +275,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"If you want to add additional fields to the header, you can edit the header manually by choosing\n"
"<b>Edit->Edit Header</b> in the editor window.</p></qt>"));
- QWhatsThis::add(gridBox,i18n("<qt><p><b>Fields to update</b></p>\n"
+ TQWhatsThis::add(gridBox,i18n("<qt><p><b>Fields to update</b></p>\n"
"<p>Choose which fields in the header you want to have updated when saving.\n"
"If a field does not exist, it is appended to the header.</p>\n"
"<p>If you want to add other information to the header, you have to edit the header manually\n"
@@ -283,7 +283,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"<p>Deactivate <b>Update Header</b> above if you do not want to have the header\n"
"updated when saving.</p></qt>"));
- QWhatsThis::add(encodingBox,i18n("<qt><p><b>Encoding</b></p>"
+ TQWhatsThis::add(encodingBox,i18n("<qt><p><b>Encoding</b></p>"
"<p>Choose how to encode characters when saving to a file. If you are unsure "
"what encoding to use, please ask your translation coordinator.</p>"
"<ul><li><b>%1</b>: this is the encoding that fits the character "
@@ -292,18 +292,18 @@ SavePreferences::SavePreferences(QWidget *parent)
"</ul></qt>").arg(defaultName).arg(utf8Name) );
- QWhatsThis::add(_oldEncodingButton
+ TQWhatsThis::add(_oldEncodingButton
,i18n("<qt><p><b>Keep the encoding of the file</b></p>"
"<p>If this option is activated, files are always saved in the "
"same encoding as they were read in. Files without charset "
"information in the header (e.g. POT files) are saved in the "
"encoding set above.</p></qt>"));
- QWhatsThis::add(_autoCheckButton,i18n("<qt><p><b>Check syntax of file when saving</b></p>\n"
+ TQWhatsThis::add(_autoCheckButton,i18n("<qt><p><b>Check syntax of file when saving</b></p>\n"
"<p>Check this to automatically check syntax of file with \"msgfmt --statistics\"\n"
"when saving a file. You will only get a message, if an error occurred.</p></qt>"));
- QWhatsThis::add(_saveObsoleteButton,i18n("<qt><p><b>Save obsolete entries</b></p>\n"
+ TQWhatsThis::add(_saveObsoleteButton,i18n("<qt><p><b>Save obsolete entries</b></p>\n"
"<p>If this option is activated, obsolete entries found when the file was open\n"
"will be saved back to the file. Obsolete entries are marked by #~ and are\n"
"created when the msgmerge does not need the translation anymore.\n"
@@ -311,7 +311,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"The main drawback is the size of the saved file.</p></qt>"));
- QWhatsThis::add(dateBox, i18n("<qt><p><b>Format of Revision-Date</b></p>"
+ TQWhatsThis::add(dateBox, i18n("<qt><p><b>Format of Revision-Date</b></p>"
"<p>Choose in which format the date and time of the header field\n"
"<i>PO-Revision-Date</i> is saved: <ul>\n"
"<li><b>Default</b> is the format normally used in PO files.</li>\n"
@@ -398,92 +398,92 @@ void SavePreferences::setAutoSaveVisible( const bool on )
-IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project)
- : QWidget(parent)
+IdentityPreferences::IdentityPreferences(TQWidget* parent, const TQString& project)
+ : TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
if( !project.isEmpty() )
{
// show the project name in the widget at the top
- layout->addWidget(new QLabel(i18n("<font size=\"+1\">Project: %1</font>").arg(project),page));
+ layout->addWidget(new TQLabel(i18n("<font size=\"+1\">Project: %1</font>").arg(project),page));
}
- QGroupBox* group = new QGroupBox(2,Qt::Horizontal,page);
+ TQGroupBox* group = new TQGroupBox(2,Qt::Horizontal,page);
layout->addWidget(group);
group->setMargin(KDialog::marginHint());
- QLabel* tempLabel=new QLabel(i18n("&Name:"),group);
- _nameEdit = new QLineEdit(group, "kcfg_AuthorName");
+ TQLabel* tempLabel=new TQLabel(i18n("&Name:"),group);
+ _nameEdit = new TQLineEdit(group, "kcfg_AuthorName");
tempLabel->setBuddy(_nameEdit);
- tempLabel=new QLabel(i18n("Localized na&me:"),group);
- _localNameEdit = new QLineEdit(group, "kcfg_LocalAuthorName");
+ tempLabel=new TQLabel(i18n("Localized na&me:"),group);
+ _localNameEdit = new TQLineEdit(group, "kcfg_LocalAuthorName");
tempLabel->setBuddy(_localNameEdit);
- tempLabel=new QLabel(i18n("E&mail:"),group);
- _mailEdit = new QLineEdit(group, "kcfg_AuthorEmail");
+ tempLabel=new TQLabel(i18n("E&mail:"),group);
+ _mailEdit = new TQLineEdit(group, "kcfg_AuthorEmail");
tempLabel->setBuddy(_mailEdit);
- tempLabel=new QLabel(i18n("&Full language name:"),group);
+ tempLabel=new TQLabel(i18n("&Full language name:"),group);
- QHBox *hbox = new QHBox(group);
+ TQHBox *hbox = new TQHBox(group);
hbox->setSpacing(KDialog::spacingHint());
- _langEdit = new QLineEdit(hbox, "kcfg_Language");
+ _langEdit = new TQLineEdit(hbox, "kcfg_Language");
tempLabel->setBuddy(_langEdit);
- tempLabel=new QLabel(i18n("Lan&guage code:"),hbox);
- _langCodeEdit = new QLineEdit(hbox, "kcfg_LanguageCode");
+ tempLabel=new TQLabel(i18n("Lan&guage code:"),hbox);
+ _langCodeEdit = new TQLineEdit(hbox, "kcfg_LanguageCode");
tempLabel->setBuddy(_langCodeEdit);
- connect(_langCodeEdit,SIGNAL(textChanged(const QString&)), this
- , SLOT(checkTestPluralButton()));
+ connect(_langCodeEdit,TQT_SIGNAL(textChanged(const TQString&)), this
+ , TQT_SLOT(checkTestPluralButton()));
- tempLabel=new QLabel(i18n("&Language mailing list:"),group);
- _listEdit = new QLineEdit(group, "kcfg_Mailinglist");
+ tempLabel=new TQLabel(i18n("&Language mailing list:"),group);
+ _listEdit = new TQLineEdit(group, "kcfg_Mailinglist");
_listEdit->setMinimumSize(100,_listEdit->sizeHint().height());
tempLabel->setBuddy(_listEdit);
- tempLabel=new QLabel(i18n("&Timezone:"), group);
- _timezoneEdit = new QLineEdit(group, "kcfg_Timezone");
+ tempLabel=new TQLabel(i18n("&Timezone:"), group);
+ _timezoneEdit = new TQLineEdit(group, "kcfg_Timezone");
_timezoneEdit->setMinimumSize(100,_timezoneEdit->sizeHint().height());
tempLabel->setBuddy(_timezoneEdit);
- QString whatsThisMsg=i18n("<qt><p><b>Identity</b></p>\n"
+ TQString whatsThisMsg=i18n("<qt><p><b>Identity</b></p>\n"
"<p>Fill in information about you and your translation team.\n"
"This information is used when updating the header of a file.</p>\n"
"<p>You can find the options if and what fields in the header should be updated\n"
"on page <b>Save</b> in this dialog.</p></qt>");
- QWhatsThis::add(group,whatsThisMsg);
+ TQWhatsThis::add(group,whatsThisMsg);
- group = new QGroupBox(1,Qt::Horizontal,page);
+ group = new TQGroupBox(1,Qt::Horizontal,page);
layout->addWidget(group);
group->setMargin(KDialog::marginHint());
- hbox = new QHBox(group);
+ hbox = new TQHBox(group);
hbox->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("&Number of singular/plural forms:"), hbox);
- _pluralFormsBox = new QSpinBox(0,100,1,hbox, "kcfg_PluralForms");
+ TQLabel *label = new TQLabel(i18n("&Number of singular/plural forms:"), hbox);
+ _pluralFormsBox = new TQSpinBox(0,100,1,hbox, "kcfg_PluralForms");
_pluralFormsBox->setSpecialValueText(
i18n("automatic choose number of plural forms","Automatic"));
label->setBuddy(_pluralFormsBox);
- connect(_pluralFormsBox,SIGNAL(valueChanged(int)), this
- , SLOT(checkTestPluralButton()));
+ connect(_pluralFormsBox,TQT_SIGNAL(valueChanged(int)), this
+ , TQT_SLOT(checkTestPluralButton()));
hbox->setStretchFactor(_pluralFormsBox,1);
- _testPluralButton = new QPushButton(i18n("Te&st"),hbox);
+ _testPluralButton = new TQPushButton(i18n("Te&st"),hbox);
_testPluralButton->setEnabled(false);
- connect(_testPluralButton, SIGNAL(clicked()), this
- , SLOT(testPluralForm()));
+ connect(_testPluralButton, TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(testPluralForm()));
- const QString msg=i18n("<qt><p><b>Number of singular/plural forms</b></p>"
+ const TQString msg=i18n("<qt><p><b>Number of singular/plural forms</b></p>"
"<p><b>Note</b>: This option is KDE specific. "
"If you are not translating a KDE application, you can safely "
"ignore this option.</p>"
@@ -495,29 +495,29 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project
"<i>Automatic</i> and KBabel will try to get this information "
"automatically from KDE. Use the <i>Test</i> button "
"to test if it can find it out.</p></qt>");
- QWhatsThis::add(_pluralFormsBox,msg);
- QWhatsThis::add(_testPluralButton,msg);
+ TQWhatsThis::add(_pluralFormsBox,msg);
+ TQWhatsThis::add(_testPluralButton,msg);
- QVBox* vbox = new QVBox(group);
+ TQVBox* vbox = new TQVBox(group);
vbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&GNU plural form header:"), vbox);
+ label = new TQLabel(i18n("&GNU plural form header:"), vbox);
- hbox = new QHBox(vbox);
+ hbox = new TQHBox(vbox);
hbox->setSpacing(KDialog::spacingHint());
- _gnuPluralFormHeaderEdit = new QLineEdit(hbox, "kcfg_PluralFormsHeader");
+ _gnuPluralFormHeaderEdit = new TQLineEdit(hbox, "kcfg_PluralFormsHeader");
label->setBuddy(_gnuPluralFormHeaderEdit);
hbox->setStretchFactor(_gnuPluralFormHeaderEdit,1);
- _testGnuPluralFormButton = new QPushButton(i18n("&Lookup"),hbox);
- connect(_testGnuPluralFormButton, SIGNAL(clicked()), this
- , SLOT(lookupGnuPluralFormHeader()));
+ _testGnuPluralFormButton = new TQPushButton(i18n("&Lookup"),hbox);
+ connect(_testGnuPluralFormButton, TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(lookupGnuPluralFormHeader()));
- _checkPluralArgumentBox = new QCheckBox( i18n("Re&quire plural form arguments in translation")
+ _checkPluralArgumentBox = new TQCheckBox( i18n("Re&quire plural form arguments in translation")
, group, "kcfg_CheckPluralArgument" );
- QWhatsThis::add(_checkPluralArgumentBox,
+ TQWhatsThis::add(_checkPluralArgumentBox,
i18n("<qt><p><b>Require plural form arguments in translation</b></p>\n"
"<p><b>Note</b>: This option is KDE specific at the moment. "
"If you are not translating a KDE application, you can safely "
@@ -525,7 +525,7 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project
"<p>If is this option enabled, the validation check will "
"require the %n argument to be present in the message.</p></qt>"));
- QWhatsThis::add(_gnuPluralFormHeaderEdit,
+ TQWhatsThis::add(_gnuPluralFormHeaderEdit,
i18n("<qt><p><b>GNU plural form header</b></p>\n"
"<p>Here you can fill a header entry for GNU plural form handling; "
"if you leave the entry empty, the entry in the PO file will not be "
@@ -557,18 +557,18 @@ void IdentityPreferences::defaults(const IdentitySettings& settings)
_checkPluralArgumentBox->setChecked(settings.checkPluralArgument);
}
-bool IdentityPreferences::eventFilter(QObject *o, QEvent *e)
+bool IdentityPreferences::eventFilter(TQObject *o, TQEvent *e)
{
- if(e->type() == QEvent::Drop)
+ if(e->type() == TQEvent::Drop)
{
- QDropEvent *de = static_cast<QDropEvent*>(e);
+ TQDropEvent *de = static_cast<TQDropEvent*>(e);
KURL::List urlList;
if(de && KURLDrag::decode(de,urlList))
{
KURL url(urlList.first());
if(url.protocol()== "mailto")
{
- QString mail=url.path();
+ TQString mail=url.path();
bool handled=false;
if(o == _mailEdit)
@@ -594,14 +594,14 @@ bool IdentityPreferences::eventFilter(QObject *o, QEvent *e)
void IdentityPreferences::checkTestPluralButton()
{
int val = _pluralFormsBox->value();
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
_testPluralButton->setEnabled(val==0 && !lang.isEmpty());
}
void IdentityPreferences::testPluralForm()
{
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
if(lang.isEmpty())
{
@@ -611,7 +611,7 @@ void IdentityPreferences::testPluralForm()
int number=Catalog::getNumberOfPluralForms(lang);
- QString msg;
+ TQString msg;
if(number < 0)
{
@@ -635,7 +635,7 @@ void IdentityPreferences::testPluralForm()
void IdentityPreferences::lookupGnuPluralFormHeader()
{
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
if(lang.isEmpty())
{
@@ -643,7 +643,7 @@ void IdentityPreferences::lookupGnuPluralFormHeader()
return;
}
- QString header=GNUPluralForms(lang);
+ TQString header=GNUPluralForms(lang);
if( header.isEmpty() )
{
@@ -658,39 +658,39 @@ void IdentityPreferences::lookupGnuPluralFormHeader()
}
-MiscPreferences::MiscPreferences(QWidget *parent)
- : QWidget(parent), _regExpEditDialog(0)
+MiscPreferences::MiscPreferences(TQWidget *parent)
+ : TQWidget(parent), _regExpEditDialog(0)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- QHBox *hbox = new QHBox(box);
+ TQHBox *hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("&Marker for keyboard accelerator:"),hbox);
+ TQLabel *label = new TQLabel(i18n("&Marker for keyboard accelerator:"),hbox);
accelMarkerEdit = new KLineEdit(hbox, "kcfg_AccelMarker");
accelMarkerEdit->setMaxLength(1);
label->setBuddy(accelMarkerEdit);
hbox->setStretchFactor(accelMarkerEdit,1);
- QString msg=i18n("<qt><p><b>Marker for keyboard accelerator</b></p>"
+ TQString msg=i18n("<qt><p><b>Marker for keyboard accelerator</b></p>"
"<p>Define here, what character marks the following "
"character as keyboard accelerator. For example in Qt it is "
"'&amp;' and in Gtk it is '_'.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(accelMarkerEdit,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(accelMarkerEdit,msg);
- hbox = new QHBox(box);
+ hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&Regular expression for context information:")
+ label = new TQLabel(i18n("&Regular expression for context information:")
,hbox);
contextInfoEdit = new KLineEdit(hbox, "kcfg_ContextInfo");
label->setBuddy(contextInfoEdit);
@@ -700,27 +700,27 @@ MiscPreferences::MiscPreferences(QWidget *parent)
"<p>Enter a regular expression here which defines what is "
"context information in the message and must not get "
"translated.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(contextInfoEdit,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(contextInfoEdit,msg);
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
- _regExpButton = new QPushButton( i18n("&Edit..."), hbox );
- connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked()));
+ _regExpButton = new TQPushButton( i18n("&Edit..."), hbox );
+ connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));
}
// preferences for mail attachments
- QVButtonGroup* vbgroup = new QVButtonGroup(page);
+ TQVButtonGroup* vbgroup = new TQVButtonGroup(page);
vbgroup->setTitle(i18n("Compression Method for Mail Attachments"));
vbgroup->setRadioButtonExclusive(true);
vbgroup->setMargin(KDialog::marginHint());
layout->addWidget(vbgroup);
- bzipButton = new QRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression");
- gzipButton = new QRadioButton(i18n("tar/&gzip"), vbgroup);
+ bzipButton = new TQRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression");
+ gzipButton = new TQRadioButton(i18n("tar/&gzip"), vbgroup);
- compressSingle = new QCheckBox(i18n("&Use compression when sending "
+ compressSingle = new TQCheckBox(i18n("&Use compression when sending "
"a single file"), vbgroup, "kcfg_CompressSingleFile");
layout->addStretch(1);
@@ -739,12 +739,12 @@ void MiscPreferences::defaults(const MiscSettings& settings)
compressSingle->setChecked(settings.compressSingleFile);
}
-QString MiscPreferences::contextInfo() const
+TQString MiscPreferences::contextInfo() const
{
- QString temp=contextInfoEdit->text();
+ TQString temp=contextInfoEdit->text();
bool quoted=false;
- QString newStr;
+ TQString newStr;
for(uint i=0; i<temp.length(); i++)
{
@@ -768,7 +768,7 @@ QString MiscPreferences::contextInfo() const
return newStr;
}
-void MiscPreferences::setContextInfo(QString reg)
+void MiscPreferences::setContextInfo(TQString reg)
{
reg.replace("\n","\\n");
contextInfoEdit->setText(reg);
@@ -777,61 +777,61 @@ void MiscPreferences::setContextInfo(QString reg)
void MiscPreferences::regExpButtonClicked()
{
if ( _regExpEditDialog==0 )
- _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>
- ("KRegExpEditor/KRegExpEditor", QString::null, this );
+ _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>
+ ("KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( _regExpEditDialog );
if( iface )
{
iface->setRegExp( contextInfoEdit->text() );
- if( _regExpEditDialog->exec() == QDialog::Accepted )
+ if( _regExpEditDialog->exec() == TQDialog::Accepted )
contextInfoEdit->setText( iface->regExp() );
}
}
-SpellPreferences::SpellPreferences(QWidget* parent)
- : QWidget(parent)
+SpellPreferences::SpellPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- onFlyBtn = new QCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck");
+ onFlyBtn = new TQCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck");
layout->addWidget(onFlyBtn);
- QWhatsThis::add(onFlyBtn, i18n("<qt><p><b>On the fly spellchecking</b></p>"
+ TQWhatsThis::add(onFlyBtn, i18n("<qt><p><b>On the fly spellchecking</b></p>"
"<p>Activate this to let KBabel spell check the text "
"as you type. Mispelled words will be colored by the error color.</p></qt>"));
spellConfig = new KSpellConfig(page,"spellConfigWidget",0,false);
layout->addWidget(spellConfig);
- remIgnoredBtn = new QCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored");
+ remIgnoredBtn = new TQCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored");
layout->addWidget(remIgnoredBtn);
- connect( spellConfig, SIGNAL( configChanged() )
- , this, SIGNAL ( settingsChanged() ) );
+ connect( spellConfig, TQT_SIGNAL( configChanged() )
+ , this, TQT_SIGNAL ( settingsChanged() ) );
- QLabel *tempLabel = new QLabel(i18n("F&ile to store ignored words:"),page);
+ TQLabel *tempLabel = new TQLabel(i18n("F&ile to store ignored words:"),page);
layout->addWidget(tempLabel);
ignoreURLEdit = new KURLRequester(page, "kcfg_IgnoreURL");
layout->addWidget(ignoreURLEdit);
tempLabel->setBuddy(ignoreURLEdit);
- connect(remIgnoredBtn,SIGNAL(toggled(bool)),ignoreURLEdit
- ,SLOT(setEnabled(bool)));
+ connect(remIgnoredBtn,TQT_SIGNAL(toggled(bool)),ignoreURLEdit
+ ,TQT_SLOT(setEnabled(bool)));
- QString msg = i18n("<qt><p><b>Remember ignored words</b></p>"
+ TQString msg = i18n("<qt><p><b>Remember ignored words</b></p>"
"<p>Activate this, to let KBabel ignore the words, where you have "
"chosen <i>Ignore All</i> in the spell check dialog, "
"in every spell check.</p></qt>");
- QWhatsThis::add(remIgnoredBtn,msg);
- QWhatsThis::add(tempLabel,msg);
- QWhatsThis::add(ignoreURLEdit,msg);
+ TQWhatsThis::add(remIgnoredBtn,msg);
+ TQWhatsThis::add(tempLabel,msg);
+ TQWhatsThis::add(ignoreURLEdit,msg);
layout->addStretch(1);
@@ -874,21 +874,21 @@ void SpellPreferences::defaults(const SpellcheckSettings& settings)
*spellConfig = spCfg;
}
-CatmanPreferences::CatmanPreferences(QWidget* parent)
- : QWidget(parent)
+CatmanPreferences::CatmanPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- QLabel* label=new QLabel(i18n("&Base folder of PO files:"),box);
- QHBox* hbox = new QHBox(box);
+ TQLabel* label=new TQLabel(i18n("&Base folder of PO files:"),box);
+ TQHBox* hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
const KFile::Mode mode = static_cast<KFile::Mode>( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
@@ -900,8 +900,8 @@ CatmanPreferences::CatmanPreferences(QWidget* parent)
label->setBuddy(_poDirEdit);
- label=new QLabel(i18n("Ba&se folder of POT files:"),box);
- hbox = new QHBox(box);
+ label=new TQLabel(i18n("Ba&se folder of POT files:"),box);
+ hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
_potDirEdit = new KURLRequester(hbox, "kcfg_PotBaseDir");
@@ -911,40 +911,40 @@ CatmanPreferences::CatmanPreferences(QWidget* parent)
- QWhatsThis::add(box,i18n("<qt><p><b>Base folders</b></p>\n"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Base folders</b></p>\n"
"<p>Type in the folders which contain all your PO and POT files.\n"
"The files and the folders in these folders will then be merged into one\n"
"tree.</p></qt>"));
- box=new QGroupBox(1,Qt::Horizontal,page);
+ box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- _openWindowButton = new QCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow");
+ _openWindowButton = new TQCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow");
- QWhatsThis::add(_openWindowButton,i18n("<qt><p><b>Open files in new window</b></p>\n"
+ TQWhatsThis::add(_openWindowButton,i18n("<qt><p><b>Open files in new window</b></p>\n"
"<p>If this is activated all files that are opened from the Catalog Manager are opened\n"
"in a new window.</p></qt>"));
- _killButton = new QCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" );
+ _killButton = new TQCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" );
- QWhatsThis::add( _killButton , i18n("<qt><p><b>Kill processes on exit</b></p>\n"
+ TQWhatsThis::add( _killButton , i18n("<qt><p><b>Kill processes on exit</b></p>\n"
"<p>If you check this, KBabel tries to kill the processes, that have not exited already when KBabel exits,\n"
"by sending a kill signal to them.</p>\n"
"<p>NOTE: It is not guaranteed that the processes will be killed.</p></qt>") );
- _indexButton = new QCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
+ _indexButton = new TQCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
- QWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
+ TQWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
"<p>If you check this, KBabel will create an index for each PO file to speed up the find/replace functions.</p>\n"
"<p>NOTE: This will slow down updating the file information considerably.</p></qt>") );
- m_msgfmtButton = new QCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );
+ m_msgfmtButton = new TQCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );
- QWhatsThis::add( m_msgfmtButton, i18n("<qt><p><b>Run msgfmt before processing a file</b></p>"
+ TQWhatsThis::add( m_msgfmtButton, i18n("<qt><p><b>Run msgfmt before processing a file</b></p>"
"<p>If you enable this, KBabel will run Gettext's "
"msgfmt tool before processing a file.</p>"
"<p>Enabling this setting is recommended, even if it causes processing to be slower. "
@@ -976,26 +976,26 @@ void CatmanPreferences::defaults(const CatManSettings& settings)
m_msgfmtButton->setChecked( settings.msgfmt );
}
-DirCommandsPreferences::DirCommandsPreferences(QWidget* parent)
- : QWidget(parent)
+DirCommandsPreferences::DirCommandsPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box = new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page );
+ TQGroupBox* box = new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page );
box->setMargin( KDialog::marginHint() );
layout->addWidget( box );
_dirCmdEdit = new CmdEdit( box );
- new QLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n"
+ new TQLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n"
"@POFILES@, @MARKEDPOFILES@"), box);
- connect (_dirCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged()));
+ connect (_dirCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged()));
- QWhatsThis::add( box , i18n("<qt><p><b>Commands for folders</b></p>"
+ TQWhatsThis::add( box , i18n("<qt><p><b>Commands for folders</b></p>"
"<p>Insert here the commands you want to execute in folders from "
"the Catalog Manager. The commands are then shown in the submenu "
"<b>Commands</b> in the Catalog Manager's context menu.</p>"
@@ -1039,26 +1039,26 @@ void DirCommandsPreferences::defaults(const CatManSettings& settings)
}
-FileCommandsPreferences::FileCommandsPreferences(QWidget* parent)
- : QWidget(parent)
+FileCommandsPreferences::FileCommandsPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page );
+ TQGroupBox* box=new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page );
box->setMargin( KDialog::marginHint() );
layout->addWidget( box );
_fileCmdEdit = new CmdEdit( box );
- new QLabel( i18n("Replaceables:\n"
+ new TQLabel( i18n("Replaceables:\n"
"@PACKAGE@, @POFILE@,@POTFILE@,\n@PODIR@, @POTDIR@"), box);
- connect (_fileCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged()));
+ connect (_fileCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged()));
- QWhatsThis::add( box , i18n("<qt><p><b>Commands for files</b></p>"
+ TQWhatsThis::add( box , i18n("<qt><p><b>Commands for files</b></p>"
"<p>Insert here the commands you want to execute on files from "
"the Catalog Manager. The commands are then shown in the submenu "
"<b>Commands</b> in the Catalog Manager's context menu.</p>"
@@ -1102,28 +1102,28 @@ void FileCommandsPreferences::defaults(const CatManSettings& settings)
_fileCmdEdit->setCommands( settings.fileCommands, settings.fileCommandNames );
}
-ViewPreferences::ViewPreferences(QWidget* parent)
- : QWidget(parent)
+ViewPreferences::ViewPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page);
+ TQGroupBox* box=new TQGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- _flagColumnCheckbox = new QCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" );
- _fuzzyColumnCheckbox = new QCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" );
- _untranslatedColumnCheckbox = new QCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" );
- _totalColumnCheckbox = new QCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" );
- _cvsColumnCheckbox = new QCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" );
- _revisionColumnCheckbox = new QCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" );
- _translatorColumnCheckbox = new QCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" );
+ _flagColumnCheckbox = new TQCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" );
+ _fuzzyColumnCheckbox = new TQCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" );
+ _untranslatedColumnCheckbox = new TQCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" );
+ _totalColumnCheckbox = new TQCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" );
+ _cvsColumnCheckbox = new TQCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" );
+ _revisionColumnCheckbox = new TQCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" );
+ _translatorColumnCheckbox = new TQCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" );
- QWhatsThis::add(box,i18n("<qt><p><b>Shown columns</b></p>\n"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Shown columns</b></p>\n"
"<p></p></qt>"));
layout->addStretch(1);
@@ -1145,16 +1145,16 @@ void ViewPreferences::defaults(const CatManSettings& _settings)
_translatorColumnCheckbox->setChecked(_settings.translatorColumn);
}
-SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(parent)
+SourceContextPreferences::SourceContextPreferences(TQWidget* parent): TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QHBox* box = new QHBox(page);
+ TQHBox* box = new TQHBox(page);
box->setSpacing(KDialog::spacingHint());
- QLabel* tempLabel=new QLabel(i18n("&Base folder for source code:"),box);
+ TQLabel* tempLabel=new TQLabel(i18n("&Base folder for source code:"),box);
const KFile::Mode mode = static_cast<KFile::Mode>( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
_coderootEdit = new KURLRequester ( box, "kcfg_CodeRoot" );
@@ -1168,8 +1168,8 @@ SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(par
_pathsEditor->setTitle(i18n("Path Patterns"));
layout->addWidget(_pathsEditor);
- connect ( _pathsEditor, SIGNAL (itemsChanged ())
- , this, SIGNAL (itemsChanged ()));
+ connect ( _pathsEditor, TQT_SIGNAL (itemsChanged ())
+ , this, TQT_SIGNAL (itemsChanged ()));
_pathsEditor->installEventFilter(this);
@@ -1195,11 +1195,11 @@ void SourceContextPreferences::defaults(const KBabel::SourceContextSettings& set
_pathsEditor->setList(settings.sourcePaths);
}
-bool SourceContextPreferences::eventFilter( QObject *, QEvent *e )
+bool SourceContextPreferences::eventFilter( TQObject *, TQEvent *e )
{
- if( e->type() == QEvent::KeyPress )
+ if( e->type() == TQEvent::KeyPress )
{
- QKeyEvent *ke = dynamic_cast<QKeyEvent*>(e);
+ TQKeyEvent *ke = dynamic_cast<TQKeyEvent*>(e);
if( ke->key() == Key_Return || ke->key() == Key_Enter )
return true;
}
diff --git a/kbabel/commonui/projectprefwidgets.h b/kbabel/commonui/projectprefwidgets.h
index 81a1b3e6..8dd7b561 100644
--- a/kbabel/commonui/projectprefwidgets.h
+++ b/kbabel/commonui/projectprefwidgets.h
@@ -36,7 +36,7 @@
#define PROJECTPREFWIDGETS_H
#include <ktabctl.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "projectsettings.h"
@@ -66,42 +66,42 @@ class KDE_EXPORT SavePreferences : public KTabCtl
{
Q_OBJECT
public:
- SavePreferences(QWidget* parent=0);
+ SavePreferences(TQWidget* parent=0);
void defaults(const KBabel::SaveSettings& settings);
void setAutoSaveVisible(const bool on);
private:
- QCheckBox* _lastButton;
- QCheckBox* _revisionButton;
- QCheckBox* _languageButton;
- QCheckBox* _charsetButton;
- QCheckBox* _encodingButton;
- QCheckBox* _projectButton;
-
- QCheckBox* _updateButton;
- QCheckBox* _autoCheckButton;
- QCheckBox* _saveObsoleteButton;
-
- QComboBox* _encodingBox;
- QCheckBox* _oldEncodingButton;
-
- QRadioButton* _defaultDateButton;
- QRadioButton* _localDateButton;
- QRadioButton* _customDateButton;
- QLineEdit* _dateFormatEdit;
+ TQCheckBox* _lastButton;
+ TQCheckBox* _revisionButton;
+ TQCheckBox* _languageButton;
+ TQCheckBox* _charsetButton;
+ TQCheckBox* _encodingButton;
+ TQCheckBox* _projectButton;
+
+ TQCheckBox* _updateButton;
+ TQCheckBox* _autoCheckButton;
+ TQCheckBox* _saveObsoleteButton;
+
+ TQComboBox* _encodingBox;
+ TQCheckBox* _oldEncodingButton;
+
+ TQRadioButton* _defaultDateButton;
+ TQRadioButton* _localDateButton;
+ TQRadioButton* _customDateButton;
+ TQLineEdit* _dateFormatEdit;
- QLineEdit* _projectEdit;
+ TQLineEdit* _projectEdit;
- QRadioButton* _removeFSFButton;
- QRadioButton* _updateFSFButton;
- QRadioButton* _nochangeFSFButton;
- QCheckBox* _translatorCopyrightButton;
+ TQRadioButton* _removeFSFButton;
+ TQRadioButton* _updateFSFButton;
+ TQRadioButton* _nochangeFSFButton;
+ TQCheckBox* _translatorCopyrightButton;
- QCheckBox* _descriptionButton;
- QLineEdit* _descriptionEdit;
+ TQCheckBox* _descriptionButton;
+ TQLineEdit* _descriptionEdit;
KIntNumInput * _autoSaveDelay;
- QGroupBox * _autoSaveBox;
+ TQGroupBox * _autoSaveBox;
private slots:
void customDateActivated(bool on);
@@ -112,8 +112,8 @@ class IdentityPreferences : public QWidget
{
Q_OBJECT
public:
- IdentityPreferences(QWidget *parent = 0, const QString& project = "");
- virtual bool eventFilter(QObject *, QEvent*);
+ IdentityPreferences(TQWidget *parent = 0, const TQString& project = "");
+ virtual bool eventFilter(TQObject *, TQEvent*);
void defaults(const KBabel::IdentitySettings& settings);
private slots:
@@ -122,19 +122,19 @@ private slots:
void lookupGnuPluralFormHeader();
private:
- QLineEdit* _nameEdit;
- QLineEdit* _localNameEdit;
- QLineEdit* _mailEdit;
- QLineEdit* _langEdit;
- QLineEdit* _langCodeEdit;
- QLineEdit* _listEdit;
-
- QLineEdit* _timezoneEdit;
- QSpinBox *_pluralFormsBox;
- QPushButton *_testPluralButton;
- QCheckBox* _checkPluralArgumentBox;
- QLineEdit* _gnuPluralFormHeaderEdit;
- QPushButton *_testGnuPluralFormButton;
+ TQLineEdit* _nameEdit;
+ TQLineEdit* _localNameEdit;
+ TQLineEdit* _mailEdit;
+ TQLineEdit* _langEdit;
+ TQLineEdit* _langCodeEdit;
+ TQLineEdit* _listEdit;
+
+ TQLineEdit* _timezoneEdit;
+ TQSpinBox *_pluralFormsBox;
+ TQPushButton *_testPluralButton;
+ TQCheckBox* _checkPluralArgumentBox;
+ TQLineEdit* _gnuPluralFormHeaderEdit;
+ TQPushButton *_testGnuPluralFormButton;
};
@@ -142,32 +142,32 @@ class MiscPreferences : public QWidget
{
Q_OBJECT
public:
- MiscPreferences(QWidget *parent=0);
+ MiscPreferences(TQWidget *parent=0);
void defaults(const KBabel::MiscSettings& settings);
private slots:
void regExpButtonClicked();
private:
- void setContextInfo(QString reg);
- QString contextInfo() const;
+ void setContextInfo(TQString reg);
+ TQString contextInfo() const;
KLineEdit *contextInfoEdit;
KLineEdit *accelMarkerEdit;
- QDialog *_regExpEditDialog;
- QPushButton *_regExpButton;
+ TQDialog *_regExpEditDialog;
+ TQPushButton *_regExpButton;
- QRadioButton* bzipButton;
- QRadioButton* gzipButton;
- QCheckBox* compressSingle;
+ TQRadioButton* bzipButton;
+ TQRadioButton* gzipButton;
+ TQCheckBox* compressSingle;
};
class SpellPreferences : public QWidget
{
Q_OBJECT
public:
- SpellPreferences(QWidget *parent=0);
+ SpellPreferences(TQWidget *parent=0);
void mergeSettings(KBabel::SpellcheckSettings& set) const;
void updateWidgets(const KBabel::SpellcheckSettings& settings);
@@ -178,8 +178,8 @@ signals:
private:
KSpellConfig* spellConfig;
- QCheckBox* remIgnoredBtn;
- QCheckBox* onFlyBtn;
+ TQCheckBox* remIgnoredBtn;
+ TQCheckBox* onFlyBtn;
KURLRequester* ignoreURLEdit;
};
@@ -188,25 +188,25 @@ class CatmanPreferences : public QWidget
{
Q_OBJECT
public:
- CatmanPreferences(QWidget *parent = 0);
+ CatmanPreferences(TQWidget *parent = 0);
void defaults(const KBabel::CatManSettings& settings);
private:
KURLRequester* _poDirEdit;
KURLRequester* _potDirEdit;
- QCheckBox* _openWindowButton;
+ TQCheckBox* _openWindowButton;
- QCheckBox* _killButton;
- QCheckBox* _indexButton;
- QCheckBox* m_msgfmtButton;
+ TQCheckBox* _killButton;
+ TQCheckBox* _indexButton;
+ TQCheckBox* m_msgfmtButton;
};
class DirCommandsPreferences : public QWidget
{
Q_OBJECT
public:
- DirCommandsPreferences(QWidget *parent = 0);
+ DirCommandsPreferences(TQWidget *parent = 0);
virtual ~DirCommandsPreferences();
void mergeSettings(KBabel::CatManSettings& settings) const;
@@ -224,7 +224,7 @@ class FileCommandsPreferences : public QWidget
{
Q_OBJECT
public:
- FileCommandsPreferences(QWidget *parent = 0);
+ FileCommandsPreferences(TQWidget *parent = 0);
virtual ~FileCommandsPreferences();
void mergeSettings(KBabel::CatManSettings& settings) const;
@@ -242,17 +242,17 @@ class ViewPreferences : public QWidget
{
Q_OBJECT
public:
- ViewPreferences(QWidget *parent = 0);
+ ViewPreferences(TQWidget *parent = 0);
void defaults(const KBabel::CatManSettings& settings);
private:
- QCheckBox* _flagColumnCheckbox;
- QCheckBox* _fuzzyColumnCheckbox;
- QCheckBox* _untranslatedColumnCheckbox;
- QCheckBox* _totalColumnCheckbox;
- QCheckBox* _cvsColumnCheckbox;
- QCheckBox* _revisionColumnCheckbox;
- QCheckBox* _translatorColumnCheckbox;
+ TQCheckBox* _flagColumnCheckbox;
+ TQCheckBox* _fuzzyColumnCheckbox;
+ TQCheckBox* _untranslatedColumnCheckbox;
+ TQCheckBox* _totalColumnCheckbox;
+ TQCheckBox* _cvsColumnCheckbox;
+ TQCheckBox* _revisionColumnCheckbox;
+ TQCheckBox* _translatorColumnCheckbox;
};
/**
@@ -265,14 +265,14 @@ class SourceContextPreferences : public QWidget
{
Q_OBJECT
public:
- SourceContextPreferences(QWidget* parent=0);
+ SourceContextPreferences(TQWidget* parent=0);
virtual ~SourceContextPreferences();
void mergeSettings(KBabel::SourceContextSettings& settings) const;
void updateWidgets(const KBabel::SourceContextSettings& settings);
void defaults(const KBabel::SourceContextSettings& settings);
- virtual bool eventFilter(QObject *, QEvent*);
+ virtual bool eventFilter(TQObject *, TQEvent*);
signals:
void itemsChanged ();
diff --git a/kbabel/commonui/projectwizard.cpp b/kbabel/commonui/projectwizard.cpp
index d1202f4a..e5df7285 100644
--- a/kbabel/commonui/projectwizard.cpp
+++ b/kbabel/commonui/projectwizard.cpp
@@ -37,7 +37,7 @@
#include "kbprojectmanager.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
+ProjectWizard::ProjectWizard(TQWidget *parent,const char *name)
: KWizard(parent,name,true)
{
_wizard = new ProjectStep1(this,"project wizard widget");
// fill the known language codes
KConfig all_languages("all_languages", true, false, "locale");
- QStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha();
- for (QStringList::iterator it = lang_codes.begin();
+ TQStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha();
+ for (TQStringList::iterator it = lang_codes.begin();
it != lang_codes.end(); ++it)
{
// we need untranslated entries here, because of Translation Robot!
- QString entry = (*it);
+ TQString entry = (*it);
const int i = entry.find('_');
entry.replace(0, i, entry.left(i).lower());
all_languages.setGroup(entry);
@@ -71,9 +71,9 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
}
}
- connect( _wizard->_projectName, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
- connect( _wizard->_projectFile, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
- connect( this, SIGNAL( helpClicked( void ) ), this, SLOT( slotHelpClicked( void ) ) );
+ connect( _wizard->_projectName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &)));
+ connect( _wizard->_projectFile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &)));
+ connect( this, TQT_SIGNAL( helpClicked( void ) ), this, TQT_SLOT( slotHelpClicked( void ) ) );
addPage(_wizard, i18n("Basic Project Information"));
@@ -86,7 +86,7 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
setNextEnabled (_wizard, false);
}
-QString ProjectWizard::url()
+TQString ProjectWizard::url()
{
return _wizard->_projectFile->url();
}
@@ -133,7 +133,7 @@ Project::Ptr ProjectWizard::project()
void ProjectWizard::next()
{
// check if the file exists
- QFileInfo file(url());
+ TQFileInfo file(url());
if( file.exists() )
{
@@ -145,7 +145,7 @@ void ProjectWizard::next()
KWizard::next();
}
-void ProjectWizard::textChanged(const QString &)
+void ProjectWizard::textChanged(const TQString &)
{
setNextEnabled( _wizard, !_wizard->_projectName->text().isEmpty() && !_wizard->_projectFile->url().isEmpty() );
}
@@ -153,7 +153,7 @@ void ProjectWizard::textChanged(const QString &)
Project::Ptr ProjectWizard::newProject()
{
ProjectWizard* dialog = new ProjectWizard();
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
Project::Ptr res = dialog->project();
delete dialog;
diff --git a/kbabel/commonui/projectwizard.h b/kbabel/commonui/projectwizard.h
index 5c994784..7805190f 100644
--- a/kbabel/commonui/projectwizard.h
+++ b/kbabel/commonui/projectwizard.h
@@ -37,8 +37,8 @@
#include "kbproject.h"
-#include "qmap.h"
-#include "qstring.h"
+#include "tqmap.h"
+#include "tqstring.h"
class ProjectStep1;
class ProjectStep2;
@@ -49,16 +49,16 @@ class KDE_EXPORT ProjectWizard : public KWizard
{
Q_OBJECT
public:
- ProjectWizard(QWidget* parent = 0, const char * name = 0);
+ ProjectWizard(TQWidget* parent = 0, const char * name = 0);
Project::Ptr project();
- QString url();
+ TQString url();
static Project::Ptr newProject();
private slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void slotHelpClicked( void );
virtual void next();
@@ -66,7 +66,7 @@ private:
ProjectStep1* _wizard;
ProjectStep2* _wizard2;
- QMap<QString, QString> m_language_codes;
+ TQMap<TQString, TQString> m_language_codes;
};
}
diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp
index de321044..75395630 100644
--- a/kbabel/commonui/roughtransdlg.cpp
+++ b/kbabel/commonui/roughtransdlg.cpp
@@ -40,16 +40,16 @@
#include "regexpextractor.h"
#include "roughtransdlg.h"
-#include <qmemarray.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qtimer.h>
-#include <qvgroupbox.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqmemarray.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqtimer.h>
+#include <tqvgroupbox.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -64,7 +64,7 @@
using namespace KBabel;
RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
- , QWidget *parent,const char *name)
+ , TQWidget *parent,const char *name)
: KDialogBase(parent,name,true
,i18n("Caption of dialog","Rough Translation")
, User1|User2|User3|Close)
@@ -85,45 +85,45 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
enableButton(User2,false);
enableButton(User3,false);
- QWidget *mw = new QWidget(this);
+ TQWidget *mw = new TQWidget(this);
setMainWidget(mw);
- QVBoxLayout *mainLayout = new QVBoxLayout(mw);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(mw);
- configWidget = new QVBox(mw);
+ configWidget = new TQVBox(mw);
mainLayout->addWidget(configWidget);
- QVGroupBox *box = new QVGroupBox(i18n("What to Translate"),configWidget);
+ TQVGroupBox *box = new TQVGroupBox(i18n("What to Translate"),configWidget);
- QHButtonGroup *bBox = new QHButtonGroup(box);
+ TQHButtonGroup *bBox = new TQHButtonGroup(box);
bBox->setMargin(0);
- bBox->setFrameStyle(QFrame::NoFrame);
+ bBox->setFrameStyle(TQFrame::NoFrame);
whatBox = bBox;
- untransButton = new QCheckBox(i18n("U&ntranslated entries"),bBox);
- fuzzyButton = new QCheckBox(i18n("&Fuzzy entries"),bBox);
- transButton = new QCheckBox(i18n("T&ranslated entries"),bBox);
+ untransButton = new TQCheckBox(i18n("U&ntranslated entries"),bBox);
+ fuzzyButton = new TQCheckBox(i18n("&Fuzzy entries"),bBox);
+ transButton = new TQCheckBox(i18n("T&ranslated entries"),bBox);
- connect(bBox,SIGNAL(clicked(int)),this,SLOT(msgButtonClicked(int)));
+ connect(bBox,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(msgButtonClicked(int)));
- QWhatsThis::add(bBox,i18n("<qt><p><b>What entries to translate</b></p>"
+ TQWhatsThis::add(bBox,i18n("<qt><p><b>What entries to translate</b></p>"
"<p>Choose here, for which entries of the file KBabel "
"tries to find a translation. Changed entries are always "
"marked as fuzzy, no matter which option you choose.</p></qt>"));
- box = new QVGroupBox(i18n("How to Translate"),configWidget);
- bBox = new QHButtonGroup(box);
- bBox->setFrameStyle(QFrame::NoFrame);
+ box = new TQVGroupBox(i18n("How to Translate"),configWidget);
+ bBox = new TQHButtonGroup(box);
+ bBox->setFrameStyle(TQFrame::NoFrame);
bBox->setMargin(0);
- searchMatchButton = new QCheckBox(i18n("&Use dictionary settings")
+ searchMatchButton = new TQCheckBox(i18n("&Use dictionary settings")
,bBox);
- fuzzyMatchButton = new QCheckBox(i18n("Fu&zzy translation (slow)")
+ fuzzyMatchButton = new TQCheckBox(i18n("Fu&zzy translation (slow)")
,bBox);
- singleWordButton = new QCheckBox(i18n("&Single word translation")
+ singleWordButton = new TQCheckBox(i18n("&Single word translation")
,bBox);
- QWhatsThis::add(bBox,i18n("<qt><p><b>How messages get translated</b></p>"
+ TQWhatsThis::add(bBox,i18n("<qt><p><b>How messages get translated</b></p>"
"<p>Here you can define if a message can only get translated "
"completely, if similar messages are acceptable or if KBabel "
"is supposed to try translating "
@@ -131,11 +131,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"complete message or similar message was found.</p></qt>"));
- box = new QVGroupBox(i18n("Options"),configWidget);
+ box = new TQVGroupBox(i18n("Options"),configWidget);
- markFuzzyButton = new QCheckBox(i18n("&Mark changed entries as fuzzy"),box);
+ markFuzzyButton = new TQCheckBox(i18n("&Mark changed entries as fuzzy"),box);
markFuzzyButton->setChecked(true);
- QWhatsThis::add(markFuzzyButton,
+ TQWhatsThis::add(markFuzzyButton,
i18n("<qt><p><b>Mark changed entries as fuzzy</b></p>"
"<p>When a translation for a message is found, the entry "
"will be marked <b>fuzzy</b> by default. This is because the "
@@ -144,25 +144,25 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"you know what you are doing.</p></qt>"));
- connect(markFuzzyButton, SIGNAL(toggled(bool))
- , this, SLOT(fuzzyButtonToggled(bool)));
+ connect(markFuzzyButton, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(fuzzyButtonToggled(bool)));
- kdeButton = new QCheckBox(i18n("Initialize &KDE-specific entries"),box);
+ kdeButton = new TQCheckBox(i18n("Initialize &KDE-specific entries"),box);
kdeButton->setChecked(true);
- QWhatsThis::add(kdeButton,
+ TQWhatsThis::add(kdeButton,
i18n("<qt><p><b>Initialize KDE-specific entries</b></p>"
"<p>Initialize \"Comment=\" and \"Name=\" entries "
"if a translation is not found. Also, \"NAME OF TRANSLATORS\" "
"and \"EMAIL OF TRANSLATORS\" is filled with identity settings.</p></qt>"));
- QVGroupBox *dBox = new QVGroupBox(i18n("Dictionaries"),configWidget);
+ TQVGroupBox *dBox = new TQVGroupBox(i18n("Dictionaries"),configWidget);
configWidget->setStretchFactor(dBox,1);
- QPtrList<ModuleInfo> moduleList = dict->moduleInfos();
+ TQPtrList<ModuleInfo> moduleList = dict->moduleInfos();
KConfig *config = KGlobal::config();
KConfigGroupSaver gs(config,"RoughTranslation");
- QStringList selectedList=config->readListEntry("Selected");
+ TQStringList selectedList=config->readListEntry("Selected");
if(selectedList.isEmpty())
{
int a = dict->activeModule();
@@ -174,7 +174,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
}
dictChooser = new DictChooser(dict,selectedList,dBox,"dictChooser");
- QWhatsThis::add(dictChooser,i18n("<qt><p><b>Dictionaries</b></p>"
+ TQWhatsThis::add(dictChooser,i18n("<qt><p><b>Dictionaries</b></p>"
"<p>Choose here, which dictionaries have to be used for "
"finding a translation. If you select more than one "
"dictionary, they are used in the same order as they "
@@ -183,11 +183,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"configure selected dictionary. The original settings "
"will be restored after closing the dialog.</p></qt>"));
- QLabel* label = new QLabel( i18n("Messages:"), mw );
+ TQLabel* label = new TQLabel( i18n("Messages:"), mw );
progressbar = new KProgress(mw,"progressbar");
progressbar->setTextEnabled(true);
progressbar->setFormat("%v/%m (%p%)");
- QHBoxLayout* pblayout= new QHBoxLayout(mainLayout);
+ TQHBoxLayout* pblayout= new TQHBoxLayout(mainLayout);
pblayout->add(label);
pblayout->add(progressbar);
@@ -249,7 +249,7 @@ void RoughTransDlg::slotUser1()
partTransCounter=0;
totalTried=0;
- QTimer::singleShot(0,this, SLOT(translate()));
+ TQTimer::singleShot(0,this, TQT_SLOT(translate()));
}
void RoughTransDlg::translate()
@@ -263,16 +263,16 @@ void RoughTransDlg::translate()
int total=catalog->numberOfEntries();
progressbar->setTotalSteps(total);
- QStringList dictList = dictChooser->selectedDicts();
+ TQStringList dictList = dictChooser->selectedDicts();
catalog->applyBeginCommand(0,Msgstr,0);
bool singleWords=singleWordButton->isChecked();
bool fuzzyMatch=fuzzyMatchButton->isChecked();
bool searchMatch=searchMatchButton->isChecked();
- QRegExp contextReg=catalog->miscSettings().contextInfo;
- QChar accelMarker=catalog->miscSettings().accelMarker;
- QRegExp endPunctReg("[\\.?!: ]+$");
+ TQRegExp contextReg=catalog->miscSettings().contextInfo;
+ TQChar accelMarker=catalog->miscSettings().accelMarker;
+ TQRegExp endPunctReg("[\\.?!: ]+$");
for(int i = 0; i < total; i++)
@@ -283,18 +283,18 @@ void RoughTransDlg::translate()
if(stop || cancel) break;
// FIXME: should care about plural forms
- QString msg=catalog->msgid(i,true).first();
- QString translation;
+ TQString msg=catalog->msgid(i,true).first();
+ TQString translation;
// this is KDE specific:
if( kdeSpecific )
{
if( catalog->pluralForm(i) == NoPluralForm )
{
- QString origTrans = catalog->msgstr(i).first();
+ TQString origTrans = catalog->msgstr(i).first();
if(msg.find("_: NAME OF TRANSLATORS\\n")==0)
{
- QString authorName;
+ TQString authorName;
if( !catalog->identitySettings().authorLocalizedName.isEmpty() )
authorName = catalog->identitySettings().authorLocalizedName;
else // fallback to non-localized name
@@ -302,7 +302,7 @@ void RoughTransDlg::translate()
authorName = catalog->identitySettings().authorName;
else continue; // there is no name to be inserted
- if( !QStringList::split(',', origTrans).contains(authorName) )
+ if( !TQStringList::split(',', origTrans).contains(authorName) )
{
if(origTrans.isEmpty() ) translation=authorName;
else translation+=origTrans+","+authorName;
@@ -313,7 +313,7 @@ void RoughTransDlg::translate()
// skip, if email is not specified in settings
if( catalog->identitySettings().authorEmail.isEmpty() ) continue;
- if( !QStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
+ if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
{
if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail;
else translation=origTrans+","+catalog->identitySettings().authorEmail;
@@ -321,7 +321,7 @@ void RoughTransDlg::translate()
}
else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
{
- QString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
+ TQString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
"<surname></surname>\n<affiliation><address><email>" +
catalog->identitySettings( ).authorEmail+"</email></address>\n"
"</affiliation><contrib></contrib></othercredit>";
@@ -332,12 +332,12 @@ void RoughTransDlg::translate()
}
else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
{
- QString authorName;
+ TQString authorName;
if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
authorName = catalog->identitySettings( ).authorLocalizedName;
else if (!catalog->identitySettings( ).authorName.isEmpty( ))
authorName = catalog->identitySettings( ).authorName;
- QString temp = "<para>" + authorName + "\n" + "<email>" +
+ TQString temp = "<para>" + authorName + "\n" + "<email>" +
catalog->identitySettings( ).authorEmail + "</email></para>";
if (origTrans.isEmpty( ))
translation = temp;
@@ -370,7 +370,7 @@ void RoughTransDlg::translate()
}
// try exact translation
- QStringList::Iterator dit = dictList.begin();
+ TQStringList::Iterator dit = dictList.begin();
while(translation.isEmpty() && dit != dictList.end())
{
dictBox->setActiveModule(*dit);
@@ -386,7 +386,7 @@ void RoughTransDlg::translate()
// try search settings translation
else if (searchMatch) {
- QString tr;
+ TQString tr;
int score, best_score = 0;
dit = dictList.begin();
while(dit != dictList.end())
@@ -412,7 +412,7 @@ void RoughTransDlg::translate()
// try fuzzy translation
else if (fuzzyMatch) {
- QString tr;
+ TQString tr;
int score, best_score = 0;
dit = dictList.begin();
while(dit != dictList.end())
@@ -439,9 +439,9 @@ void RoughTransDlg::translate()
// try single word translation
if(translation.isEmpty() && singleWords)
{
- QStringList wordList;
- QChar accel;
- QString endingPunctuation;
+ TQStringList wordList;
+ TQChar accel;
+ TQString endingPunctuation;
int pos = msg.findRev(endPunctReg);
if(pos >= 0)
{
@@ -456,12 +456,12 @@ void RoughTransDlg::translate()
te.setString(msg);
msg=te.matchesReplaced(" KBABELTAG ");
- QString word;
+ TQString word;
int length = msg.length();
- QRegExp digitReg("^[0-9]*$");
+ TQRegExp digitReg("^[0-9]*$");
for(int index=0; index < length; index++)
{
- QChar c=msg[index];
+ TQChar c=msg[index];
if(c==accelMarker)
{
@@ -478,7 +478,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -486,7 +486,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
@@ -503,7 +503,7 @@ void RoughTransDlg::translate()
if(!word.isEmpty() && !word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
wordList.append("\\n\n");
index+=2;
@@ -513,7 +513,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -521,7 +521,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -530,7 +530,7 @@ void RoughTransDlg::translate()
wordList.append(word);
}
- word=QString::null;
+ word=TQString::null;
}
}
@@ -543,7 +543,7 @@ void RoughTransDlg::translate()
{
dictBox->setActiveModule(*dit);
- for(QStringList::Iterator it=wordList.begin();
+ for(TQStringList::Iterator it=wordList.begin();
it!=wordList.end(); ++it)
{
if( (*it)=="\\n\n" )
@@ -556,7 +556,7 @@ void RoughTransDlg::translate()
}
else
{
- QString trans = dictBox->translate(*it);
+ TQString trans = dictBox->translate(*it);
if(!trans.isEmpty())
{
@@ -571,7 +571,7 @@ void RoughTransDlg::translate()
}
if(wordCounter==0)
- translation=QString::null;
+ translation=TQString::null;
++dit;
}
@@ -610,9 +610,9 @@ void RoughTransDlg::translate()
{
if(!catalog->isUntranslated(i))
{
- QStringList msgs = catalog->msgstr(i);
+ TQStringList msgs = catalog->msgstr(i);
uint counter = 0;
- for( QStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it)
+ for( TQStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it)
{
DelTextCmd* delCmd = new DelTextCmd(0
,(*it),counter++);
@@ -668,7 +668,7 @@ void RoughTransDlg::showStatistics()
{
int nothing=totalTried-partTransCounter-exactTransCounter;
KLocale *locale = KGlobal::locale();
- QString statMsg = i18n("Result of the translation:\n"
+ TQString statMsg = i18n("Result of the translation:\n"
"Edited entries: %1\n"
"Exact translations: %2 (%3%)\n"
"Approximate translations: %4 (%5%)\n"
@@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id)
if(!transButton->isChecked() && !untransButton->isChecked()
&& !fuzzyButton->isChecked())
{
- QButton *button = whatBox->find(id);
+ TQButton *button = whatBox->find(id);
if(button == transButton)
{
transButton->setChecked(true);
@@ -741,14 +741,14 @@ void RoughTransDlg::fuzzyButtonToggled(bool on)
{
if(!on)
{
- QString msg=i18n("<qt><p>"
+ TQString msg=i18n("<qt><p>"
"When a translation for a message is found, the entry "
"will be marked <b>fuzzy</b> by default. This is because the "
"translation is just guessed by KBabel and you should always "
"check the results carefully. Deactivate this option only if "
"you know what you are doing.</p></qt>");
- KMessageBox::information(this, msg, QString::null,"MarkFuzzyWarningInRoughTransDlg");
+ KMessageBox::information(this, msg, TQString::null,"MarkFuzzyWarningInRoughTransDlg");
}
}
diff --git a/kbabel/commonui/roughtransdlg.h b/kbabel/commonui/roughtransdlg.h
index e51378a5..d9e582f2 100644
--- a/kbabel/commonui/roughtransdlg.h
+++ b/kbabel/commonui/roughtransdlg.h
@@ -55,7 +55,7 @@ class KDE_EXPORT RoughTransDlg : public KDialogBase
Q_OBJECT
public:
- RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, QWidget *parent
+ RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, TQWidget *parent
, const char *name=0);
~RoughTransDlg();
@@ -87,20 +87,20 @@ private:
KBabelDictBox *dictBox;
DictChooser *dictChooser;
- QVBox *configWidget;
+ TQVBox *configWidget;
- QHButtonGroup *whatBox;
- QCheckBox *transButton;
- QCheckBox *untransButton;
- QCheckBox *fuzzyButton;
+ TQHButtonGroup *whatBox;
+ TQCheckBox *transButton;
+ TQCheckBox *untransButton;
+ TQCheckBox *fuzzyButton;
- QCheckBox *singleWordButton;
- QCheckBox *fuzzyMatchButton;
- QCheckBox *searchMatchButton;
+ TQCheckBox *singleWordButton;
+ TQCheckBox *fuzzyMatchButton;
+ TQCheckBox *searchMatchButton;
- QCheckBox *markFuzzyButton;
- QCheckBox *kdeButton;
+ TQCheckBox *markFuzzyButton;
+ TQCheckBox *kdeButton;
int exactTransCounter;
int partTransCounter;
diff --git a/kbabel/commonui/toolaction.cpp b/kbabel/commonui/toolaction.cpp
index bec1363a..20dac847 100644
--- a/kbabel/commonui/toolaction.cpp
+++ b/kbabel/commonui/toolaction.cpp
@@ -33,9 +33,9 @@
#include <kdebug.h>
-ToolAction::ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command,
- QObject * parent, const char * name )
- : KAction( text, info.iconName() == "unknown" ? QString::null : info.iconName(), cut, parent, name ),
+ToolAction::ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command,
+ TQObject * parent, const char * name )
+ : KAction( text, info.iconName() == "unknown" ? TQString::null : info.iconName(), cut, parent, name ),
m_command( command ),
m_info( info )
{
@@ -46,37 +46,37 @@ void ToolAction::slotActivated()
emit toolActivated( m_info, m_command );
}
-QPtrList<KAction> ToolAction::dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent, const QString& namePrefix )
+TQPtrList<KAction> ToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent, const TQString& namePrefix )
{
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if ( tools.isEmpty() )
return actionList;
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList commands = (*entry).commands();
- QStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList commands = (*entry).commands();
+ TQStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList();
Q_ASSERT(!commands.isEmpty());
if ( commands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()
<< "). " << commands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = commands.begin();
- QStringList::ConstIterator sit = shortcuts.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = commands.begin();
+ TQStringList::ConstIterator sit = shortcuts.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit)
{
if( !excludeCommand == command.contains(*cit) )
{
- QString sc=*sit;
+ TQString sc=*sit;
- ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?QString::null:sc), *entry, *cit
+ ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?TQString::null:sc), *entry, *cit
, parent
- , QString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() );
- connect( action, SIGNAL( toolActivated( const KDataToolInfo &, const QString & ) ),
+ , TQString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() );
+ connect( action, TQT_SIGNAL( toolActivated( const KDataToolInfo &, const TQString & ) ),
receiver, slot );
actionList.append( action );
@@ -88,13 +88,13 @@ QPtrList<KAction> ToolAction::dataToolActionList( const QValueList<KDataToolInfo
return actionList;
}
-QValueList<KDataToolInfo> ToolAction::validationTools()
+TQValueList<KDataToolInfo> ToolAction::validationTools()
{
- QValueList<KDataToolInfo> result;
+ TQValueList<KDataToolInfo> result;
- QValueList<KDataToolInfo> tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
+ TQValueList<KDataToolInfo> tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
- for( QValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
+ for( TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
{
if( (*entry).commands().contains("validate") )
{
diff --git a/kbabel/commonui/toolaction.h b/kbabel/commonui/toolaction.h
index fba7863c..7159aaf2 100644
--- a/kbabel/commonui/toolaction.h
+++ b/kbabel/commonui/toolaction.h
@@ -32,7 +32,7 @@
#ifndef TOOLACTION_H
#define TOOLACTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include <kdatatool.h>
@@ -43,29 +43,29 @@ class KDE_EXPORT ToolAction : public KAction
{
Q_OBJECT
public:
- ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command, QObject * parent = 0, const char * name = 0);
+ ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0);
/**
* return the list of KActions created for a list of tools. @ref command
* allows to specify rescriction of commands, for which the list should
* or shouldn't be created according to the @ref excludeCommand flag.
*/
- static QPtrList<KAction> dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent=0, const QString& namePrefix=QString::null );
+ static TQPtrList<KAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent=0, const TQString& namePrefix=TQString::null );
/**
* returns information about all available validation tools (KDataTools with support for CatalogItem
* and the "validate" command.
*/
- static QValueList<KDataToolInfo> validationTools();
+ static TQValueList<KDataToolInfo> validationTools();
signals:
- void toolActivated( const KDataToolInfo & info, const QString & command );
+ void toolActivated( const KDataToolInfo & info, const TQString & command );
protected:
virtual void slotActivated();
private:
- QString m_command;
+ TQString m_command;
KDataToolInfo m_info;
};
diff --git a/kbabel/commonui/toolselectionwidget.cpp b/kbabel/commonui/toolselectionwidget.cpp
index 56759490..1e97f473 100644
--- a/kbabel/commonui/toolselectionwidget.cpp
+++ b/kbabel/commonui/toolselectionwidget.cpp
@@ -34,33 +34,33 @@
#include <kdatatool.h>
#include <kdebug.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
-ToolSelectionWidget::ToolSelectionWidget( QWidget * parent, const char * name )
+ToolSelectionWidget::ToolSelectionWidget( TQWidget * parent, const char * name )
: KActionSelector( parent, name )
{
}
-void ToolSelectionWidget::loadTools( const QStringList &commands,
- const QValueList<KDataToolInfo>& tools)
+void ToolSelectionWidget::loadTools( const TQStringList &commands,
+ const TQValueList<KDataToolInfo>& tools)
{
if ( tools.isEmpty() ) return;
_allTools = tools;
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList toolCommands = (*entry).commands();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList toolCommands = (*entry).commands();
Q_ASSERT(!toolCommands.isEmpty());
if ( toolCommands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()
<< "). " << toolCommands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = toolCommands.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = toolCommands.begin();
for (; uit != userCommands.end() && cit != toolCommands.end(); ++uit, ++cit )
{
if( commands.contains(*cit) )
@@ -71,14 +71,14 @@ void ToolSelectionWidget::loadTools( const QStringList &commands,
}
}
-void ToolSelectionWidget::setSelectedTools( const QStringList& tools )
+void ToolSelectionWidget::setSelectedTools( const TQStringList& tools )
{
availableListBox()->clear();
selectedListBox()->clear();
- QValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
- QString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
+ TQString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
if( tools.contains((*entry).service()->library()) )
selectedListBox()->insertItem( uic );
else
@@ -86,14 +86,14 @@ void ToolSelectionWidget::setSelectedTools( const QStringList& tools )
}
}
-QStringList ToolSelectionWidget::selectedTools()
+TQStringList ToolSelectionWidget::selectedTools()
{
- QStringList usedNames;
+ TQStringList usedNames;
for( uint i=0; i<selectedListBox()->count() ; i++ )
usedNames += selectedListBox()->text(i);
- QStringList result;
- QValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
+ TQStringList result;
+ TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
if( usedNames.contains(*((*entry).userCommands().at((*entry).commands().findIndex("validate")))) )
diff --git a/kbabel/commonui/toolselectionwidget.h b/kbabel/commonui/toolselectionwidget.h
index 391f15dd..bbc08ca0 100644
--- a/kbabel/commonui/toolselectionwidget.h
+++ b/kbabel/commonui/toolselectionwidget.h
@@ -41,17 +41,17 @@ class KDE_EXPORT ToolSelectionWidget : public KActionSelector
{
Q_OBJECT
public:
- ToolSelectionWidget(QWidget* parent=0, const char* name=0 );
+ ToolSelectionWidget(TQWidget* parent=0, const char* name=0 );
- QStringList selectedTools();
+ TQStringList selectedTools();
- void loadTools (const QStringList& commands, const QValueList<KDataToolInfo> & tools);
+ void loadTools (const TQStringList& commands, const TQValueList<KDataToolInfo> & tools);
public slots:
- void setSelectedTools( const QStringList& tools );
+ void setSelectedTools( const TQStringList& tools );
private:
- QValueList<KDataToolInfo> _allTools;
+ TQValueList<KDataToolInfo> _allTools;
};
#endif
diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc
index 2bf6ec90..632eb7b5 100644
--- a/kbabel/datatools/accelerators/main.cc
+++ b/kbabel/datatools/accelerators/main.cc
@@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_accelstool, KGenericFactory<AcceleratorTool>
using namespace KBabel;
-AcceleratorTool::AcceleratorTool( QObject* parent, const char* name, const QStringList & )
+AcceleratorTool::AcceleratorTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
// bogus translation just for allowing the translation
i18n("what check found errors","accelerator");
}
-bool AcceleratorTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool AcceleratorTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -96,26 +96,26 @@ bool AcceleratorTool::run( const QString& command, void* data, const QString& da
if(!item->isUntranslated())
{
// FIXME: this should care about plural forms in msgid
- QString lineid=item->msgid().first();
+ TQString lineid=item->msgid().first();
lineid.replace( _context, "");
- lineid.replace(QRegExp("\\n"),"");
+ lineid.replace(TQRegExp("\\n"),"");
lineid.simplifyWhiteSpace();
- QString regStr(_marker);
+ TQString regStr(_marker);
regStr+="[^\\s]";
- QRegExp reg(regStr);
+ TQRegExp reg(regStr);
- QStringList str = item->msgstr(true);
- for( QStringList::Iterator form = str.begin() ; form != str.end(); form++ )
+ TQStringList str = item->msgstr(true);
+ for( TQStringList::Iterator form = str.begin() ; form != str.end(); form++ )
{
- QString linestr=(*form);
+ TQString linestr=(*form);
linestr.simplifyWhiteSpace();
int n = lineid.contains(reg);
if( _marker == '&' )
- n = n - lineid.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
int m = linestr.contains(reg);
if( _marker == '&' )
- m = m - linestr.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
hasError = hasError || ( n<=1 && m != n);
}
}
diff --git a/kbabel/datatools/accelerators/main.h b/kbabel/datatools/accelerators/main.h
index 4eba780e..ee9ae3a8 100644
--- a/kbabel/datatools/accelerators/main.h
+++ b/kbabel/datatools/accelerators/main.h
@@ -37,19 +37,19 @@
#include <kdatatool.h>
-#include <qregexp.h>
+#include <tqregexp.h>
class AcceleratorTool : public KDataTool
{
Q_OBJECT
public:
- AcceleratorTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ AcceleratorTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- QRegExp _context;
- QChar _marker;
+ TQRegExp _context;
+ TQChar _marker;
KBabel::Project::Ptr _cache_origin;
};
diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc
index fd3daf3c..e80c7c35 100644
--- a/kbabel/datatools/arguments/main.cc
+++ b/kbabel/datatools/arguments/main.cc
@@ -51,13 +51,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory<ArgumentTool> ( "kb
using namespace KBabel;
-ArgumentTool::ArgumentTool( QObject* parent, const char* name, const QStringList & )
+ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n( "what check found errors","arguments");
}
-bool ArgumentTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool ArgumentTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -96,13 +96,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
if(!item->isUntranslated())
{
- QString formatChars="dioxXucsfeEgGp%";
+ TQString formatChars="dioxXucsfeEgGp%";
if( _checkPlurals ) formatChars+="n";
// FIXME: this should care about plural forms in msgid
- QString line=item->msgid().first();
- QStringList argList;
+ TQString line=item->msgid().first();
+ TQStringList argList;
// if( isPluralForm() )
{
@@ -114,17 +114,17 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
line.replace(_context, "");
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
- int index=line.find(QRegExp("%."));
+ int index=line.find(TQRegExp("%."));
while(index>=0)
{
- int endIndex=line.find(QRegExp("[^\\d]"),index+1);
+ int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
@@ -135,15 +135,15 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
if(endIndex - index > 1 ) {
- QString arg = line.mid(index,endIndex-index);
- if( arg.contains( QRegExp("\\d") ) ) {
+ TQString arg = line.mid(index,endIndex-index);
+ if( arg.contains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
- index=line.find(QRegExp("%."),endIndex);
+ index=line.find(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
@@ -157,22 +157,22 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
// generate for each plural form to be checked separately
line=item->msgstr().first();
- QStringList lines;
+ TQStringList lines;
// FIXME; this is KDE specific
if( item->pluralForm() == KDESpecific )
{
- lines = QStringList::split("\\n",line);
+ lines = TQStringList::split("\\n",line);
}
else
{
lines.append(line);
}
- QStringList argCache = argList;
- QStringList foundArgs;
+ TQStringList argCache = argList;
+ TQStringList foundArgs;
- for(QStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
+ for(TQStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
{
// initialize for the next plural form
foundArgs.clear();
@@ -180,9 +180,9 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
line=(*i);
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
- QRegExp argdesc(
+ TQRegExp argdesc(
"%((["+formatChars+"])"
+"|(\\d)+"
+"|(\\d)+\\$(["+formatChars+"])"
@@ -204,7 +204,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
argList = argCache;
if( non_gnu ) {
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
if( argList.find( *it ) == argList.end() ) {
hasError = true;
break;
@@ -220,11 +220,11 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
else
{
// handle GNU with replacements
- QStringList::Iterator oit = argList.begin();
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
+ TQStringList::Iterator oit = argList.begin();
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
if( *it == *oit ) {
// argument is the same, mark as used
- *oit = QString::null;
+ *oit = TQString::null;
} else {
// try to strip replacement
int index = (*it).find( '$' );
@@ -233,13 +233,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
hasError = true;
break;
}
- QString place = (*it).mid( 1, index-1 );
- QString arg = (*it).right( index );
+ TQString place = (*it).mid( 1, index-1 );
+ TQString arg = (*it).right( index );
arg[0] = '%';
- QStringList::Iterator a = argList.at( place.toInt()-1 );
+ TQStringList::Iterator a = argList.at( place.toInt()-1 );
if( a != argList.end() && (*a) == arg )
{
- (*a) = QString::null;
+ (*a) = TQString::null;
}
else
{
@@ -249,7 +249,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
- for ( QStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
+ for ( TQStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
if( ! (*it).isNull () ) {
// argument is the same, mark as used
hasError = true;
diff --git a/kbabel/datatools/arguments/main.h b/kbabel/datatools/arguments/main.h
index 1f258ca9..ea7e4e23 100644
--- a/kbabel/datatools/arguments/main.h
+++ b/kbabel/datatools/arguments/main.h
@@ -37,18 +37,18 @@
#include <kdatatool.h>
-#include <qregexp.h>
+#include <tqregexp.h>
class ArgumentTool : public KDataTool
{
Q_OBJECT
public:
- ArgumentTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ ArgumentTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
bool _checkPlurals;
};
diff --git a/kbabel/datatools/context/main.cc b/kbabel/datatools/context/main.cc
index 7715cedd..066ef430 100644
--- a/kbabel/datatools/context/main.cc
+++ b/kbabel/datatools/context/main.cc
@@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_contexttool, KGenericFactory<ContextTool> ( "
using namespace KBabel;
-ContextTool::ContextTool( QObject* parent, const char* name, const QStringList & )
+ContextTool::ContextTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n("what check found errors","context info");
}
-bool ContextTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool ContextTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
diff --git a/kbabel/datatools/context/main.h b/kbabel/datatools/context/main.h
index 80388d17..8dc24e9f 100644
--- a/kbabel/datatools/context/main.h
+++ b/kbabel/datatools/context/main.h
@@ -42,11 +42,11 @@ class ContextTool : public KDataTool
Q_OBJECT
public:
- ContextTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ ContextTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
};
#endif
diff --git a/kbabel/datatools/equations/main.cc b/kbabel/datatools/equations/main.cc
index 14a03cd6..64d19adf 100644
--- a/kbabel/datatools/equations/main.cc
+++ b/kbabel/datatools/equations/main.cc
@@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_equationstool, KGenericFactory<EquationsTool>
using namespace KBabel;
-EquationsTool::EquationsTool( QObject* parent, const char* name, const QStringList & )
+EquationsTool::EquationsTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _equation("^[a-zA-Z0-9]+=.+")
{
i18n("what check found errors","equations");
}
-bool EquationsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool EquationsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -90,7 +90,7 @@ bool EquationsTool::run( const QString& command, void* data, const QString& data
&& item->msgid().first().contains(_equation))
{
int index = item->msgid().first().find('=');
- QString left = item->msgid().first().left(index);
+ TQString left = item->msgid().first().left(index);
index = item->msgstr().first().find('=');
if(left != item->msgstr().first().left(index))
hasError = true;
diff --git a/kbabel/datatools/equations/main.h b/kbabel/datatools/equations/main.h
index 15337a1b..72fae529 100644
--- a/kbabel/datatools/equations/main.h
+++ b/kbabel/datatools/equations/main.h
@@ -33,7 +33,7 @@
#ifndef __main_h__
#define __main_h__
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdatatool.h>
class EquationsTool : public KDataTool
@@ -41,10 +41,10 @@ class EquationsTool : public KDataTool
Q_OBJECT
public:
- EquationsTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ EquationsTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- QRegExp _equation;
+ TQRegExp _equation;
};
#endif
diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc
index 6e62c626..5b2bc411 100644
--- a/kbabel/datatools/length/main.cc
+++ b/kbabel/datatools/length/main.cc
@@ -55,13 +55,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_lengthtool, KGenericFactory<LengthTool> ( "kb
using namespace KBabel;
-LengthTool::LengthTool( QObject* parent, const char* name, const QStringList & )
+LengthTool::LengthTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n("which check found errors","translation has inconsistent length");
}
-bool LengthTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool LengthTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -89,7 +89,7 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
CatalogItem* item = (CatalogItem*)(data);
bool hasError = false;
- QStringList str, id;
+ TQStringList str, id;
if(!item->isUntranslated()) {
@@ -102,9 +102,9 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//Ensure KDE plural forms are in a StringList
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
@@ -116,11 +116,11 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//FIXME: replace 10% check with configurable setting or a statistical
//based expected length relationship
int idlen, strlen;
- for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- QString iditem = (*i);
- idlen = iditem.replace( QRegExp(_context),"").length();
- for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
- QString stritem = (*j);
+ for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
+ TQString iditem = (*i);
+ idlen = iditem.replace( TQRegExp(_context),"").length();
+ for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
+ TQString stritem = (*j);
strlen = stritem.length();
hasError = hasError || (strlen < (0.1 * idlen))
|| (strlen > (10 * idlen));
diff --git a/kbabel/datatools/length/main.h b/kbabel/datatools/length/main.h
index 7e84cf55..6a4ec06f 100644
--- a/kbabel/datatools/length/main.h
+++ b/kbabel/datatools/length/main.h
@@ -43,12 +43,12 @@ class LengthTool : public KDataTool
Q_OBJECT
public:
- LengthTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ LengthTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
- QRegExp _plurals;
+ TQRegExp _context;
+ TQRegExp _plurals;
};
#endif
diff --git a/kbabel/datatools/not-translated/main.cc b/kbabel/datatools/not-translated/main.cc
index 0714caf3..22e23c84 100644
--- a/kbabel/datatools/not-translated/main.cc
+++ b/kbabel/datatools/not-translated/main.cc
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_nottranslatedtool, KGenericFactory<NotTransla
using namespace KBabel;
-NotTranslatedTool::NotTranslatedTool( QObject* parent, const char* name, const QStringList & )
+NotTranslatedTool::NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ) , _cache_origin( 0 )
{
i18n("which check found errors","English text in translation");
}
-bool NotTranslatedTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool NotTranslatedTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -97,19 +97,19 @@ bool NotTranslatedTool::run( const QString& command, void* data, const QString&
}
//FIXME Expand this to do substring matching of non-translation
- QStringList id, str;
+ TQStringList id, str;
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
- for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- QString id_str = (*i).replace( QRegExp(_context), "");
- for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
- QString str_str = (*j);
+ for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
+ TQString id_str = (*i).replace( TQRegExp(_context), "");
+ for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
+ TQString str_str = (*j);
hasError = hasError || ( id_str == str_str );
}
}
diff --git a/kbabel/datatools/not-translated/main.h b/kbabel/datatools/not-translated/main.h
index 3b1176e8..c1aeabd8 100644
--- a/kbabel/datatools/not-translated/main.h
+++ b/kbabel/datatools/not-translated/main.h
@@ -43,13 +43,13 @@ class NotTranslatedTool : public KDataTool
Q_OBJECT
public:
- NotTranslatedTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
- QRegExp _plurals;
+ TQRegExp _context;
+ TQRegExp _plurals;
};
#endif
diff --git a/kbabel/datatools/pluralforms/main.cc b/kbabel/datatools/pluralforms/main.cc
index 4d275e60..87dfef71 100644
--- a/kbabel/datatools/pluralforms/main.cc
+++ b/kbabel/datatools/pluralforms/main.cc
@@ -53,13 +53,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_pluraltool, KGenericFactory<PluralsTool> ( "k
using namespace KBabel;
-PluralsTool::PluralsTool( QObject* parent, const char* name, const QStringList & )
+PluralsTool::PluralsTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 ), _neededForms(-1)
{
i18n("what check found errors", "plural forms");
}
-bool PluralsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool PluralsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -106,7 +106,7 @@ bool PluralsTool::run( const QString& command, void* data, const QString& dataty
{
hasError = true;
}
- else if( item->msgstr().first().contains(QString("\\n"))+1 != _neededForms )
+ else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms )
{
hasError = true;
}
diff --git a/kbabel/datatools/pluralforms/main.h b/kbabel/datatools/pluralforms/main.h
index f2101975..420824d2 100644
--- a/kbabel/datatools/pluralforms/main.h
+++ b/kbabel/datatools/pluralforms/main.h
@@ -42,11 +42,11 @@ class PluralsTool : public KDataTool
Q_OBJECT
public:
- PluralsTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ PluralsTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _plurals;
+ TQRegExp _plurals;
int _neededForms;
};
diff --git a/kbabel/datatools/punctuation/main.cc b/kbabel/datatools/punctuation/main.cc
index 433d9711..8806b536 100644
--- a/kbabel/datatools/punctuation/main.cc
+++ b/kbabel/datatools/punctuation/main.cc
@@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_punctuationtool, KGenericFactory<PunctuationT
using namespace KBabel;
-PunctuationTool::PunctuationTool( QObject* parent, const char* name, const QStringList & )
+PunctuationTool::PunctuationTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
// bogus translation just for allowing the translation
i18n("what check found errors","punctuation");
}
-bool PunctuationTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool PunctuationTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -88,23 +88,23 @@ bool PunctuationTool::run( const QString& command, void* data, const QString& da
if(!item->isUntranslated())
{
- QString lineid=item->msgid().first();
+ TQString lineid=item->msgid().first();
// lookup punctuation in original text
- QRegExp punc("[\\.!\\?:]+$");
+ TQRegExp punc("[\\.!\\?:]+$");
int i = lineid.find(punc);
- QString t("");
+ TQString t("");
if( i != -1 ) t = lineid.right(lineid.length()-i);
if( item->pluralForm() != NoPluralForm )
{
// check, that both plural forms contain the same punctuation
- QString pl = *(item->msgid().at(1));
+ TQString pl = *(item->msgid().at(1));
int j = pl.find(punc);
- QString tp("");
+ TQString tp("");
if( j != -1 ) tp = pl.right(pl.length()-j);
if( tp != t )
@@ -113,14 +113,14 @@ bool PunctuationTool::run( const QString& command, void* data, const QString& da
}
}
- QStringList forms = item->msgstr(true);
+ TQStringList forms = item->msgstr(true);
if( item->pluralForm() == KDESpecific ) {
- forms = QStringList::split("\\n",*item->msgstr(true).at(0));
+ forms = TQStringList::split("\\n",*item->msgstr(true).at(0));
}
- for( QStringList::Iterator form = forms.begin() ; form != forms.end(); form++ )
+ for( TQStringList::Iterator form = forms.begin() ; form != forms.end(); form++ )
{
- QString linestr=(*form);
+ TQString linestr=(*form);
int j = linestr.find(punc);
diff --git a/kbabel/datatools/punctuation/main.h b/kbabel/datatools/punctuation/main.h
index 63a36d62..eb30293f 100644
--- a/kbabel/datatools/punctuation/main.h
+++ b/kbabel/datatools/punctuation/main.h
@@ -40,8 +40,8 @@ class PunctuationTool : public KDataTool
Q_OBJECT
public:
- PunctuationTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ PunctuationTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
};
#endif
diff --git a/kbabel/datatools/regexp/main.cc b/kbabel/datatools/regexp/main.cc
index a101d5c9..eca0be81 100644
--- a/kbabel/datatools/regexp/main.cc
+++ b/kbabel/datatools/regexp/main.cc
@@ -27,11 +27,11 @@
#include "main.h"
#include <math.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -49,16 +49,16 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_regexptool, KGenericFactory<RegExpTool> ( "kb
using namespace KBabel;
-RegExpTool::RegExpTool( QObject* parent, const char* name, const QStringList & )
+RegExpTool::RegExpTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
i18n("which check found errors","translation has inconsistent length");
loadExpressions();
if ( ! _error.isNull() )
- KMessageBox::error( (QWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
+ KMessageBox::error( (TQWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
}
-bool RegExpTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool RegExpTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -86,8 +86,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
if(!item->isUntranslated()) {
ExpressionList::Iterator it( _list.begin() );
ExpressionList::Iterator end( _list.end() );
- QStringList msgs = item->msgstr();
- QStringList results;
+ TQStringList msgs = item->msgstr();
+ TQStringList results;
for ( ; it != end; ++it ) {
results.clear();
results = msgs.grep( (*it).regExp() );
@@ -110,8 +110,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
void RegExpTool::loadExpressions()
{
// TODO: Change file path
- QFile file( QDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
- QDomDocument doc;
+ TQFile file( TQDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
+ TQDomDocument doc;
if ( ! file.open( IO_ReadOnly ) ) {
kdDebug() << "File not found" << endl;
@@ -125,10 +125,10 @@ void RegExpTool::loadExpressions()
}
file.close();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() )
elementToExpression( e );
if ( ! _error.isNull() )
@@ -137,10 +137,10 @@ void RegExpTool::loadExpressions()
}
}
-void RegExpTool::elementToExpression( const QDomElement& e )
+void RegExpTool::elementToExpression( const TQDomElement& e )
{
- QString name;
- QString exp;
+ TQString name;
+ TQString exp;
bool cs = false; //Expressions are case insensitive by default
if ( e.tagName().compare( "item" ) != 0 ) {
@@ -148,13 +148,13 @@ void RegExpTool::elementToExpression( const QDomElement& e )
return;
}
- QDomNode n = e.firstChild();
+ TQDomNode n = e.firstChild();
if ( n.isNull() ) {
_error = i18n( "First child of 'item' is not a node" );
return;
}
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
if ( el.isNull() || el.tagName().compare( "name" ) != 0 ) {
_error = i18n( "Expected tag 'name'" );
return;
@@ -175,7 +175,7 @@ void RegExpTool::elementToExpression( const QDomElement& e )
cs = true;
kdDebug(KBABEL) << "RegExpTool: Adding expression: " << name << endl;
- _list.append( Expression( name, QRegExp( exp, cs ) ) );
+ _list.append( Expression( name, TQRegExp( exp, cs ) ) );
}
#include "main.moc"
diff --git a/kbabel/datatools/regexp/main.h b/kbabel/datatools/regexp/main.h
index 4ae8953b..c81f96a0 100644
--- a/kbabel/datatools/regexp/main.h
+++ b/kbabel/datatools/regexp/main.h
@@ -25,7 +25,7 @@
#define __main_h__
#include <kdatatool.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QDomElement;
@@ -33,41 +33,41 @@ class Expression
{
public:
Expression() {};
- Expression( const QString& name, const QRegExp& regExp )
+ Expression( const TQString& name, const TQRegExp& regExp )
{
_name = name;
_regExp = regExp;
}
- const QString& name() const
+ const TQString& name() const
{
return _name;
}
- const QRegExp& regExp() const
+ const TQRegExp& regExp() const
{
return _regExp;
}
private:
- QString _name;
- QRegExp _regExp;
+ TQString _name;
+ TQRegExp _regExp;
};
-typedef QValueList<Expression> ExpressionList;
+typedef TQValueList<Expression> ExpressionList;
class RegExpTool : public KDataTool
{
Q_OBJECT
public:
- RegExpTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ RegExpTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
void loadExpressions();
- void elementToExpression( const QDomElement& e );
+ void elementToExpression( const TQDomElement& e );
ExpressionList _list;
- QString _error;
+ TQString _error;
};
#endif
diff --git a/kbabel/datatools/setfuzzy/main.cc b/kbabel/datatools/setfuzzy/main.cc
index 373560ec..54bbcb57 100644
--- a/kbabel/datatools/setfuzzy/main.cc
+++ b/kbabel/datatools/setfuzzy/main.cc
@@ -49,12 +49,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_setfuzzytool, KGenericFactory<SetFuzzyTool> (
using namespace KBabel;
-SetFuzzyTool::SetFuzzyTool( QObject* parent, const char* name, const QStringList & )
+SetFuzzyTool::SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
}
-bool SetFuzzyTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool SetFuzzyTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "allfuzzy" )
{
diff --git a/kbabel/datatools/setfuzzy/main.h b/kbabel/datatools/setfuzzy/main.h
index 5c86bf15..45e0bc38 100644
--- a/kbabel/datatools/setfuzzy/main.h
+++ b/kbabel/datatools/setfuzzy/main.h
@@ -40,8 +40,8 @@ class SetFuzzyTool : public KDataTool
Q_OBJECT
public:
- SetFuzzyTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
};
#endif
diff --git a/kbabel/datatools/whitespace/main.cc b/kbabel/datatools/whitespace/main.cc
index 882815a5..7bfa50b2 100644
--- a/kbabel/datatools/whitespace/main.cc
+++ b/kbabel/datatools/whitespace/main.cc
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_whitespacetool, KGenericFactory<WhitespaceToo
using namespace KBabel;
-WhitespaceTool::WhitespaceTool( QObject* parent, const char* name, const QStringList & )
+WhitespaceTool::WhitespaceTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 ), _equation("^[a-zA-Z0-9]+=")
{
i18n("which check found errors","whitespace only translation");
}
-bool WhitespaceTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool WhitespaceTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -89,8 +89,8 @@ bool WhitespaceTool::run( const QString& command, void* data, const QString& dat
CatalogItem* item = (CatalogItem*)(data);
bool hasIdError = false;
bool hasStrError = false;
- QRegExp _whitespace("^\\s+$");
- QStringList str, id;
+ TQRegExp _whitespace("^\\s+$");
+ TQStringList str, id;
if(!item->isUntranslated()) {
if( _cache_origin != item->project() )
@@ -102,28 +102,28 @@ bool WhitespaceTool::run( const QString& command, void* data, const QString& dat
//Ensure KDE plural forms are in a StringList
//FIXME Eliminate context information and this could become a generic message splitter
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
//Strip equations
- id.first().replace( QRegExp(_equation), "");
- str.first().replace( QRegExp(_equation), "");
+ id.first().replace( TQRegExp(_equation), "");
+ str.first().replace( TQRegExp(_equation), "");
//Ignore Messages with blank msgid components
- for( QStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
- QString resultstring = (*it);
+ for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
+ TQString resultstring = (*it);
hasIdError = hasIdError || resultstring.contains(_whitespace);
}
if( hasIdError ) return true;
- //Check each QString in the List is not whitespace
- for( QStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
- QString resultstring = (*it);
+ //Check each TQString in the List is not whitespace
+ for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
+ TQString resultstring = (*it);
hasStrError = hasStrError || resultstring.contains(_whitespace);
}
diff --git a/kbabel/datatools/whitespace/main.h b/kbabel/datatools/whitespace/main.h
index 2a234457..c8cd373a 100644
--- a/kbabel/datatools/whitespace/main.h
+++ b/kbabel/datatools/whitespace/main.h
@@ -36,7 +36,7 @@
#include "kbproject.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdatatool.h>
class WhitespaceTool : public KDataTool
@@ -44,12 +44,12 @@ class WhitespaceTool : public KDataTool
Q_OBJECT
public:
- WhitespaceTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ WhitespaceTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _plurals;
- QRegExp _equation;
+ TQRegExp _plurals;
+ TQRegExp _equation;
};
#endif
diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc
index cae88b4c..3bcf66da 100644
--- a/kbabel/datatools/xml/main.cc
+++ b/kbabel/datatools/xml/main.cc
@@ -35,7 +35,7 @@
#include "catalogsettings.h"
#include "main.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory<XMLTool> ( "kbabelda
using namespace KBabel;
-XMLTool::XMLTool( QObject* parent, const char* name, const QStringList & )
+XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n( "what check found errors", "XML tags" );
}
-bool XMLTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool XMLTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -93,9 +93,9 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
}
uint correctnessLevel = 0;
- QString msgid = item->msgid().first();
+ TQString msgid = item->msgid().first();
msgid.replace( "\\\"", "\"" ); // Change '\"' to '"'
- msgid.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
msgid.replace( _context, "" );
msgid.replace("\n",""); // delete newlines
@@ -130,12 +130,12 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
if(!item->isUntranslated())
{
- QStringList str = item->msgstr(true);
- for( QStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
+ TQStringList str = item->msgstr(true);
+ for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
{
- QString text=(*form);
+ TQString text=(*form);
text.replace( "\\\"", "\"" ); // Change '\"' to '"'
- text.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
// isNonCaseWithoutCommonCompliant can fail
// even though higher level checks works
@@ -171,34 +171,34 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
return FALSE;
}
-bool XMLTool::isFullyCompliant( const QString& text)
+bool XMLTool::isFullyCompliant( const TQString& text)
{
- QDomDocument doc;
+ TQDomDocument doc;
return doc.setContent("<para>" + text + "</para>" );
}
-bool XMLTool::isNonCaseCompliant( const QString& text)
+bool XMLTool::isNonCaseCompliant( const TQString& text)
{
- QDomDocument doc;
- QString test = text.lower();
+ TQDomDocument doc;
+ TQString test = text.lower();
return doc.setContent("<para>" + test + "</para>" );
}
-bool XMLTool::isNonCaseWithoutCommonCompliant( const QString& text)
+bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text)
{
- QDomDocument doc;
- QString test = text.lower();
- QRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
+ TQDomDocument doc;
+ TQString test = text.lower();
+ TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
test.replace( rx, "" );
- QString a;
+ TQString a;
do
{
a = test;
- test.replace( QRegExp("<[^_:A-Za-z/]"), "" );
+ test.replace( TQRegExp("<[^_:A-Za-z/]"), "" );
} while( a!=test);
- test.replace( QRegExp("<$"), "" );
+ test.replace( TQRegExp("<$"), "" );
return doc.setContent("<para>" + test + "</para>" );
}
diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h
index 357a4f0d..68c06cdb 100644
--- a/kbabel/datatools/xml/main.h
+++ b/kbabel/datatools/xml/main.h
@@ -35,7 +35,7 @@
#include "kbproject.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <kdatatool.h>
class XMLTool : public KDataTool
@@ -43,17 +43,17 @@ class XMLTool : public KDataTool
Q_OBJECT
public:
- XMLTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ XMLTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- bool isFullyCompliant( const QString& text);
- bool isNonCaseCompliant( const QString& text);
- bool isNonCaseWithoutCommonCompliant( const QString& text);
+ bool isFullyCompliant( const TQString& text);
+ bool isNonCaseCompliant( const TQString& text);
+ bool isNonCaseWithoutCommonCompliant( const TQString& text);
- QMap<QString,int> _levelCache;
+ TQMap<TQString,int> _levelCache;
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
};
#endif
diff --git a/kbabel/filters/gettext/gettextexport.cpp b/kbabel/filters/gettext/gettextexport.cpp
index e951847b..c2fe9c67 100644
--- a/kbabel/filters/gettext/gettextexport.cpp
+++ b/kbabel/filters/gettext/gettextexport.cpp
@@ -40,8 +40,8 @@
#include "catalogsettings.h"
#include "kbprojectsettings.h"
-#include <qfile.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -51,12 +51,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextexport, KGenericFactory<GettextExportP
using namespace KBabel;
-GettextExportPlugin::GettextExportPlugin(QObject* parent, const char* name, const QStringList &) :
+GettextExportPlugin::GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &) :
CatalogExportPlugin(parent,name), m_wrapWidth( -1 )
{
}
-ConversionStatus GettextExportPlugin::save(const QString& localFile , const QString& mimetype, const Catalog* catalog)
+ConversionStatus GettextExportPlugin::save(const TQString& localFile , const TQString& mimetype, const Catalog* catalog)
{
// check, whether we know how to handle the extra data
if( catalog->importPluginID() != "GNU gettext")
@@ -66,14 +66,14 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
if( mimetype != "application/x-gettext")
return UNSUPPORTED_TYPE;
- QFile file(localFile);
+ TQFile file(localFile);
if(file.open(IO_WriteOnly))
{
int progressRatio = QMAX(100/ QMAX(catalog->numberOfEntries(),1), 1);
emit signalResetProgressBar(i18n("saving file"),100);
- QTextStream stream(&file);
+ TQTextStream stream(&file);
SaveSettings _saveSettings = catalog->saveSettings();
@@ -86,26 +86,26 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
switch(_saveSettings.encoding)
{
case ProjectSettingsBase::UTF8:
- stream.setCodec(QTextCodec::codecForName("utf-8"));
+ stream.setCodec(TQTextCodec::codecForName("utf-8"));
break;
case ProjectSettingsBase::UTF16:
- stream.setCodec(QTextCodec::codecForName("utf-16"));
+ stream.setCodec(TQTextCodec::codecForName("utf-16"));
break;
default:
- stream.setCodec(QTextCodec::codecForLocale());
+ stream.setCodec(TQTextCodec::codecForLocale());
break;
}
}
// only save header if it is not empty
- const QString headerComment( catalog->header().comment() );
+ const TQString headerComment( catalog->header().comment() );
// ### TODO: why is this useful to have a header with an empty msgstr?
if( !headerComment.isEmpty() || !catalog->header().msgstr().isEmpty() )
{
// write header
writeComment( stream, headerComment );
- const QString headerMsgid = catalog->header().msgid().first();
+ const TQString headerMsgid = catalog->header().msgid().first();
// Gettext PO files should have an empty msgid as header
if ( !headerMsgid.isEmpty() )
@@ -122,7 +122,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
stream << "\n";
}
- QStringList list;
+ TQStringList list;
for( uint counter = 0; counter < catalog->numberOfEntries() ; counter++ )
{
if(counter%10==0) {
@@ -132,7 +132,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
// write entry
writeComment( stream, catalog->comment(counter) );
- const QString msgctxt = catalog->msgctxt(counter);
+ const TQString msgctxt = catalog->msgctxt(counter);
if (! msgctxt.isEmpty() )
{
writeKeyword( stream, "msgctxt", msgctxt );
@@ -154,8 +154,8 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
const int forms = catalog->msgstr( counter ).count();
for ( int i = 0; i < forms; ++i )
{
- QString keyword ( "msgstr[" );
- keyword += QString::number( i );
+ TQString keyword ( "msgstr[" );
+ keyword += TQString::number( i );
keyword += ']';
writeKeyword( stream, keyword, *( catalog->msgstr( counter ).at( i ) ) );
@@ -173,9 +173,9 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
if( _saveSettings.saveObsolete )
{
- QValueList<QString>::ConstIterator oit;
+ TQValueList<TQString>::ConstIterator oit;
- QStringList _obsolete = catalog->catalogExtraData();
+ TQStringList _obsolete = catalog->catalogExtraData();
for( oit = _obsolete.begin(); oit != _obsolete.end(); ++oit )
{
@@ -203,7 +203,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
return OK;
}
-void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comment ) const
+void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& comment ) const
{
if( !comment.isEmpty() )
{
@@ -218,13 +218,13 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm
stream << "\n";
continue;
}
- const QString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) );
+ const TQString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) );
const int len = span.length();
- QString spaces; // Stored leading spaces
+ TQString spaces; // Stored leading spaces
for ( int i = 0 ; i < len ; ++i )
{
- const QChar& ch = span[ i ];
+ const TQChar& ch = span[ i ];
if ( ch == '#' )
{
stream << spaces << span.mid( i );
@@ -252,7 +252,7 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm
}
}
-void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const
+void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const
{
if ( text.isEmpty() )
{
@@ -263,20 +263,20 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
else if ( m_wrapWidth == -1 )
{
// Traditional KBabel wrapping
- QStringList list = QStringList::split( '\n', text );
+ TQStringList list = TQStringList::split( '\n', text );
if ( text.startsWith( "\n" ) )
- list.prepend( QString() );
+ list.prepend( TQString() );
if(list.isEmpty())
- list.append( QString() );
+ list.append( TQString() );
if( list.count() > 1 )
- list.prepend( QString() );
+ list.prepend( TQString() );
stream << keyword << " ";
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = list.constBegin(); it != list.constEnd(); ++it )
{
stream << "\"" << (*it) << "\"\n";
@@ -290,7 +290,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
// No wrapping (like Gettext's --no.wrap or -w0 )
// we need to remove the \n characters, as they are extra characters
- QString realText( text );
+ TQString realText( text );
realText.remove( '\n' );
stream << keyword << " \"" << realText << "\"\n";
return;
@@ -301,7 +301,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
// From here on, we assume that we have an non-empty text and a positive non-null m_wrapWidth
// we need to remove the \n characters, as they are extra characters
- QString realText( text );
+ TQString realText( text );
realText.remove( '\n' );
bool needFirstEmptyLine = false;
diff --git a/kbabel/filters/gettext/gettextexport.h b/kbabel/filters/gettext/gettextexport.h
index 81cbe9c4..3c694d1a 100644
--- a/kbabel/filters/gettext/gettextexport.h
+++ b/kbabel/filters/gettext/gettextexport.h
@@ -35,7 +35,7 @@
#include <catalogfileplugin.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KBabel {
class Catalog;
@@ -53,20 +53,20 @@ class QTextCodec;
class GettextExportPlugin: public KBabel::CatalogExportPlugin
{
public:
- GettextExportPlugin(QObject* parent, const char* name, const QStringList &);
- virtual KBabel::ConversionStatus save(const QString& file, const QString& mimetype, const KBabel::Catalog* catalog);
+ GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &);
+ virtual KBabel::ConversionStatus save(const TQString& file, const TQString& mimetype, const KBabel::Catalog* catalog);
private:
/**
* Write a PO comment to @p stream and take care that each comment lines start with a # character
*/
- void writeComment( QTextStream& stream, const QString& comment ) const;
+ void writeComment( TQTextStream& stream, const TQString& comment ) const;
/**
* Write a PO keyword (msgctxt, msgid, msgstr, msgstr_plural, msgstr[0]) and the corresponding text.
* This includes wrapping the text.
*/
- void writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const;
+ void writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const;
public:
/**
diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp
index 3f54301d..9210c1a9 100644
--- a/kbabel/filters/gettext/gettextimport.cpp
+++ b/kbabel/filters/gettext/gettextimport.cpp
@@ -39,10 +39,10 @@
#include <catalogitem.h>
#include <resources.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -53,11 +53,11 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextimport, KGenericFactory<GettextImportP
using namespace KBabel;
-GettextImportPlugin::GettextImportPlugin(QObject* parent, const char* name, const QStringList &) : CatalogImportPlugin(parent,name)
+GettextImportPlugin::GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &) : CatalogImportPlugin(parent,name)
{
}
-ConversionStatus GettextImportPlugin::load(const QString& filename, const QString&)
+ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQString&)
{
kdDebug( KBABEL ) << k_funcinfo << endl;
@@ -66,7 +66,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
return NO_FILE;
}
- QFileInfo info(filename);
+ TQFileInfo info(filename);
if(!info.exists() || info.isDir())
return NO_FILE;
@@ -74,7 +74,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
if(!info.isReadable())
return NO_PERMISSIONS;
- QFile file(filename);
+ TQFile file(filename);
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
@@ -82,23 +82,23 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
uint oldPercent = 0;
emit signalResetProgressBar(i18n("loading file"),100);
- QByteArray ba = file.readAll();
+ TQByteArray ba = file.readAll();
file.close();
// find codec for file
bool hadCodec;
- QTextCodec* codec=codecForArray( ba, &hadCodec );
+ TQTextCodec* codec=codecForArray( ba, &hadCodec );
bool recoveredErrorInHeader = false;
- QTextStream stream(ba,IO_ReadOnly);
+ TQTextStream stream(ba,IO_ReadOnly);
if(codec)
stream.setCodec(codec);
else
{
kdWarning() << "No encoding declared or found, using UTF-8" << endl;
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
#ifdef __GNUC__
# warning Default UTF-8 encoding needs to be improved
#endif
@@ -106,12 +106,12 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
//recoveredErrorInHeader = true;
}
- QIODevice *dev = stream.device();
+ TQIODevice *dev = stream.device();
int fileSize = dev->size();
// if somethings goes wrong with the parsing, we don't have deleted the old contents
CatalogItem tempHeader;
- QStringList tempObsolete;
+ TQStringList tempObsolete;
kdDebug(KBABEL) << "start parsing..." << endl;
@@ -139,15 +139,15 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
{
// The header must have an empty msgid
kdWarning(KBABEL) << "Header entry has non-empty msgid. Creating a temporary header! " << _msgid << endl;
- tempHeader.setMsgid( QStringList() );
- QStringList tmp;
+ tempHeader.setMsgid( TQStringList() );
+ TQStringList tmp;
tmp.append(
"Content-Type: text/plain; charset=UTF-8\\n" // Unknown charset
"Content-Transfer-Encoding: 8bit\\n"
"Mime-Version: 1.0" );
tempHeader.setMsgstr( tmp );
// We keep the comment of the first entry, as it might really be a header comment (at least partially)
- const QString comment( "# Header entry was created by KBabel!\n#\n" + _comment );
+ const TQString comment( "# Header entry was created by KBabel!\n#\n" + _comment );
tempHeader.setComment( comment );
recoveredErrorInHeader = true;
}
@@ -167,7 +167,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
// now parse the rest of the file
uint counter=0;
- QValueList<uint> errorIndex;
+ TQValueList<uint> errorIndex;
bool recoveredError=false;
bool docbookFile=false;
@@ -289,17 +289,17 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
}
}
-QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec)
+TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCodec)
{
if(hadCodec)
{
*hadCodec=false;
}
- QTextStream stream( array, IO_ReadOnly );
- // ### TODO Qt4: see if it can be done with QByteArray alone, in an encoding-neutral way.
+ TQTextStream stream( array, IO_ReadOnly );
+ // ### TODO Qt4: see if it can be done with TQByteArray alone, in an encoding-neutral way.
// Set ISO-8859-1 as it is a relatively neutral encoding when reading (compared to UTF-8 or a random locale encoing)
- stream.setEncoding( QTextStream::Latin1 );
+ stream.setEncoding( TQTextStream::Latin1 );
// first read header
ConversionStatus status = readHeader(stream);
@@ -309,19 +309,19 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
return 0;
}
- const QString head = _msgstr.first();
+ const TQString head = _msgstr.first();
- QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
+ TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
if( regexp.search( head ) == -1 )
{
kdDebug(KBABEL) << "no charset entry found" << endl;
return 0;
}
- const QString charset = regexp.cap(1);
+ const TQString charset = regexp.cap(1);
kdDebug(KBABEL) << "charset: " << charset << endl;
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -333,14 +333,14 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
if(hadCodec)
*hadCodec=false;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf-8 encoding.")
+ << TQString("file seems to be a template: using utf-8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
if(hadCodec)
*hadCodec=true;
}
@@ -360,7 +360,7 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
return codec;
}
-ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream)
+ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream)
{
CatalogItem temp;
int filePos=stream.device()->at();
@@ -380,25 +380,25 @@ ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream)
return PARSE_ERROR;
}
-ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
+ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
//kdDebug( KBABEL ) << k_funcinfo << " START" << endl;
enum {Begin,Comment,Msgctxt,Msgid,Msgstr} part=Begin;
- QString line;
+ TQString line;
bool error=false;
bool recoverableError=false;
bool seenMsgctxt=false;
_msgstr.clear();
- _msgstr.append(QString());
+ _msgstr.append(TQString());
_msgid.clear();
- _msgid.append(QString());
- _msgctxt=QString();
- _comment=QString();
+ _msgid.append(TQString());
+ _msgctxt=TQString();
+ _comment=TQString();
_gettextPluralForm=false;
_obsolete=false;
- QStringList::Iterator msgstrIt=_msgstr.begin();
+ TQStringList::Iterator msgstrIt=_msgstr.begin();
while( !stream.eof() )
{
@@ -439,34 +439,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
part=Comment;
_comment=line;
}
- else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgctxt\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgctxt\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -494,34 +494,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
_comment+=("\n"+line);
}
- else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgctxt\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgctxt\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -539,11 +539,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
// add Msgctxt line to item
if(_msgctxt.isEmpty())
@@ -551,24 +551,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
else
_msgctxt+=("\n"+line);
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -586,13 +586,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
if(_gettextPluralForm)
it = _msgid.fromLast();
else
@@ -604,26 +604,26 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
else
(*it)+=("\n"+line);
}
- else if(line.find(QRegExp("^msgid_plural\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid_plural\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid_plural\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgid.append(line);
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid_plural\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid_plural\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
_msgid.append(line);
@@ -631,24 +631,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
recoverableError=true;
}
else if(!_gettextPluralForm
- && (line.find(QRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
}
else if(!_gettextPluralForm
- && line.find(QRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
+ && line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
@@ -656,24 +656,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
recoverableError=true;
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
@@ -694,15 +694,15 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
break;
}
// a line of the msgid with a missing quotation mark
- else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
if( _gettextPluralForm )
it = _msgid.fromLast();
else
@@ -726,11 +726,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
if(line.isEmpty())
continue;
// another line of the msgstr
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
if((*msgstrIt).isEmpty())
(*msgstrIt)=line;
@@ -738,27 +738,27 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
(*msgstrIt)+=("\n"+line);
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
msgstrIt=_msgstr.append(line);
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
msgstrIt=_msgstr.append(line);
if(!line.isEmpty())
recoverableError=true;
}
- else if((line.find(QRegExp("^\\s*msgid")) != -1) || (line.find(QRegExp("^\\s*#")) != -1))
+ else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1))
{
// We have read successfully one entry, so end loop.
stream.device()->at(pos);// reset position in stream to beginning of this line
@@ -771,13 +771,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
break;
}
// another line of the msgstr with a missing quotation mark
- else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
if((*msgstrIt).isEmpty())
(*msgstrIt)=line;
@@ -800,7 +800,7 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
<< "msgid:\n" << _msgid.first() << "\n"
<< "msgid_plural:\n" << _msgid.last() << "\n" << endl;
int counter=0;
- for(QStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it)
+ for(TQStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it)
{
kdDebug(KBABEL) << "msgstr[" << counter << "]:\n"
<< (*it) << endl;
diff --git a/kbabel/filters/gettext/gettextimport.h b/kbabel/filters/gettext/gettextimport.h
index e28ec790..dc84e404 100644
--- a/kbabel/filters/gettext/gettextimport.h
+++ b/kbabel/filters/gettext/gettextimport.h
@@ -35,7 +35,7 @@
#include <catalogfileplugin.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KURL;
class QFile;
@@ -49,20 +49,20 @@ class QTextCodec;
class GettextImportPlugin: public KBabel::CatalogImportPlugin
{
public:
- GettextImportPlugin(QObject* parent, const char* name, const QStringList &);
- virtual KBabel::ConversionStatus load(const QString& file, const QString& mimetype);
- virtual const QString id() { return "GNU gettext"; }
+ GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &);
+ virtual KBabel::ConversionStatus load(const TQString& file, const TQString& mimetype);
+ virtual const TQString id() { return "GNU gettext"; }
private:
- QTextCodec* codecForArray(QByteArray& arary, bool* hadCodec);
- KBabel::ConversionStatus readHeader(QTextStream& stream);
- KBabel::ConversionStatus readEntry(QTextStream& stream);
+ TQTextCodec* codecForArray(TQByteArray& arary, bool* hadCodec);
+ KBabel::ConversionStatus readHeader(TQTextStream& stream);
+ KBabel::ConversionStatus readEntry(TQTextStream& stream);
// description of the last read entry
- QString _msgctxt;
- QStringList _msgid;
- QStringList _msgstr;
- QString _comment;
+ TQString _msgctxt;
+ TQStringList _msgid;
+ TQStringList _msgstr;
+ TQString _comment;
bool _gettextPluralForm;
bool _obsolete;
};
diff --git a/kbabel/filters/linguist/linguistexport.cpp b/kbabel/filters/linguist/linguistexport.cpp
index 3b69e20a..af0a3298 100644
--- a/kbabel/filters/linguist/linguistexport.cpp
+++ b/kbabel/filters/linguist/linguistexport.cpp
@@ -36,11 +36,11 @@
**************************************************************************** */
-#include <qfile.h>
-#include "qregexp.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include "tqregexp.h"
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kgenericfactory.h>
@@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistexport, KGenericFactory<LinguistExpor
using namespace KBabel;
-LinguistExportPlugin::LinguistExportPlugin( QObject * parent, const char * name, const QStringList& )
+LinguistExportPlugin::LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogExportPlugin( parent, name )
{
}
-ConversionStatus LinguistExportPlugin::save( const QString& filename, const QString&, const Catalog * catalog )
+ConversionStatus LinguistExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog )
{
// Check whether we know how to handle the extra data.
if ( catalog->importPluginID( ) != "Qt translation source" )
return UNSUPPORTED_TYPE;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return OS_ERROR;
SaveSettings settings = catalog->saveSettings( );
// New DOM document.
- QDomDocument doc( "TS" );
+ TQDomDocument doc( "TS" );
// Create the root element.
doc.appendChild( doc.createElement( "TS" ) );
@@ -82,36 +82,36 @@ ConversionStatus LinguistExportPlugin::save( const QString& filename, const QStr
// Regular messages.
for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) {
- QString comment( extractComment( doc, catalog->comment( i ), fuzzy ) );
+ TQString comment( extractComment( doc, catalog->comment( i ), fuzzy ) );
createMessage( doc, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ),
comment, false, fuzzy );
}
// Obsolete messages.
if ( settings.saveObsolete ) {
- QValueList<CatalogItem> obsMessages = catalog->obsoleteEntries( );
- QValueList<CatalogItem>::Iterator it;
+ TQValueList<CatalogItem> obsMessages = catalog->obsoleteEntries( );
+ TQValueList<CatalogItem>::Iterator it;
for ( it = obsMessages.begin( ); it != obsMessages.end( ); ++it ) {
- QString comment( extractComment( doc, (*it).comment( ), fuzzy ) );
+ TQString comment( extractComment( doc, (*it).comment( ), fuzzy ) );
createMessage( doc, (*it).msgid( true ).join( "" ), (*it).msgstr( true ).join( "" ),
comment, true, fuzzy );
}
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
doc.save( stream, 2 );
file.close( );
return OK;
}
-const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QString& s, bool& fuzzy )
+const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy )
{
fuzzy = false;
- QString comment( s );
+ TQString comment( s );
if ( !comment.isEmpty( ) ) {
// Extract the context and the actual comment.
- comment.remove( QRegExp( "^Context:[\\s]*" ) );
+ comment.remove( TQRegExp( "^Context:[\\s]*" ) );
/*
* HACK
*
@@ -129,28 +129,28 @@ const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QSt
comment.remove("#, fuzzy");
}
- QString newContext;
+ TQString newContext;
pos = comment.find( '\n' );
if ( pos >= 0 ) {
newContext = comment.left( pos );
- comment.replace( 0, pos + 1, "" ); // ### TODO: use QString::remove
+ comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
} else {
newContext = comment;
- comment = ""; // ### TODO: use QString() instead of ""
+ comment = ""; // ### TODO: use TQString() instead of ""
}
setContext( doc, newContext );
}
return comment;
}
-void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgid,
- const QString& msgstr, const QString& comment,
+void LinguistExportPlugin::createMessage( TQDomDocument& doc, const TQString& msgid,
+ const TQString& msgstr, const TQString& comment,
const bool obsolete, const bool fuzzy )
{
- QDomElement elem;
- QDomText text;
+ TQDomElement elem;
+ TQDomText text;
- QDomElement messageElement = doc.createElement( "message" );
+ TQDomElement messageElement = doc.createElement( "message" );
elem = doc.createElement( "source" );
text = doc.createTextNode( msgid );
@@ -179,17 +179,17 @@ void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgi
contextElement.appendChild( messageElement );
}
-void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext )
+void LinguistExportPlugin::setContext( TQDomDocument& doc, TQString newContext )
{
// Nothing to do here.
if ( newContext == context )
return;
- // Find out whether there is already such a context in the QDomDocument.
- QDomNode node = doc.documentElement( ).firstChild( );
+ // Find out whether there is already such a context in the TQDomDocument.
+ TQDomNode node = doc.documentElement( ).firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.firstChild( ).toElement( );
+ TQDomElement elem = node.firstChild( ).toElement( );
if ( elem.isElement( ) && elem.tagName( ) == "name" && elem.text( ) == newContext ) {
// We found the context.
context = newContext;
@@ -205,8 +205,8 @@ void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext )
contextElement = doc.createElement( "context" );
doc.documentElement( ).appendChild( contextElement );
// Appropriate name element.
- QDomElement nameElement = doc.createElement( "name" );
- QDomText text = doc.createTextNode( newContext );
+ TQDomElement nameElement = doc.createElement( "name" );
+ TQDomText text = doc.createTextNode( newContext );
nameElement.appendChild( text );
contextElement.appendChild( nameElement );
// Store new context.
diff --git a/kbabel/filters/linguist/linguistexport.h b/kbabel/filters/linguist/linguistexport.h
index 3201f95f..2ad80bd7 100644
--- a/kbabel/filters/linguist/linguistexport.h
+++ b/kbabel/filters/linguist/linguistexport.h
@@ -37,7 +37,7 @@
#ifndef LINGUISTEXPORT_H
#define LINGUISTEXPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -51,18 +51,18 @@ class Catalog;
class LinguistExportPlugin : public KBabel::CatalogExportPlugin
{
public:
- LinguistExportPlugin( QObject * parent, const char * name, const QStringList& );
- virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog );
+ LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& );
+ virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog );
private:
- const QString extractComment( QDomDocument& doc, const QString& s, bool& fuzzy );
- void createMessage( QDomDocument& doc, const QString& msgid, const QString& msgstr,
- const QString& comment, const bool obsolete, const bool fuzzy );
- void setContext( QDomDocument& doc, QString newContext );
+ const TQString extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy );
+ void createMessage( TQDomDocument& doc, const TQString& msgid, const TQString& msgstr,
+ const TQString& comment, const bool obsolete, const bool fuzzy );
+ void setContext( TQDomDocument& doc, TQString newContext );
private:
- QString context;
- QDomElement contextElement;
+ TQString context;
+ TQDomElement contextElement;
};
#endif // LINGUISTEXPORT_H
diff --git a/kbabel/filters/linguist/linguistimport.cpp b/kbabel/filters/linguist/linguistimport.cpp
index 220c0634..a1870bd7 100644
--- a/kbabel/filters/linguist/linguistimport.cpp
+++ b/kbabel/filters/linguist/linguistimport.cpp
@@ -38,12 +38,12 @@
**************************************************************************** */
// Qt include files
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -55,19 +55,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistimport, KGenericFactory<LinguistImpor
using namespace KBabel;
-LinguistImportPlugin::LinguistImportPlugin( QObject * parent, const char * name, const QStringList& )
+LinguistImportPlugin::LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogImportPlugin( parent, name )
{
}
-ConversionStatus LinguistImportPlugin::load( const QString& filename, const QString& )
+ConversionStatus LinguistImportPlugin::load( const TQString& filename, const TQString& )
{
if ( filename.isEmpty( ) ) {
kdDebug( ) << "fatal error: empty filename to open" << endl;
return NO_FILE;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.exists( ) || info.isDir( ) )
return NO_FILE;
@@ -75,14 +75,14 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
if ( !info.isReadable( ) )
return NO_PERMISSIONS;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, &errorMsg, &errorLine, &errorColumn ) ) {
file.close( );
kdError() << "Parsing error at line " << errorLine << ", column " << errorColumn << ", error " << errorMsg << endl;
@@ -90,7 +90,7 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
}
file.close( );
- const QDomElement documentElement( doc.documentElement() );
+ const TQDomElement documentElement( doc.documentElement() );
// Count the number of messages in this file. This is needed for updating
// the progress bar correctly.
msgcnt = documentElement.elementsByTagName( "message" ).count();
@@ -113,13 +113,13 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
return OK;
}
-void LinguistImportPlugin::parse( const QDomElement& parentElement )
+void LinguistImportPlugin::parse( const TQDomElement& parentElement )
{
- QDomNode node = parentElement.firstChild( );
+ TQDomNode node = parentElement.firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.toElement( );
+ TQDomElement elem = node.toElement( );
if ( elem.tagName( ) == "context" ) {
// nothing to do here
@@ -127,14 +127,14 @@ void LinguistImportPlugin::parse( const QDomElement& parentElement )
context = elem.text( );
} else if ( elem.tagName( ) == "message" ) {
CatalogItem item;
- QString comment;
+ TQString comment;
bool isObsolete = false;
bool isFuzzy = false;
- QDomNode childNode = node.firstChild();
+ TQDomNode childNode = node.firstChild();
for ( ; ! childNode.isNull() ; childNode = childNode.nextSibling() )
{
- const QDomElement elem = childNode.toElement();
+ const TQDomElement elem = childNode.toElement();
if ( elem.isNull() )
continue;
@@ -155,7 +155,7 @@ void LinguistImportPlugin::parse( const QDomElement& parentElement )
}
}
- QString fullComment = "Context: " + context;
+ TQString fullComment = "Context: " + context;
if ( isFuzzy )
{
/*
diff --git a/kbabel/filters/linguist/linguistimport.h b/kbabel/filters/linguist/linguistimport.h
index 3cdbd7e3..8c6fdbc0 100644
--- a/kbabel/filters/linguist/linguistimport.h
+++ b/kbabel/filters/linguist/linguistimport.h
@@ -37,7 +37,7 @@
#ifndef LINGUISTIMPORT_H
#define LINGUISTIMPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -50,19 +50,19 @@ class QStringList;
class LinguistImportPlugin : public KBabel::CatalogImportPlugin
{
public:
- LinguistImportPlugin( QObject * parent, const char * name, const QStringList& );
+ LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& );
- virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype );
- virtual const QString id( ) { return "Qt translation source"; }
+ virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype );
+ virtual const TQString id( ) { return "Qt translation source"; }
private:
- void parse( const QDomElement& parentElement );
+ void parse( const TQDomElement& parentElement );
private:
uint msgcnt;
uint cnt;
- QString context;
- //QStringList obsMessages;
+ TQString context;
+ //TQStringList obsMessages;
};
#endif // LINGUISTIMPORT_H
diff --git a/kbabel/filters/xliff/xliffexport.cpp b/kbabel/filters/xliff/xliffexport.cpp
index 53527f2c..9400b9c6 100644
--- a/kbabel/filters/xliff/xliffexport.cpp
+++ b/kbabel/filters/xliff/xliffexport.cpp
@@ -36,11 +36,11 @@
**************************************************************************** */
-#include <qfile.h>
-#include "qregexp.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include "tqregexp.h"
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kgenericfactory.h>
@@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffexport, KGenericFactory<XLIFFExportPlugi
using namespace KBabel;
-XLIFFExportPlugin::XLIFFExportPlugin( QObject * parent, const char * name, const QStringList& )
+XLIFFExportPlugin::XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogExportPlugin( parent, name )
{
}
-ConversionStatus XLIFFExportPlugin::save( const QString& filename, const QString&, const Catalog * catalog )
+ConversionStatus XLIFFExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog )
{
// Check whether we know how to handle the extra data.
if ( catalog->importPluginID( ) != "XLIFF 1.1" )
return UNSUPPORTED_TYPE;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return OS_ERROR;
SaveSettings settings = catalog->saveSettings( );
// New DOM document.
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
extraData = catalog->catalogExtraData();
kdDebug () << "Setting the document data: " << extraData.first () << endl;
@@ -79,20 +79,20 @@ ConversionStatus XLIFFExportPlugin::save( const QString& filename, const QString
// Regular messages.
for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) {
- QDomElement element = extractComment( doc, *(extraData.at( i+1 )) );
+ TQDomElement element = extractComment( doc, *(extraData.at( i+1 )) );
createMessage( doc, element, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ) );
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
doc.save( stream, 2 );
file.close( );
return OK;
}
-QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString& s )
+TQDomElement XLIFFExportPlugin::extractComment( TQDomDocument& doc, const TQString& s )
{
- QString comment( s );
+ TQString comment( s );
if ( comment.isEmpty () )
{
@@ -100,27 +100,27 @@ QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString&
}
// Extract the context and the actual comment.
- comment.remove( QRegExp( "^Context:[\\s]*" ) );
- QString newContext;
- QStringList commentlines = QStringList::split ( '\n', comment);
+ comment.remove( TQRegExp( "^Context:[\\s]*" ) );
+ TQString newContext;
+ TQStringList commentlines = TQStringList::split ( '\n', comment);
- QString file = *(commentlines.at(0));
- QString id = *(commentlines.at(1));
+ TQString file = *(commentlines.at(0));
+ TQString id = *(commentlines.at(1));
kdDebug () << "Looking for file " << file << endl;
return getContext( doc, file, id );
}
-void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translationElement, const QString& msgid,
- const QString& msgstr )
+void XLIFFExportPlugin::createMessage( TQDomDocument& doc, TQDomElement& translationElement, const TQString& msgid,
+ const TQString& msgstr )
{
// for empty messages, don't store anything
if (msgstr.isEmpty ())
return;
// find the trans element
- QDomNode node = translationElement.firstChild( );
+ TQDomNode node = translationElement.firstChild( );
while ( !node.isNull( ) ) {
kdDebug () << node.nodeName () << endl;
if ( node.isElement() && node.toElement().tagName( ) == "target") {
@@ -139,16 +139,16 @@ void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translati
node = doc.createElement ("target");
translationElement.appendChild (node);
- QDomText data = doc.createTextNode(msgstr );
+ TQDomText data = doc.createTextNode(msgstr );
node.appendChild( data );
}
}
-QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& file, const QString& id )
+TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& file, const TQString& id )
{
- // Find out whether there is already such a context in the QDomDocument.
- QDomNode parentelem = doc.documentElement();
- QDomNode elem = doc.documentElement( ).firstChild( );
+ // Find out whether there is already such a context in the TQDomDocument.
+ TQDomNode parentelem = doc.documentElement();
+ TQDomNode elem = doc.documentElement( ).firstChild( );
while ( !elem.isNull( ) ) {
if ( elem.isElement( ) && elem.toElement().tagName( ) == "file" && elem.toElement().attribute ("original") == file ) {
kdDebug () << "We have found the file" << endl;
@@ -160,7 +160,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "File not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("file");
+ TQDomElement newelem = doc.createElement ("file");
newelem.setAttribute ("original", file);
parentelem.appendChild (newelem);
elem = newelem;
@@ -180,7 +180,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "File body not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("body");
+ TQDomElement newelem = doc.createElement ("body");
parentelem.appendChild (newelem);
elem = newelem;
}
@@ -190,7 +190,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "Trans-unit not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("trans-unit");
+ TQDomElement newelem = doc.createElement ("trans-unit");
newelem.setAttribute ("id", id);
parentelem.appendChild (newelem);
elem = newelem;
@@ -199,16 +199,16 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
return elem.toElement ();
}
-QDomElement XLIFFExportPlugin::findTransUnit( QDomNode& group, const QString& id )
+TQDomElement XLIFFExportPlugin::findTransUnit( TQDomNode& group, const TQString& id )
{
- QDomNode elem = group.firstChild( );
+ TQDomNode elem = group.firstChild( );
// lookup correct trans-unit tag
while ( !elem.isNull( ) ) {
if ( elem.isElement( ) && elem.toElement().tagName() == "group" )
{
// search recursively
- QDomElement res = findTransUnit( elem, id );
+ TQDomElement res = findTransUnit( elem, id );
if (! res.isNull () )
return res.toElement();
}
diff --git a/kbabel/filters/xliff/xliffexport.h b/kbabel/filters/xliff/xliffexport.h
index 5bf64b25..2e720b82 100644
--- a/kbabel/filters/xliff/xliffexport.h
+++ b/kbabel/filters/xliff/xliffexport.h
@@ -37,7 +37,7 @@
#ifndef XLIFFEXPORT_H
#define XLIFFEXPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -51,16 +51,16 @@ class Catalog;
class XLIFFExportPlugin : public KBabel::CatalogExportPlugin
{
public:
- XLIFFExportPlugin( QObject * parent, const char * name, const QStringList& );
- virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog );
+ XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& );
+ virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog );
private:
- QDomElement extractComment( QDomDocument& doc, const QString& s );
- void createMessage( QDomDocument& doc, QDomElement& context, const QString& msgid, const QString& msgstr );
- QDomElement getContext( QDomDocument& doc, const QString& file, const QString& id);
- QDomElement findTransUnit( QDomNode& doc, const QString& id);
+ TQDomElement extractComment( TQDomDocument& doc, const TQString& s );
+ void createMessage( TQDomDocument& doc, TQDomElement& context, const TQString& msgid, const TQString& msgstr );
+ TQDomElement getContext( TQDomDocument& doc, const TQString& file, const TQString& id);
+ TQDomElement findTransUnit( TQDomNode& doc, const TQString& id);
- QStringList extraData;
+ TQStringList extraData;
};
#endif // XLIFFEXPORT_H
diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp
index f7de63ce..25f34ec3 100644
--- a/kbabel/filters/xliff/xliffimport.cpp
+++ b/kbabel/filters/xliff/xliffimport.cpp
@@ -48,12 +48,12 @@
*/
// Qt include files
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -68,19 +68,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffimport, KGenericFactory<XLIFFImportPlugi
using namespace KBabel;
-XLIFFImportPlugin::XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& )
+XLIFFImportPlugin::XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogImportPlugin( parent, name )
{
}
-ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString& )
+ConversionStatus XLIFFImportPlugin::load( const TQString& filename, const TQString& )
{
if ( filename.isEmpty( ) ) {
kdDebug( KDEBUG_AREA ) << "fatal error: empty filename to open" << endl;
return NO_FILE;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.exists( ) || info.isDir( ) )
return NO_FILE;
@@ -88,14 +88,14 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
if ( !info.isReadable( ) )
return NO_PERMISSIONS;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, &errorMsg, &errorLine, &errorColumn ) ) {
file.close( );
kdError ( KDEBUG_AREA ) << "Parsing error at line " << errorLine << ", column " << errorColumn << ", error " << errorMsg << endl;
@@ -105,7 +105,7 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
extraData.clear();
- const QDomElement documentElement( doc.documentElement() );
+ const TQDomElement documentElement( doc.documentElement() );
msgcnt = documentElement.elementsByTagName( "trans-unit" ).count();
extraData.append( doc.toString() );
@@ -128,32 +128,32 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
return OK;
}
-void XLIFFImportPlugin::parse( const QDomElement& parentElement )
+void XLIFFImportPlugin::parse( const TQDomElement& parentElement )
{
- QDomNode node = parentElement.firstChild( );
+ TQDomNode node = parentElement.firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.toElement( );
+ TQDomElement elem = node.toElement( );
if ( elem.tagName( ) == "body" ) {
// nothing to do here
} else if ( elem.tagName( ) == "file" ) {
- context = elem.attribute( "original", QString() );
+ context = elem.attribute( "original", TQString() );
kdDebug ( KDEBUG_AREA ) << "Found file: " << context << endl;
} else if ( elem.tagName( ) == "trans-unit" ) {
CatalogItem item;
- QString comment;
+ TQString comment;
bool isObsolete = false;
- const QString id = elem.attribute ("id");
+ const TQString id = elem.attribute ("id");
- QDomNode childNode = node.firstChild();
+ TQDomNode childNode = node.firstChild();
for ( ; ! childNode.isNull() ; childNode = childNode.nextSibling() )
{
if ( childNode.isElement() )
{
- const QDomElement elem = childNode.toElement( );
+ const TQDomElement elem = childNode.toElement( );
if ( elem.tagName( ) == "source" ) {
item.setMsgid( elem.text( ) );
} else if ( elem.tagName( ) == "target" ) {
diff --git a/kbabel/filters/xliff/xliffimport.h b/kbabel/filters/xliff/xliffimport.h
index 9cf44835..45dd612e 100644
--- a/kbabel/filters/xliff/xliffimport.h
+++ b/kbabel/filters/xliff/xliffimport.h
@@ -37,7 +37,7 @@
#ifndef XLIFFIMPORT_H
#define XLIFFIMPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -50,19 +50,19 @@ class QStringList;
class XLIFFImportPlugin : public KBabel::CatalogImportPlugin
{
public:
- XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& );
+ XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& );
- virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype );
- virtual const QString id( ) { return "XLIFF 1.1"; }
+ virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype );
+ virtual const TQString id( ) { return "XLIFF 1.1"; }
private:
- void parse( const QDomElement& parentElement );
+ void parse( const TQDomElement& parentElement );
private:
uint msgcnt;
uint cnt;
- QString context;
- QStringList extraData;
+ TQString context;
+ TQStringList extraData;
};
#endif // XLIFFIMPORT_H
diff --git a/kbabel/kbabel/charselectview.cpp b/kbabel/kbabel/charselectview.cpp
index 12cd765f..2e58b084 100644
--- a/kbabel/kbabel/charselectview.cpp
+++ b/kbabel/kbabel/charselectview.cpp
@@ -33,11 +33,11 @@
#include "charselectview.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qscrollview.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqscrollview.h>
#include <kconfig.h>
#include <kcursor.h>
@@ -49,24 +49,24 @@
using namespace KBabel;
-CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->setSpacing( KDialog::spacingHint() );
- QHBox* bar = new QHBox(this);
+ TQHBox* bar = new TQHBox(this);
bar->setSpacing( KDialog::spacingHint() );
layout->addWidget (bar);
- QLabel *lTable = new QLabel( i18n( "Table:" ), bar );
- _tableNum = new QSpinBox( 0, 255, 1, bar );
+ TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar );
+ _tableNum = new TQSpinBox( 0, 255, 1, bar );
lTable->setBuddy( _tableNum );
bar->setStretchFactor( _tableNum, 1 );
- QScrollView* scroll = new QScrollView( this );
+ TQScrollView* scroll = new TQScrollView( this );
_table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0);
_table->setNumCols(16);
_table->setNumRows(16);
@@ -74,13 +74,13 @@ CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent,
scroll->addChild(_table);
layout->addWidget (scroll);
- connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) );
- connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) ));
+ connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) );
+ connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) ));
- connect( _catalog, SIGNAL( signalFileOpened(bool) ), this, SLOT (setDisabled (bool)));
- connect( _catalog, SIGNAL( signalFileOpened(bool) ), _table, SLOT (setDisabled (bool)));
+ connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), this, TQT_SLOT (setDisabled (bool)));
+ connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), _table, TQT_SLOT (setDisabled (bool)));
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>Character Selector</b></p>"
"<p>This tool allows to insert special characters using "
"double click.</p></qt>"));
@@ -101,7 +101,7 @@ void CharacterSelectorView::saveSettings(KConfig* config)
KConfigGroupSaver saver(config, "KBCharSelector" );
config->writeEntry( "TableNum", _tableNum->value() );
- config->writeEntry( "SelectedChar", QString(_table->chr()) );
+ config->writeEntry( "SelectedChar", TQString(_table->chr()) );
}
void CharacterSelectorView::restoreSettings(KConfig* config)
diff --git a/kbabel/kbabel/charselectview.h b/kbabel/kbabel/charselectview.h
index 76ee19b8..7b0fa8a5 100644
--- a/kbabel/kbabel/charselectview.h
+++ b/kbabel/kbabel/charselectview.h
@@ -45,7 +45,7 @@ public:
/**
* Default constructor
*/
- CharacterSelectorView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
void saveSettings(KConfig* config);
void restoreSettings(KConfig* config);
@@ -55,7 +55,7 @@ public slots:
virtual void updateView() {}
signals:
- void characterDoubleClicked( QChar ch );
+ void characterDoubleClicked( TQChar ch );
public slots:
void emitChar();
@@ -65,7 +65,7 @@ private slots:
private:
KCharSelectTable* _table;
- QSpinBox* _tableNum;
+ TQSpinBox* _tableNum;
};
#endif // CHARSELECTVIEW_H
diff --git a/kbabel/kbabel/commentview.cpp b/kbabel/kbabel/commentview.cpp
index bf2301de..57d838b9 100644
--- a/kbabel/kbabel/commentview.cpp
+++ b/kbabel/kbabel/commentview.cpp
@@ -35,11 +35,11 @@
#include "commentview.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
-#include <qtextview.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqtextview.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -62,12 +62,12 @@
using namespace KBabel;
-CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+CommentView::CommentView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent, project)
{
setAcceptDrops(true);
- QVBoxLayout* layout=new QVBoxLayout(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(this);
commentEdit = new MsgMultiLineEdit(0, 0, this);
commentEdit->setMinimumHeight(50);
@@ -75,16 +75,16 @@ CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec
commentEdit->setHighlightSyntax(false);
KCursor::setAutoHideCursor(commentEdit,true);
- QLabel* label=new QLabel(commentEdit,i18n("&Comment:"),this);
+ TQLabel* label=new TQLabel(commentEdit,i18n("&Comment:"),this);
- QHBoxLayout* hb=new QHBoxLayout(layout);
+ TQHBoxLayout* hb=new TQHBoxLayout(layout);
hb->addSpacing(KDialog::marginHint());
hb->addWidget(label);
layout->addWidget(commentEdit);
layout->setStretchFactor(commentEdit,1);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>Comment Editor</b></p>\n\
This edit window shows you the comments of the currently displayed message.<p>\n\
<p>The comments normally contain information about where the message is found in the source\n\
@@ -94,12 +94,12 @@ Hints from other translators are also sometimes contained in comments.</p>\n\
<b>Options->Show Comments</b>.</p></qt>"));
commentEdit->setReadOnly(true);
- connect(commentEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardCommentEditCmd(KBabel::EditCommand*)));
+ connect(commentEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardCommentEditCmd(KBabel::EditCommand*)));
- connect(commentEdit,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
+ connect(commentEdit,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void CommentView::update(EditCommand* cmd, bool undo)
@@ -178,7 +178,7 @@ void CommentView::readFileSettings()
setReadOnly( _catalog->isReadOnly() );
}
-const QString CommentView::selectText(int from, int to)
+const TQString CommentView::selectText(int from, int to)
{
int line, col, endline, endcol;
@@ -203,12 +203,12 @@ int CommentView::currentIndex ()
return commentEdit->currentIndex ();
}
-const QString CommentView::selectedText ()
+const TQString CommentView::selectedText ()
{
return commentEdit->selectedText ();
}
-void CommentView::installEventFilter( const QObject * filterObj )
+void CommentView::installEventFilter( const TQObject * filterObj )
{
commentEdit->installEventFilter( filterObj );
}
diff --git a/kbabel/kbabel/commentview.h b/kbabel/kbabel/commentview.h
index 1531683b..6d637add 100644
--- a/kbabel/kbabel/commentview.h
+++ b/kbabel/kbabel/commentview.h
@@ -35,7 +35,7 @@
class QTextView;
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kbcatalogview.h"
#include "kbcatalog.h"
@@ -51,7 +51,7 @@ public:
/**
* Default constructor
*/
- CommentView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ CommentView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
/**
* this is called from the catalog when updating his views.
@@ -67,13 +67,13 @@ public:
virtual void textSelectAll ();
virtual void textDeselectAll ();
- const QString selectText( int from, int to );
- const QString selectedText ();
+ const TQString selectText( int from, int to );
+ const TQString selectedText ();
bool isActiveView ();
int currentIndex ();
// this method is not virtual!
- void installEventFilter( const QObject * filterObj );
+ void installEventFilter( const TQObject * filterObj );
bool hasFocus ();
diff --git a/kbabel/kbabel/contextview.cpp b/kbabel/kbabel/contextview.cpp
index e56e15dc..264d4e84 100644
--- a/kbabel/kbabel/contextview.cpp
+++ b/kbabel/kbabel/contextview.cpp
@@ -35,9 +35,9 @@
#include "contextview.h"
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+ContextView::ContextView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
- _textview = new QTextView (this, "context textview");
+ _textview = new TQTextView (this, "context textview");
KCursor::setAutoHideCursor(_textview->viewport(),true);
_textview->setReadOnly(true);
layout->addWidget (_textview);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>PO Context</b></p>"
"<p>This window shows the context of the current message "
"in the PO file. Normally it shows four messages in front "
@@ -67,7 +67,7 @@ ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec
"<p>You can hide the tools window by deactivating "
"<b>Options->Show Tools</b>.</p></qt></qt>"));
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void ContextView::updateView()
@@ -76,7 +76,7 @@ void ContextView::updateView()
if(total==0)
return;
- QString text;
+ TQString text;
uint startIndex;
uint context = 4;
if(_currentIndex < context)
@@ -100,24 +100,24 @@ void ContextView::updateView()
continue;
}
- QString entry;
- QString temp;
+ TQString entry;
+ TQString temp;
temp = _catalog->comment(i);
if(!temp.isEmpty())
{
- temp = QStyleSheet::convertFromPlainText(temp);
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(temp);
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += "<i>"+temp+"</i><br/>";
}
// FIXME: should care about plural forms
- temp = QStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp + "<br/>---<br/>";
- QStringList tempList = _catalog->msgstr(i);
+ TQStringList tempList = _catalog->msgstr(i);
if(tempList.isEmpty())
{
@@ -135,14 +135,14 @@ void ContextView::updateView()
{
uint counter = 1;
temp = "";
- for( QStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i)
+ for( TQStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i)
{
temp += i18n("Plural %1: %2\n").arg(counter++).arg(*i);
}
}
- temp = QStyleSheet::convertFromPlainText(temp);
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(temp);
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp+"<br/>";
}
diff --git a/kbabel/kbabel/contextview.h b/kbabel/kbabel/contextview.h
index 18bd0f4e..f51d3767 100644
--- a/kbabel/kbabel/contextview.h
+++ b/kbabel/kbabel/contextview.h
@@ -44,13 +44,13 @@ public:
/**
* Default constructor
*/
- ContextView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ ContextView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
private:
- QTextView* _textview;
+ TQTextView* _textview;
};
#endif // CONTEXTVIEW_H
diff --git a/kbabel/kbabel/errorlistview.cpp b/kbabel/kbabel/errorlistview.cpp
index 2dcd3b12..c49c7940 100644
--- a/kbabel/kbabel/errorlistview.cpp
+++ b/kbabel/kbabel/errorlistview.cpp
@@ -35,9 +35,9 @@
#include "errorlistview.h"
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ErrorListView::ErrorListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+ErrorListView::ErrorListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
- _textview = new QTextView (this);
+ _textview = new TQTextView (this);
KCursor::setAutoHideCursor(_textview->viewport(),true);
_textview->setReadOnly(true);
layout->addWidget(_textview);
- QWhatsThis::add(this, i18n( "<qt><p><b>Error List</b></p>"
+ TQWhatsThis::add(this, i18n( "<qt><p><b>Error List</b></p>"
"<p>This window shows the list of errors found by validator tools "
"so you can know why the current message has been marked with an "
"error.</p></qt>" ) );
diff --git a/kbabel/kbabel/errorlistview.h b/kbabel/kbabel/errorlistview.h
index d50e7ec7..cb1886c9 100644
--- a/kbabel/kbabel/errorlistview.h
+++ b/kbabel/kbabel/errorlistview.h
@@ -43,13 +43,13 @@ public:
/**
* Default constructor
*/
- ErrorListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ ErrorListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
private:
- QTextView* _textview;
+ TQTextView* _textview;
};
#endif // ERRORLISTVIEW_H
diff --git a/kbabel/kbabel/gotodialog.cpp b/kbabel/kbabel/gotodialog.cpp
index f822f0dc..b08b0098 100644
--- a/kbabel/kbabel/gotodialog.cpp
+++ b/kbabel/kbabel/gotodialog.cpp
@@ -31,16 +31,16 @@
**************************************************************************** */
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <knuminput.h>
#include "gotodialog.h"
-GotoDialog::GotoDialog(int max,QWidget* parent)
+GotoDialog::GotoDialog(int max,TQWidget* parent)
: KDialogBase(parent,0,true,i18n("Go to Entry"),Ok|Cancel)
{
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this);
_spinBox= new KIntSpinBox(1,max,1,1,10,box);
setMainWidget(box);
diff --git a/kbabel/kbabel/gotodialog.h b/kbabel/kbabel/gotodialog.h
index 4c8378d8..4c033973 100644
--- a/kbabel/kbabel/gotodialog.h
+++ b/kbabel/kbabel/gotodialog.h
@@ -38,14 +38,14 @@
#endif
#include <kdialogbase.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class KIntSpinBox;
class GotoDialog : public KDialogBase
{
public:
- GotoDialog(int max, QWidget* parent);
+ GotoDialog(int max, TQWidget* parent);
virtual ~GotoDialog();
/** reimplemented to select contents when shown*/
diff --git a/kbabel/kbabel/headereditor.cpp b/kbabel/kbabel/headereditor.cpp
index 55ad4eb5..2f686652 100644
--- a/kbabel/kbabel/headereditor.cpp
+++ b/kbabel/kbabel/headereditor.cpp
@@ -49,13 +49,13 @@
using namespace KBabel;
HeaderEditor::HeaderEditor(Catalog* cat,const char* name)
- : KDialogBase((QWidget*)0,name,false,QString::null, Ok|Cancel|Default|User1)
+ : KDialogBase((TQWidget*)0,name,false,TQString::null, Ok|Cancel|Default|User1)
{
restoreSettings();
_catalog=cat;
- connect(_catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(readHeader(bool)));
- connect(_catalog,SIGNAL(signalHeaderChanged()),this,SLOT(updateHeader()));
+ connect(_catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(readHeader(bool)));
+ connect(_catalog,TQT_SIGNAL(signalHeaderChanged()),this,TQT_SLOT(updateHeader()));
setButtonText(User1,i18n("&Apply Settings"));
setButtonWhatsThis (User1, i18n("<qt><p>This button "
@@ -97,7 +97,7 @@ void HeaderEditor::restoreSettings()
KConfigGroupSaver saver(config, "HeaderEditor" );
- QSize defaultSize(350,250);
+ TQSize defaultSize(350,250);
_editorSize = config->readSizeEntry("Size", &defaultSize );
}
@@ -133,7 +133,7 @@ void HeaderEditor::slotUser1()
if(error)
{
- QString msg=i18n("<qt><p>This is not a valid header.</p>\n"
+ TQString msg=i18n("<qt><p>This is not a valid header.</p>\n"
"<p>Please edit the header before updating!</p></qt>");
KMessageBox::sorry(this,msg);
@@ -160,7 +160,7 @@ void HeaderEditor::slotCancel()
{
updateHeader();
- QDialog::reject();
+ TQDialog::reject();
}
void HeaderEditor::slotOk()
@@ -169,7 +169,7 @@ void HeaderEditor::slotOk()
{
if(!isValid())
{
- QString msg=i18n("<qt><p>This is not a valid header.</p>\n"
+ TQString msg=i18n("<qt><p>This is not a valid header.</p>\n"
"<p>Please edit the header before updating.</p></qt>");
switch(KMessageBox::warningYesNo(this,msg,i18n("Warning"),KStdGuiItem::discard(),i18n("Edit")))
@@ -192,15 +192,15 @@ void HeaderEditor::slotOk()
_catalog->setHeader(header);
}
- QDialog::accept();
+ TQDialog::accept();
}
bool HeaderEditor::isValid()
{
// check the comments
- QStringList comments = QStringList::split('\n',_editor->commentEdit->text());
+ TQStringList comments = TQStringList::split('\n',_editor->commentEdit->text());
- for( QStringList::Iterator it = comments.begin(); it != comments.end(); ++it )
+ for( TQStringList::Iterator it = comments.begin(); it != comments.end(); ++it )
{
if( !(*it).startsWith("#") )
{
diff --git a/kbabel/kbabel/headereditor.h b/kbabel/kbabel/headereditor.h
index 9fb9d6fb..88dda5ee 100644
--- a/kbabel/kbabel/headereditor.h
+++ b/kbabel/kbabel/headereditor.h
@@ -79,7 +79,7 @@ private:
KBabel::Catalog* _catalog;
HeaderWidget* _editor;
- QSize _editorSize;
+ TQSize _editorSize;
};
#endif // HEADEREDITOR_H
diff --git a/kbabel/kbabel/hidingmsgedit.cpp b/kbabel/kbabel/hidingmsgedit.cpp
index f18f8b81..60a62da4 100644
--- a/kbabel/kbabel/hidingmsgedit.cpp
+++ b/kbabel/kbabel/hidingmsgedit.cpp
@@ -31,18 +31,18 @@
#include "mymultilineedit.h"
#include "editcmd.h"
-#include <qptrlist.h>
-#include <qsizepolicy.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqsizepolicy.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <klocale.h>
using namespace KBabel;
-HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell* spell, QWidget *parent, const char *name ) :
- QWidgetStack(parent,name)
+HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter, KSpell* spell, TQWidget *parent, const char *name ) :
+ TQWidgetStack(parent,name)
, _singleEdit(0)
, _multipleEdit(0)
, _eventFilter(eventFilter)
@@ -54,8 +54,8 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell*
_allEdits.clear();
setNumberOfPlurals( _numberOfPlurals );
- connect( _multipleEdit, SIGNAL(currentChanged( QWidget* )),
- this, SLOT( newCurrentMultiple( QWidget* )));
+ connect( _multipleEdit, TQT_SIGNAL(currentChanged( TQWidget* )),
+ this, TQT_SLOT( newCurrentMultiple( TQWidget* )));
showSingle();
}
@@ -63,7 +63,7 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell*
HidingMsgEdit::~HidingMsgEdit(){
}
-void HidingMsgEdit::setText(QStringList texts, QString msgctxt){
+void HidingMsgEdit::setText(TQStringList texts, TQString msgctxt){
if( texts.count() == 0 )
{
kdWarning() << "HidingMsgEdit::setText with empty text" << endl;
@@ -84,7 +84,7 @@ void HidingMsgEdit::setText(QStringList texts, QString msgctxt){
{
if( _numberOfPlurals )
{
- QStringList::iterator text = texts.begin();
+ TQStringList::iterator text = texts.begin();
uint i;
for( i=0 ; i < _numberOfPlurals && text!= texts.end() ; i++, text++ )
{
@@ -172,12 +172,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals )
if( _eventFilter )
_singleEdit->installEventFilter(_eventFilter);
- _multipleEdit = new QTabWidget( this );
+ _multipleEdit = new TQTabWidget( this );
MsgMultiLineEdit* pl;
for(uint i=0 ; i< _numberOfPlurals ; i++)
{
- pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, QString("multipleEdit %1").arg(i).local8Bit());
+ pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, TQString("multipleEdit %1").arg(i).local8Bit());
_allEdits.append(pl);
_multipleEdit->addTab( pl, i18n("Plural %1").arg(i+1));
if( _eventFilter )
@@ -189,12 +189,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals )
for( MsgMultiLineEdit* e = _allEdits.first() ; e ; e = _allEdits.next() )
{
- connect( e, SIGNAL( signalUndoCmd( KBabel::EditCommand* )),
- this, SIGNAL( signalUndoCmd( KBabel::EditCommand* )));
- connect( e, SIGNAL( textChanged() ) , this, SIGNAL( textChanged() ));
- connect( e, SIGNAL( textChanged() ) , this, SLOT( emitTextChanged() ));
- connect( e, SIGNAL( cursorPositionChanged( int, int )),
- this, SLOT( emitCursorPositionChanged( int, int )) );
+ connect( e, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* )),
+ this, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* )));
+ connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SIGNAL( textChanged() ));
+ connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SLOT( emitTextChanged() ));
+ connect( e, TQT_SIGNAL( cursorPositionChanged( int, int )),
+ this, TQT_SLOT( emitCursorPositionChanged( int, int )) );
}
showPlurals( plurals );
@@ -213,7 +213,7 @@ uint HidingMsgEdit::currentForm()
else return _multipleEdit->currentPageIndex();
}
-void HidingMsgEdit::newCurrentMultiple( QWidget* widget )
+void HidingMsgEdit::newCurrentMultiple( TQWidget* widget )
{
_currentEdit = dynamic_cast<MsgMultiLineEdit*>(widget);
emit currentFormChanged ( _multipleEdit->currentPageIndex () );
@@ -278,7 +278,7 @@ void HidingMsgEdit::setQuotes(bool on)
}
}
-void HidingMsgEdit::setBgColor( const QColor& color)
+void HidingMsgEdit::setBgColor( const TQColor& color)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -286,8 +286,8 @@ void HidingMsgEdit::setBgColor( const QColor& color)
}
}
-void HidingMsgEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor)
+void HidingMsgEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -328,7 +328,7 @@ void HidingMsgEdit::setHighlightBg( bool on )
}
}
-void HidingMsgEdit::setContextMenu( QPopupMenu *menu )
+void HidingMsgEdit::setContextMenu( TQPopupMenu *menu )
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -351,10 +351,10 @@ bool HidingMsgEdit::hasFocus ()
if( e->hasFocus() ) return true;
}
- return _multipleEdit->hasFocus() || QWidgetStack::hasFocus();
+ return _multipleEdit->hasFocus() || TQWidgetStack::hasFocus();
}
-void HidingMsgEdit::setDiffColors(const QColor& addColor, const QColor& delColor)
+void HidingMsgEdit::setDiffColors(const TQColor& addColor, const TQColor& delColor)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -378,7 +378,7 @@ void HidingMsgEdit::setDiffDisplayMode(bool underlineAdded, bool strikeOutDelete
}
}
-void HidingMsgEdit::setFont(const QFont& font)
+void HidingMsgEdit::setFont(const TQFont& font)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
diff --git a/kbabel/kbabel/hidingmsgedit.h b/kbabel/kbabel/hidingmsgedit.h
index 38e5d750..226f6e2d 100644
--- a/kbabel/kbabel/hidingmsgedit.h
+++ b/kbabel/kbabel/hidingmsgedit.h
@@ -30,9 +30,9 @@
#ifndef HIDINGMSGEDIT_H
#define HIDINGMSGEDIT_H
-#include <qwidgetstack.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include "mymultilineedit.h"
@@ -49,10 +49,10 @@ namespace KBabel
*@author Stanislav Visnovsky <visnovsky@kde.org>
*/
-class HidingMsgEdit : public QWidgetStack {
+class HidingMsgEdit : public TQWidgetStack {
Q_OBJECT
public:
- HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter=0, KSpell* spell=0, QWidget *parent=0, const char *name=0);
+ HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter=0, KSpell* spell=0, TQWidget *parent=0, const char *name=0);
~HidingMsgEdit();
void setNumberOfPlurals(uint numberOfPlurals);
@@ -64,7 +64,7 @@ public:
bool isOverwriteMode() const { return _currentEdit->isOverwriteMode(); }
bool isModified();
bool hasSelectedText() const { return _currentEdit->hasSelectedText(); }
- QString selectedText () const { return _currentEdit->selectedText(); }
+ TQString selectedText () const { return _currentEdit->selectedText(); }
void processCommand(KBabel::EditCommand* cmd, bool undo=false);
void offset2Pos(int offset, int &row, int &col) const
{ return _currentEdit->offset2Pos(offset, row, col ); }
@@ -74,25 +74,25 @@ public:
{ return _currentEdit->currentIndex(); }
int beginOfLastMarkedText() const
{ return _currentEdit->beginOfLastMarkedText(); }
- virtual void setFont ( const QFont & );
+ virtual void setFont ( const TQFont & );
void setCurrentColor(const MsgMultiLineEdit::TextColor color);
bool spacePoints() const { return _currentEdit->spacePoints(); }
void setSpacePoints(bool on);
bool quotes() const { return _currentEdit->quotes(); }
void setQuotes(bool on);
- void setBgColor( const QColor& color);
+ void setBgColor( const TQColor& color);
bool highlightBg() const { return _currentEdit->highlightBg(); }
bool highlightSyntax() const { return _currentEdit->highlightSyntax(); }
- void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor);
+ void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor);
int beginOfMarkedText() { return _currentEdit->beginOfMarkedText(); }
- virtual void insertAt ( const QString & s, int line, int col, bool mark = false )
+ virtual void insertAt ( const TQString & s, int line, int col, bool mark = false )
{ _currentEdit->insertAt( s, line, col, mark ); }
void setDiffMode(bool on);
void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted);
- void setDiffColors(const QColor& addColor, const QColor& delColor);
- QString text(int para) { return _currentEdit->text(para); }
+ void setDiffColors(const TQColor& addColor, const TQColor& delColor);
+ TQString text(int para) { return _currentEdit->text(para); }
void setSpellChecker(KSpell* spell);
@@ -101,7 +101,7 @@ public:
// reiplemented to return correct value
bool hasFocus ();
public slots: // Public slots
- void setText(QStringList texts, QString msgctxt = QString::null);
+ void setText(TQStringList texts, TQString msgctxt = TQString::null);
void showSingle();
void showMultiple();
void showPlurals( bool on );
@@ -125,12 +125,12 @@ public slots: // Public slots
virtual void selectAll(bool select=true) { _currentEdit->selectAll(select); }
virtual void setCursorPosition ( int para, int index )
{ _currentEdit->setCursorPosition(para,index); }
- virtual void setContextMenu( QPopupMenu *menu );
+ virtual void setContextMenu( TQPopupMenu *menu );
signals:
void signalUndoCmd(KBabel::EditCommand*);
void textChanged();
- void textChanged(const QString&);
+ void textChanged(const TQString&);
void cursorPositionChanged ( int para, int pos );
void currentFormChanged ( uint form );
@@ -139,7 +139,7 @@ private slots:
void emitTextChanged();
// invoked if TabWidget changes the shown widget
- void newCurrentMultiple( QWidget * );
+ void newCurrentMultiple( TQWidget * );
// invoked by inner cursorPositionChanged() to transform line/col for wrapping
void emitCursorPositionChanged( int para, int pos );
@@ -147,15 +147,15 @@ private: // Private attributes
/** Used for editting non-plural messages */
MsgMultiLineEdit* _singleEdit;
/** Used for editting plural forms */
- QTabWidget* _multipleEdit;
- QWidget* _eventFilter;
+ TQTabWidget* _multipleEdit;
+ TQWidget* _eventFilter;
MsgMultiLineEdit* _currentEdit;
- QPtrList<MsgMultiLineEdit> _allEdits;
+ TQPtrList<MsgMultiLineEdit> _allEdits;
uint _numberOfPlurals;
- QGuardedPtr<KSpell> _spell;
+ TQGuardedPtr<KSpell> _spell;
};
#endif
diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp
index cae7bf77..0c3c897d 100644
--- a/kbabel/kbabel/kbabel.cpp
+++ b/kbabel/kbabel/kbabel.cpp
@@ -48,15 +48,15 @@
#include "taglistview.h"
#include "sourceview.h"
-#include <qdragobject.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qsize.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqsize.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kdatatool.h>
@@ -108,19 +108,19 @@
using namespace KBabel;
-QPtrList<KBabelPreferences> KBabelMW::prefDialogs;
+TQPtrList<KBabelPreferences> KBabelMW::prefDialogs;
class MyKProgress: public KProgress
{
public:
- MyKProgress( QWidget *parent, const char *name ) : KProgress( parent, name )
+ MyKProgress( TQWidget *parent, const char *name ) : KProgress( parent, name )
{
- setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
}
- QSize sizeHint() const { return QSize( 1, 1);}
+ TQSize sizeHint() const { return TQSize( 1, 1);}
};
-KBabelMW::KBabelMW(QString projectFile)
+KBabelMW::KBabelMW(TQString projectFile)
: KDockMainWindow (), m_charselectorview(0)
{
if ( projectFile.isEmpty() )
@@ -138,7 +138,7 @@ KBabelMW::KBabelMW(QString projectFile)
init(catalog);
}
-KBabelMW::KBabelMW(KBCatalog* catalog, QString projectFile)
+KBabelMW::KBabelMW(KBCatalog* catalog, TQString projectFile)
: KDockMainWindow (), m_charselectorview(0)
{
if ( projectFile.isEmpty() )
@@ -170,9 +170,9 @@ void KBabelMW::init(KBCatalog* catalog)
_prefDialog=0;
prefDialogs.setAutoDelete(true);
- _statusbarTimer = new QTimer(this, "statusbartimer");
- connect(_statusbarTimer,SIGNAL(timeout()),this
- ,SLOT(clearStatusbarMsg()));
+ _statusbarTimer = new TQTimer(this, "statusbartimer");
+ connect(_statusbarTimer,TQT_SIGNAL(timeout()),this
+ ,TQT_SLOT(clearStatusbarMsg()));
// FIXME:
Q_ASSERT(_project);
@@ -193,87 +193,87 @@ void KBabelMW::init(KBCatalog* catalog)
stateChanged( "fileopened" , StateReverse );
stateChanged( "readonly", StateNoReverse );
- QPopupMenu* popup;
- popup = (QPopupMenu*)(factory()->container("rmb_edit", this));
+ TQPopupMenu* popup;
+ popup = (TQPopupMenu*)(factory()->container("rmb_edit", this));
if(popup)
{
m_view->setRMBEditMenu(popup);
}
- popup = (QPopupMenu*)(factory()->container("rmb_search", this));
+ popup = (TQPopupMenu*)(factory()->container("rmb_search", this));
if(popup)
{
m_view->setRMBSearchMenu(popup);
}
- connect(catalog,SIGNAL(signalUndoAvailable(bool)),this
- ,SLOT(enableUndo(bool)));
- connect(catalog,SIGNAL(signalRedoAvailable(bool)),this
- ,SLOT(enableRedo(bool)));
- connect(catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)),this
- ,SLOT(setNumberOfFuzzies(uint)));
- connect(catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)),this
- ,SLOT(setNumberOfUntranslated(uint)));
- connect(catalog,SIGNAL(signalTotalNumberChanged(uint)),this
- ,SLOT(setNumberOfTotal(uint)));
- connect(catalog,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int)));
- connect(catalog,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar()));
- connect(catalog,SIGNAL(signalResetProgressBar(QString,int))
- ,this,SLOT(prepareProgressBar(QString,int)));
- connect(catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(enableDefaults(bool)));
- connect(catalog,SIGNAL(signalFileOpened(bool)),m_view,SLOT(newFileOpened(bool)));
- connect(catalog,SIGNAL(signalModified(bool)),this,SLOT(showModified(bool)));
+ connect(catalog,TQT_SIGNAL(signalUndoAvailable(bool)),this
+ ,TQT_SLOT(enableUndo(bool)));
+ connect(catalog,TQT_SIGNAL(signalRedoAvailable(bool)),this
+ ,TQT_SLOT(enableRedo(bool)));
+ connect(catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)),this
+ ,TQT_SLOT(setNumberOfFuzzies(uint)));
+ connect(catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)),this
+ ,TQT_SLOT(setNumberOfUntranslated(uint)));
+ connect(catalog,TQT_SIGNAL(signalTotalNumberChanged(uint)),this
+ ,TQT_SLOT(setNumberOfTotal(uint)));
+ connect(catalog,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int)));
+ connect(catalog,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar()));
+ connect(catalog,TQT_SIGNAL(signalResetProgressBar(TQString,int))
+ ,this,TQT_SLOT(prepareProgressBar(TQString,int)));
+ connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(enableDefaults(bool)));
+ connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),m_view,TQT_SLOT(newFileOpened(bool)));
+ connect(catalog,TQT_SIGNAL(signalModified(bool)),this,TQT_SLOT(showModified(bool)));
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(m_view, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
- connect(m_view,SIGNAL(signalFirstDisplayed(bool, bool)),this
- ,SLOT(firstEntryDisplayed(bool, bool)));
- connect(m_view,SIGNAL(signalLastDisplayed(bool, bool)),this
- ,SLOT(lastEntryDisplayed(bool, bool)));
- connect(m_view,SIGNAL(signalFuzzyDisplayed(bool)),this
- ,SLOT(fuzzyDisplayed(bool)));
- connect(m_view,SIGNAL(signalUntranslatedDisplayed(bool)),this
- ,SLOT(untranslatedDisplayed(bool)));
- connect(m_view,SIGNAL(signalFaultyDisplayed(bool)),this
- ,SLOT(faultyDisplayed(bool)));
- connect(m_view,SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this
- ,SLOT(displayedEntryChanged(const KBabel::DocPosition&)));
- connect(m_view,SIGNAL(signalFuzzyAfterwards(bool)),this
- ,SLOT(hasFuzzyAfterwards(bool)));
- connect(m_view,SIGNAL(signalFuzzyInFront(bool)),this
- ,SLOT(hasFuzzyInFront(bool)));
- connect(m_view,SIGNAL(signalUntranslatedAfterwards(bool)),this
- ,SLOT(hasUntranslatedAfterwards(bool)));
- connect(m_view,SIGNAL(signalUntranslatedInFront(bool)),this
- ,SLOT(hasUntranslatedInFront(bool)));
- connect(m_view,SIGNAL(signalErrorAfterwards(bool)),this
- ,SLOT(hasErrorAfterwards(bool)));
- connect(m_view,SIGNAL(signalErrorInFront(bool)),this
- ,SLOT(hasErrorInFront(bool)));
- connect(m_view,SIGNAL(signalBackHistory(bool)),this
- ,SLOT(enableBackHistory(bool)));
- connect(m_view,SIGNAL(signalForwardHistory(bool)),this
- ,SLOT(enableForwardHistory(bool)));
-
-
- connect(m_view,SIGNAL(ledColorChanged(const QColor&)),this
- ,SLOT(setLedColor(const QColor&)));
-
-
- connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(enableStop(bool)));
-
- connect(m_view,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int)));
- connect(m_view,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar()));
- connect(m_view,SIGNAL(signalResetProgressBar(QString,int))
- ,this,SLOT(prepareProgressBar(QString,int)));
-
- connect(m_view,SIGNAL(signalDictionariesChanged())
- , this, SLOT(buildDictMenus()));
- connect(m_view,SIGNAL(signalCursorPosChanged(int,int)), this
- , SLOT(updateCursorPosition(int,int)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
+ connect(m_view,TQT_SIGNAL(signalFirstDisplayed(bool, bool)),this
+ ,TQT_SLOT(firstEntryDisplayed(bool, bool)));
+ connect(m_view,TQT_SIGNAL(signalLastDisplayed(bool, bool)),this
+ ,TQT_SLOT(lastEntryDisplayed(bool, bool)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyDisplayed(bool)),this
+ ,TQT_SLOT(fuzzyDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedDisplayed(bool)),this
+ ,TQT_SLOT(untranslatedDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalFaultyDisplayed(bool)),this
+ ,TQT_SLOT(faultyDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this
+ ,TQT_SLOT(displayedEntryChanged(const KBabel::DocPosition&)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyAfterwards(bool)),this
+ ,TQT_SLOT(hasFuzzyAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyInFront(bool)),this
+ ,TQT_SLOT(hasFuzzyInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedAfterwards(bool)),this
+ ,TQT_SLOT(hasUntranslatedAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedInFront(bool)),this
+ ,TQT_SLOT(hasUntranslatedInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalErrorAfterwards(bool)),this
+ ,TQT_SLOT(hasErrorAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalErrorInFront(bool)),this
+ ,TQT_SLOT(hasErrorInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalBackHistory(bool)),this
+ ,TQT_SLOT(enableBackHistory(bool)));
+ connect(m_view,TQT_SIGNAL(signalForwardHistory(bool)),this
+ ,TQT_SLOT(enableForwardHistory(bool)));
+
+
+ connect(m_view,TQT_SIGNAL(ledColorChanged(const TQColor&)),this
+ ,TQT_SLOT(setLedColor(const TQColor&)));
+
+
+ connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(enableStop(bool)));
+
+ connect(m_view,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int)));
+ connect(m_view,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar()));
+ connect(m_view,TQT_SIGNAL(signalResetProgressBar(TQString,int))
+ ,this,TQT_SLOT(prepareProgressBar(TQString,int)));
+
+ connect(m_view,TQT_SIGNAL(signalDictionariesChanged())
+ , this, TQT_SLOT(buildDictMenus()));
+ connect(m_view,TQT_SIGNAL(signalCursorPosChanged(int,int)), this
+ , TQT_SLOT(updateCursorPosition(int,int)));
if(!catalog->currentURL().isEmpty())
{
@@ -292,18 +292,18 @@ void KBabelMW::init(KBCatalog* catalog)
mailer = new KBabelMailer( this, _project );
- bmHandler = new KBabelBookmarkHandler((QPopupMenu*)factory()->container("bookmark", this));
+ bmHandler = new KBabelBookmarkHandler((TQPopupMenu*)factory()->container("bookmark", this));
// the earlier created KAction for "clear_bookmarks" is now reconnected
KAction* action = actionCollection()->action("clear_bookmarks");
if (action) {
- action->disconnect(SIGNAL(activated()));
- connect(action, SIGNAL(activated()),
- bmHandler, SLOT(slotClearBookmarks()));
+ action->disconnect(TQT_SIGNAL(activated()));
+ connect(action, TQT_SIGNAL(activated()),
+ bmHandler, TQT_SLOT(slotClearBookmarks()));
}
- connect(bmHandler, SIGNAL(signalBookmarkSelected(int)),
- this, SLOT(slotOpenBookmark(int)));
- connect(m_view, SIGNAL(signalNewFileOpened(KURL)),
- bmHandler, SLOT(slotClearBookmarks()));
+ connect(bmHandler, TQT_SIGNAL(signalBookmarkSelected(int)),
+ this, TQT_SLOT(slotOpenBookmark(int)));
+ connect(m_view, TQT_SIGNAL(signalNewFileOpened(KURL)),
+ bmHandler, TQT_SLOT(slotClearBookmarks()));
_config = KSharedConfig::openConfig( "kbabelrc" );
restoreSettings();
@@ -312,17 +312,17 @@ void KBabelMW::init(KBCatalog* catalog)
if(!_config->hasKey("Version"))
{
- QString encodingStr;
+ TQString encodingStr;
switch(catalog->saveSettings().encoding)
{
case KBabel::ProjectSettingsBase::UTF8:
- encodingStr=QTextCodec::codecForName("UTF-8")->name();
+ encodingStr=TQTextCodec::codecForName("UTF-8")->name();
break;
case KBabel::ProjectSettingsBase::UTF16:
- encodingStr=QTextCodec::codecForName("UTF-16")->name();
+ encodingStr=TQTextCodec::codecForName("UTF-16")->name();
break;
default:
- encodingStr=QTextCodec::codecForLocale()->name();
+ encodingStr=TQTextCodec::codecForLocale()->name();
}
if( KBabelSplash::instance ) KBabelSplash::instance->close(); //close splash screen window, if there is one
@@ -335,7 +335,7 @@ void KBabelMW::init(KBCatalog* catalog)
"set to %1. You may want to change this setting "
"according to the settings of your language team.").arg(encodingStr));
- QTimer::singleShot(1,this,SLOT(projectConfigure()));
+ TQTimer::singleShot(1,this,TQT_SLOT(projectConfigure()));
}
_config->writeEntry("Version",VERSION);
@@ -404,296 +404,296 @@ void KBabelMW::setupActions()
KAction* action;
// the file menu
- action = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
- a_recent = KStdAction::openRecent(this, SLOT(openRecent(const KURL&)), actionCollection());
+ a_recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), actionCollection());
a_recent->setMaxItems(MAX_RECENT);
- action = KStdAction::revert(m_view,SLOT(revertToSaved()),actionCollection());
- action=KStdAction::save(this, SLOT(fileSave()), actionCollection());
- action = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- action = new KAction(i18n("Save Sp&ecial..."), 0, this, SLOT(fileSaveSpecial()),
+ action = KStdAction::revert(m_view,TQT_SLOT(revertToSaved()),actionCollection());
+ action=KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ action = new KAction(i18n("Save Sp&ecial..."), 0, this, TQT_SLOT(fileSaveSpecial()),
actionCollection(), "save_special" );
- action = new KAction(i18n("Set &Package..."), 0, m_view, SLOT(setFilePackage()),
+ action = new KAction(i18n("Set &Package..."), 0, m_view, TQT_SLOT(setFilePackage()),
actionCollection(), "set_package" );
- action = KStdAction::mail(this, SLOT(fileMail()), actionCollection());
+ action = KStdAction::mail(this, TQT_SLOT(fileMail()), actionCollection());
- action = new KAction(i18n("&New View"), 0, this, SLOT(fileNewView()),
+ action = new KAction(i18n("&New View"), 0, this, TQT_SLOT(fileNewView()),
actionCollection(), "file_new_view");
- action = new KAction(i18n("New &Window"), 0, this, SLOT(fileNewWindow()),
+ action = new KAction(i18n("New &Window"), 0, this, TQT_SLOT(fileNewWindow()),
actionCollection(), "file_new_window");
action->setShortcut( KStdAccel::openNew() );
- action = KStdAction::quit(this, SLOT(quit()), actionCollection());
+ action = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection());
// the edit menu
- action = KStdAction::undo(m_view, SLOT(undo()), actionCollection());
- action = KStdAction::redo(m_view, SLOT(redo()), actionCollection());
- action = KStdAction::cut(m_view, SIGNAL(signalCut()), actionCollection());
- action = KStdAction::copy(m_view, SIGNAL(signalCopy()), actionCollection());
- action = KStdAction::paste(m_view, SIGNAL(signalPaste()), actionCollection());
- action = KStdAction::selectAll(m_view, SIGNAL(signalSelectAll()), actionCollection());
- action = KStdAction::find(m_view, SLOT(find()), actionCollection());
- action = KStdAction::findNext(m_view, SLOT(findNext()), actionCollection());
- action = KStdAction::findPrev(m_view, SLOT(findPrev()), actionCollection());
- action = KStdAction::replace(m_view, SLOT(replace()), actionCollection());
-
- action = KStdAction::clear( m_view, SLOT(clear()), actionCollection(), "clear" );
+ action = KStdAction::undo(m_view, TQT_SLOT(undo()), actionCollection());
+ action = KStdAction::redo(m_view, TQT_SLOT(redo()), actionCollection());
+ action = KStdAction::cut(m_view, TQT_SIGNAL(signalCut()), actionCollection());
+ action = KStdAction::copy(m_view, TQT_SIGNAL(signalCopy()), actionCollection());
+ action = KStdAction::paste(m_view, TQT_SIGNAL(signalPaste()), actionCollection());
+ action = KStdAction::selectAll(m_view, TQT_SIGNAL(signalSelectAll()), actionCollection());
+ action = KStdAction::find(m_view, TQT_SLOT(find()), actionCollection());
+ action = KStdAction::findNext(m_view, TQT_SLOT(findNext()), actionCollection());
+ action = KStdAction::findPrev(m_view, TQT_SLOT(findPrev()), actionCollection());
+ action = KStdAction::replace(m_view, TQT_SLOT(replace()), actionCollection());
+
+ action = KStdAction::clear( m_view, TQT_SLOT(clear()), actionCollection(), "clear" );
action = new KAction(i18n("Cop&y Msgid to Msgstr"), "msgid2msgstr", CTRL+Key_Space, m_view
- ,SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr");
+ ,TQT_SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr");
action = new KAction(i18n("Copy Searc&h Result to Msgstr"), "search2msgstr",
- CTRL+ALT+Key_Space, m_view, SLOT(search2msgstr()),
+ CTRL+ALT+Key_Space, m_view, TQT_SLOT(search2msgstr()),
actionCollection(), "search2msgstr");
action = new KAction(i18n("Copy Msgstr to Other &Plurals"), Key_F11, m_view
- ,SLOT(plural2msgstr()), actionCollection(), "plural2msgstr");
+ ,TQT_SLOT(plural2msgstr()), actionCollection(), "plural2msgstr");
action = new KAction(i18n("Copy Selected Character to Msgstr"), Key_F10, m_charselectorview
- ,SLOT(emitChar()), actionCollection(), "char2msgstr");
+ ,TQT_SLOT(emitChar()), actionCollection(), "char2msgstr");
a_unsetFuzzy = new KAction(i18n("To&ggle Fuzzy Status"), "togglefuzzy", CTRL+Key_U, m_view
- , SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy");
- action = new KAction(i18n("&Edit Header..."), 0, m_view, SLOT(editHeader()),
+ , TQT_SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy");
+ action = new KAction(i18n("&Edit Header..."), 0, m_view, TQT_SLOT(editHeader()),
actionCollection(), "edit_edit_header");
action = new KAction(i18n("&Insert Next Tag"), "insert_tag", CTRL+ALT+Key_N
- , m_view, SLOT(insertNextTag())
+ , m_view, TQT_SLOT(insertNextTag())
, actionCollection(),"insert_next_tag");
- connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
action = new KAction(i18n("Insert Next Tag From Msgid P&osition"), "insert_tag", CTRL+Key_M
- , m_view, SLOT(insertNextTagMsgid())
+ , m_view, TQT_SLOT(insertNextTagMsgid())
, actionCollection(),"insert_next_tag_msgid");
- connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
KActionMenu *actionMenu= new KActionMenu(i18n("Inser&t Tag"), "insert_tag"
, actionCollection(),"insert_tag");
m_view->setTagsMenu(actionMenu->popupMenu());
- connect(m_view,SIGNAL(signalTagsAvailable(bool)),actionMenu
- ,SLOT(setEnabled(bool)));
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextTag()));
+ connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),actionMenu
+ ,TQT_SLOT(setEnabled(bool)));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextTag()));
action = new KAction(i18n("Show Tags Menu"),CTRL+Key_Less
- , m_view, SLOT(showTagsMenu()), actionCollection(),"show_tags_menu");
+ , m_view, TQT_SLOT(showTagsMenu()), actionCollection(),"show_tags_menu");
action->setEnabled(false);
- connect(m_view,SIGNAL(signalTagsAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
action = new KAction(i18n("Move to Next Tag"), 0, CTRL+ALT+Key_M
- , m_view, SLOT(skipToNextTag())
+ , m_view, TQT_SLOT(skipToNextTag())
, actionCollection(),"move_to_next_tag");
action = new KAction(i18n("Move to Previous Tag"), 0, CTRL+ALT+Key_B
- , m_view, SLOT(skipToPreviousTag())
+ , m_view, TQT_SLOT(skipToPreviousTag())
, actionCollection(),"move_to_prev_tag");
action = new KAction(i18n("Insert Next Argument"), "insert_arg", CTRL+ALT+Key_G
- , m_view, SLOT(insertNextArg())
+ , m_view, TQT_SLOT(insertNextArg())
, actionCollection(),"insert_next_arg");
- connect(m_view,SIGNAL(signalNextArgAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextArgAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
actionMenu= new KActionMenu(i18n("Inser&t Argument"), "insert_arg"
, actionCollection(),"insert_arg");
m_view->setArgsMenu(actionMenu->popupMenu());
- connect(m_view,SIGNAL(signalArgsAvailable(bool)),actionMenu
- ,SLOT(setEnabled(bool)));
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextArg()));
+ connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),actionMenu
+ ,TQT_SLOT(setEnabled(bool)));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextArg()));
action = new KAction(i18n("Show Arguments Menu"),CTRL+Key_Percent
- , m_view, SLOT(showArgsMenu()), actionCollection(),"show_args_menu");
+ , m_view, TQT_SLOT(showArgsMenu()), actionCollection(),"show_args_menu");
action->setEnabled(false);
- connect(m_view,SIGNAL(signalArgsAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
// next, the go-menu
action = new KAction(i18n("&Previous"), "previous",
- KStdAccel::shortcut(KStdAccel::Prior), m_view , SLOT(gotoPrev()),
+ KStdAccel::shortcut(KStdAccel::Prior), m_view , TQT_SLOT(gotoPrev()),
actionCollection(),"go_prev_entry");
action = new KAction(i18n("&Next"), "next",
- KStdAccel::shortcut(KStdAccel::Next), m_view , SLOT(gotoNext()),
+ KStdAccel::shortcut(KStdAccel::Next), m_view , TQT_SLOT(gotoNext()),
actionCollection(),"go_next_entry");
- action = KStdAction::goTo(m_view, SLOT(gotoEntry()), actionCollection());
+ action = KStdAction::goTo(m_view, TQT_SLOT(gotoEntry()), actionCollection());
action->setShortcut( KStdAccel::gotoLine());
- action = KStdAction::firstPage(m_view, SLOT(gotoFirst()),actionCollection());
+ action = KStdAction::firstPage(m_view, TQT_SLOT(gotoFirst()),actionCollection());
action->setText(i18n("&First Entry"));
action->setShortcut(CTRL+ALT+Key_Home);
- action = KStdAction::lastPage(m_view, SLOT(gotoLast()),actionCollection());
+ action = KStdAction::lastPage(m_view, TQT_SLOT(gotoLast()),actionCollection());
action->setText(i18n("&Last Entry"));
action->setShortcut(CTRL+ALT+Key_End);
a_prevFoU = new KAction(i18n("P&revious Fuzzy or Untranslated"),"prevfuzzyuntrans",
CTRL+SHIFT+Key_Prior, m_view,
- SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr");
+ TQT_SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr");
a_nextFoU = new KAction(i18n("N&ext Fuzzy or Untranslated"),"nextfuzzyuntrans",
CTRL+SHIFT+Key_Next, m_view,
- SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr");
+ TQT_SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr");
a_prevFuzzy = new KAction(i18n("Pre&vious Fuzzy"),"prevfuzzy",
CTRL+Key_Prior, m_view,
- SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy");
+ TQT_SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy");
a_nextFuzzy = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy",
CTRL+Key_Next, m_view,
- SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
+ TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
a_prevUntrans = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated",
ALT+Key_Prior, m_view,
- SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans");
+ TQT_SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans");
a_nextUntrans = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated",
ALT+Key_Next, m_view,
- SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
+ TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
action = new KAction(i18n("Previo&us Error"), "preverror",
SHIFT+Key_Prior, m_view,
- SLOT(gotoPrevError()),actionCollection(), "go_prev_error");
+ TQT_SLOT(gotoPrevError()),actionCollection(), "go_prev_error");
action = new KAction(i18n("Next Err&or"), "nexterror",
SHIFT+Key_Next, m_view,
- SLOT(gotoNextError()),actionCollection(), "go_next_error");
+ TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error");
action = new KAction(i18n("&Back in History"), "back", ALT+Key_Left, m_view,
- SLOT(backHistory()),actionCollection(), "go_back_history");
+ TQT_SLOT(backHistory()),actionCollection(), "go_back_history");
action = new KAction(i18n("For&ward in History"), "forward", ALT+Key_Right, m_view,
- SLOT(forwardHistory()),actionCollection(), "go_forward_history");
+ TQT_SLOT(forwardHistory()),actionCollection(), "go_forward_history");
// the search menu
actionMenu=new KActionMenu(i18n("&Find Text"),
"transsearch",actionCollection(),"dict_search_all");
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSearch()));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSearch()));
dictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(dictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(startSearch(const QString)));
+ connect(dictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(startSearch(const TQString)));
actionMenu=new KActionMenu(i18n("F&ind Selected Text"),
"transsearch",actionCollection(),"dict_search_selected");
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSelectionSearch()));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSelectionSearch()));
selectionDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(selectionDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(startSelectionSearch(const QString)));
+ connect(selectionDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(startSelectionSearch(const TQString)));
actionMenu=new KActionMenu(i18n("&Edit Dictionary"),
"transsearch",actionCollection(),"dict_edit");
editDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(editDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(editDictionary(const QString)));
+ connect(editDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(editDictionary(const TQString)));
actionMenu=new KActionMenu(i18n("Con&figure Dictionary"),
"transsearch",actionCollection(),"dict_configure");
configDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(configDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(configureDictionary(const QString)));
+ connect(configDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(configureDictionary(const TQString)));
actionMenu=new KActionMenu(i18n("About Dictionary"), "transsearch",
actionCollection(), "dict_about");
aboutDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(aboutDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(aboutDictionary(const QString)));
+ connect(aboutDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(aboutDictionary(const TQString)));
buildDictMenus();
// the project menu
action = new KAction(i18n("&New..."), "filenew"
- , this, SLOT(projectNew()),actionCollection()
+ , this, TQT_SLOT(projectNew()),actionCollection()
,"project_new");
action = new KAction(i18n("&Open..."), "fileopen"
- , this, SLOT(projectOpen()),actionCollection()
+ , this, TQT_SLOT(projectOpen()),actionCollection()
,"project_open");
action = new KAction(i18n("C&lose"), "fileclose"
- , this, SLOT(projectClose()),actionCollection()
+ , this, TQT_SLOT(projectClose()),actionCollection()
,"project_close");
action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() );
action = new KAction(i18n("&Configure..."), "configure"
- , this, SLOT(projectConfigure()),actionCollection()
+ , this, TQT_SLOT(projectConfigure()),actionCollection()
,"project_settings");
- a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects");
+ a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, TQT_SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects");
// the tools menu
action = new KAction(i18n("&Spell Check..."), "spellcheck", CTRL+Key_I
- , m_view, SLOT(spellcheckCommon()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckCommon()),actionCollection()
,"spellcheck_common");
action = new KAction(i18n("&Check All..."), "spellcheck_all", 0
- , m_view, SLOT(spellcheckAll()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckAll()),actionCollection()
,"spellcheck_all");
action = new KAction(i18n("C&heck From Cursor Position..."), "spellcheck_from_cursor", 0
- , m_view, SLOT(spellcheckFromCursor()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckFromCursor()),actionCollection()
,"spellcheck_from_cursor");
action = new KAction(i18n("Ch&eck Current..."), "spellcheck_actual", 0
- , m_view, SLOT(spellcheckCurrent()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckCurrent()),actionCollection()
,"spellcheck_current");
action = new KAction(i18n("Check Fro&m Current to End of File..."), 0
- , m_view, SLOT(spellcheckFromCurrent()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckFromCurrent()),actionCollection()
,"spellcheck_from_current");
action = new KAction(i18n("Chec&k Selected Text..."), "spellcheck_selected", 0
- , m_view, SLOT(spellcheckMarked()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckMarked()),actionCollection()
,"spellcheck_marked");
KToggleAction *toggleAction;
toggleAction = new KToggleAction(i18n("&Diffmode"), "autodiff", 0
,actionCollection(), "diff_toggleDiff");
- connect(toggleAction,SIGNAL(toggled(bool)), m_view, SLOT(toggleAutoDiff(bool)));
- connect(m_view,SIGNAL(signalDiffEnabled(bool)), toggleAction
- , SLOT(setChecked(bool)));
+ connect(toggleAction,TQT_SIGNAL(toggled(bool)), m_view, TQT_SLOT(toggleAutoDiff(bool)));
+ connect(m_view,TQT_SIGNAL(signalDiffEnabled(bool)), toggleAction
+ , TQT_SLOT(setChecked(bool)));
toggleAction->setChecked(m_view->autoDiffEnabled());
action = new KAction(i18n("&Show Diff"), "diff", Key_F5
- , m_view, SLOT(diff()),actionCollection()
+ , m_view, TQT_SLOT(diff()),actionCollection()
,"diff_diff");
action = new KAction(i18n("S&how Original Text"), "contents", Key_F6
- , m_view, SLOT(diffShowOrig()),actionCollection()
+ , m_view, TQT_SLOT(diffShowOrig()),actionCollection()
,"diff_showOrig");
action = new KAction(i18n("&Open File for Diff"), "fileopen" ,0
- , m_view, SLOT(openDiffFile()),actionCollection()
+ , m_view, TQT_SLOT(openDiffFile()),actionCollection()
,"diff_openFile");
action = new KAction(i18n("&Rough Translation..."), 0
- , m_view, SLOT(roughTranslation()),actionCollection()
+ , m_view, TQT_SLOT(roughTranslation()),actionCollection()
,"rough_translation");
action = new KAction(i18n("&Catalog Manager..."),"catalogmanager", 0 , this,
- SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager");
+ TQT_SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager");
- new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode");
+ new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,TQT_SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode");
- new KAction( i18n("&Word Count"), 0, m_view, SLOT(wordCount()), actionCollection(), "word_count");
+ new KAction( i18n("&Word Count"), 0, m_view, TQT_SLOT(wordCount()), actionCollection(), "word_count");
// next, the settings menu
createStandardStatusBarAction();
- KStdAction::configureToolbars(this,SLOT(optionsEditToolbars()),actionCollection());
+ KStdAction::configureToolbars(this,TQT_SLOT(optionsEditToolbars()),actionCollection());
- KStdAction::keyBindings(guiFactory(),SLOT(configureShortcuts()),actionCollection());
- KStdAction::preferences(this,SLOT(optionsPreferences()),actionCollection());
+ KStdAction::keyBindings(guiFactory(),TQT_SLOT(configureShortcuts()),actionCollection());
+ KStdAction::preferences(this,TQT_SLOT(optionsPreferences()),actionCollection());
setStandardToolBarMenuEnabled ( true );
action = new KAction(i18n("&Stop Searching"), "stop",Key_Escape, m_view,
- SLOT(stopSearch()),actionCollection(), "stop_search");
+ TQT_SLOT(stopSearch()),actionCollection(), "stop_search");
action->setEnabled(false);
new KAction(i18n("&Gettext Info"), 0, this,
- SLOT(gettextHelp()), actionCollection(), "help_gettext");
+ TQT_SLOT(gettextHelp()), actionCollection(), "help_gettext");
// the bookmarks menu
- action = KStdAction::addBookmark(this, SLOT(slotAddBookmark()),
+ action = KStdAction::addBookmark(this, TQT_SLOT(slotAddBookmark()),
actionCollection(), "add_bookmark");
action->setEnabled(false);
// this action is now connected to dummySlot(), and later reconnected
// to bmHandler after that object actually is created
- new KAction(i18n("Clear Bookmarks"), 0, this, SLOT(dummySlot()),
+ new KAction(i18n("Clear Bookmarks"), 0, this, TQT_SLOT(dummySlot()),
actionCollection(), "clear_bookmarks");
setupDynamicActions();
createGUI(0);
- QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("settings",this));
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("settings",this));
popup->insertItem( i18n("&Views"), dockHideShowMenu(), -1, 0 );
}
@@ -707,22 +707,22 @@ void KBabelMW::setupStatusBar()
if(KBabelSettings::ledInStatusbar())
{
- QColor ledColor=KBabelSettings::ledColor();
- QHBox* statusBox = new QHBox(statusBar(),"statusBox");
+ TQColor ledColor=KBabelSettings::ledColor();
+ TQHBox* statusBox = new TQHBox(statusBar(),"statusBox");
statusBox->setSpacing(2);
- new QLabel(" "+i18n("Status: "),statusBox);
+ new TQLabel(" "+i18n("Status: "),statusBox);
_fuzzyLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_fuzzyLed->setFixedSize(15,12);
- new QLabel(i18n("fuzzy")+" ",statusBox);
+ new TQLabel(i18n("fuzzy")+" ",statusBox);
_untransLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_untransLed->setFixedSize(15,12);
- new QLabel(i18n("untranslated")+" ",statusBox);
+ new TQLabel(i18n("untranslated")+" ",statusBox);
_errorLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_errorLed->setFixedSize(15,12);
- new QLabel(i18n("faulty")+" ",statusBox);
+ new TQLabel(i18n("faulty")+" ",statusBox);
statusBox->setFixedWidth(statusBox->sizeHint().width());
statusBar()->addWidget(statusBox);
@@ -735,7 +735,7 @@ void KBabelMW::setupStatusBar()
statusBar()->insertItem(i18n("Line: %1 Col: %2").arg(1).arg(1)
,ID_STATUS_CURSOR);
- QHBox* progressBox = new QHBox(statusBar(),"progressBox");
+ TQHBox* progressBox = new TQHBox(statusBar(),"progressBox");
progressBox->setSpacing(2);
_progressLabel = new KSqueezedTextLabel( "", progressBox );
_progressBar=new MyKProgress(progressBox,"progressbar");
@@ -745,7 +745,7 @@ void KBabelMW::setupStatusBar()
statusBar()->addWidget(progressBox,1);
statusBar()->setMinimumHeight(progressBox->sizeHint().height());
- QWhatsThis::add(statusBar(),
+ TQWhatsThis::add(statusBar(),
i18n("<qt><p><b>Statusbar</b></p>\n\
<p>The statusbar displays some information about the opened file,\n\
like the total number of entries and the number of fuzzy and untranslated\n\
@@ -756,23 +756,23 @@ messages. Also the index and the status of the currently displayed entry is show
void KBabelMW::setupDynamicActions()
{
// dynamic validation tools
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QPtrList<KAction> actions = ToolAction::dataToolActionList(
- tools, m_view, SLOT(validateUsingTool( const KDataToolInfo &, const QString & )),
+ TQPtrList<KAction> actions = ToolAction::dataToolActionList(
+ tools, m_view, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString & )),
"validate", false, actionCollection() );
KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(), "dynamic_validation_tools");
KAction* ac = new KAction(i18n("Perform &All Checks"), CTRL+Key_E , m_view,
- SLOT(checkAll()),actionCollection(), "check_all");
+ TQT_SLOT(checkAll()),actionCollection(), "check_all");
ac->setEnabled(false);
m_menu->insert(ac);
m_menu->insert( new KActionSeparator() );
ac = new KAction(i18n("C&heck Syntax"), CTRL+Key_T , m_view,
- SLOT(checkSyntax()),actionCollection(), "check_syntax");
+ TQT_SLOT(checkSyntax()),actionCollection(), "check_syntax");
ac->setEnabled(false);
m_menu->insert(ac);
@@ -784,13 +784,13 @@ void KBabelMW::setupDynamicActions()
// dynamic modify tools
// query available tools
- QValueList<KDataToolInfo> allTools = KDataToolInfo::query
+ TQValueList<KDataToolInfo> allTools = KDataToolInfo::query
("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
// skip read-only tools for single items
- QValueList<KDataToolInfo> modifyTools;
+ TQValueList<KDataToolInfo> modifyTools;
- QValueList<KDataToolInfo>::ConstIterator entry = allTools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = allTools.begin();
for( ; entry != allTools.end(); ++entry )
{
if( !(*entry).isReadOnly() )
@@ -801,7 +801,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// skip validation actions
@@ -833,7 +833,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// skip validation actions
@@ -844,7 +844,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// insert tools
@@ -923,7 +923,7 @@ bool KBabelMW::queryClose()
{
if(m_view->isSearching())
{
- connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(quit()));
+ connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(quit()));
m_view->stopSearch();
return false;
}
@@ -932,7 +932,7 @@ bool KBabelMW::queryClose()
{
// stop the activity and try again
m_view->catalog()->stop();
- QTimer::singleShot(0, this, SLOT( close() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( close() ));
return false;
}
@@ -973,13 +973,13 @@ void KBabelMW::quit()
}
-void KBabelMW::dragEnterEvent(QDragEnterEvent *event)
+void KBabelMW::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KBabelMW::dropEvent(QDropEvent *event)
+void KBabelMW::dropEvent(TQDropEvent *event)
{
KURL::List uri;
// see if we can decode a URI.. if not, just ignore it
@@ -989,14 +989,14 @@ void KBabelMW::dropEvent(QDropEvent *event)
}
}
-void KBabelMW::wheelEvent(QWheelEvent *e)
+void KBabelMW::wheelEvent(TQWheelEvent *e)
{
m_view->wheelEvent(e);
}
void KBabelMW::openRecent(const KURL& url)
{
- KBabelView *view = KBabelView::viewForURL(url,QString::null);
+ KBabelView *view = KBabelView::viewForURL(url,TQString::null);
if(view)
{
KWin::activateWindow(view->topLevelWidget()->winId());
@@ -1008,10 +1008,10 @@ void KBabelMW::openRecent(const KURL& url)
void KBabelMW::open(const KURL& url)
{
- open(url,QString::null,false);
+ open(url,TQString::null,false);
}
-void KBabelMW::open(const KURL& url, const QString package, bool newWindow)
+void KBabelMW::open(const KURL& url, const TQString package, bool newWindow)
{
kdDebug(KBABEL) << "opening file with project:" << _project->filename() << endl;
kdDebug(KBABEL) << "URL:" << url.prettyURL() << endl;
@@ -1036,7 +1036,7 @@ void KBabelMW::open(const KURL& url, const QString package, bool newWindow)
}
}
-void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow)
+void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow)
{
if(newWindow)
{
@@ -1067,7 +1067,7 @@ void KBabelMW::addToRecentFiles(KURL url)
void KBabelMW::fileSave()
{
// do it asynchronously due to kdelibs bug
- QTimer::singleShot( 0, this, SLOT( fileSave_internal() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( fileSave_internal() ));
}
void KBabelMW::fileSave_internal()
@@ -1091,10 +1091,10 @@ void KBabelMW::fileSave_internal()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
// reenable save action
@@ -1108,10 +1108,10 @@ void KBabelMW::fileSaveAs()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
}
@@ -1122,10 +1122,10 @@ void KBabelMW::fileSaveSpecial()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
}
@@ -1181,7 +1181,7 @@ void KBabelMW::optionsEditToolbars()
{
saveMainWindowSettings( KGlobal::config(), "View" );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -1198,8 +1198,8 @@ void KBabelMW::optionsPreferences()
_prefDialog = new KBabelPreferences(m_view->dictionaries());
prefDialogs.append(_prefDialog);
- connect(_prefDialog,SIGNAL(settingsChanged())
- ,m_view,SLOT(updateSettings()));
+ connect(_prefDialog,TQT_SIGNAL(settingsChanged())
+ ,m_view,TQT_SLOT(updateSettings()));
}
int prefHeight=_prefDialog->height();
@@ -1210,7 +1210,7 @@ void KBabelMW::optionsPreferences()
int x=width/2-prefWidth/2;
int y=height/2-prefHeight/2;
- _prefDialog->move(mapToGlobal(QPoint(x,y)));
+ _prefDialog->move(mapToGlobal(TQPoint(x,y)));
if(!_prefDialog->isVisible())
{
@@ -1221,7 +1221,7 @@ void KBabelMW::optionsPreferences()
KWin::activateWindow(_prefDialog->winId());
}
-void KBabelMW::setLedColor(const QColor& color)
+void KBabelMW::setLedColor(const TQColor& color)
{
if(_fuzzyLed)
{
@@ -1239,8 +1239,8 @@ void KBabelMW::setLedColor(const QColor& color)
void KBabelMW::openCatalogManager()
{
- QCString service;
- QString result;
+ TQCString service;
+ TQString result;
DCOPClient * client = kapp->dcopClient();
@@ -1248,7 +1248,7 @@ void KBabelMW::openCatalogManager()
QCStringList apps = client->registeredApplications();
for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it )
{
- QString clientID = *it;
+ TQString clientID = *it;
if( clientID.startsWith("catalogmanager") )
{
service = *it;
@@ -1259,8 +1259,8 @@ void KBabelMW::openCatalogManager()
// if there is no running catalog manager, start one
if( service.isEmpty() )
{
- QString prog = "catalogmanager";
- QString url = "";
+ TQString prog = "catalogmanager";
+ TQString url = "";
if( kapp->startServiceByDesktopName(prog,url, &result,&service))
{
KMessageBox::error(this, i18n("Unable to use KLauncher to start "
@@ -1271,8 +1271,8 @@ void KBabelMW::openCatalogManager()
}
// set preferred window
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (this->winId()) ;
if( !client->send( service, "CatalogManagerIFace", "setPreferredWindow( WId )", data )) kdDebug(KBABEL) << "Unable to set preferred window via DCOP" << endl;
}
@@ -1469,7 +1469,7 @@ void KBabelMW::enableForwardHistory(bool on)
}
-void KBabelMW::prepareProgressBar(QString msg,int max)
+void KBabelMW::prepareProgressBar(TQString msg,int max)
{
if(_statusbarTimer->isActive())
_statusbarTimer->stop();
@@ -1489,7 +1489,7 @@ void KBabelMW::clearProgressBar()
}
-void KBabelMW::changeStatusbar(const QString& text)
+void KBabelMW::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
_progressLabel->setText(" "+text);
@@ -1505,7 +1505,7 @@ void KBabelMW::clearStatusbarMsg()
_progressLabel->setText("");
}
-void KBabelMW::changeCaption(const QString& text)
+void KBabelMW::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text + ( _project->filename () != KBabel::ProjectManager::defaultProjectName() ?
@@ -1559,9 +1559,9 @@ void KBabelMW::enableStop(bool flag)
void KBabelMW::gettextHelp()
{
- QString error;
+ TQString error;
KApplication::startServiceByDesktopName("khelpcenter",
- QString("info:/gettext"), &error);
+ TQString("info:/gettext"), &error);
if(!error.isEmpty())
{
@@ -1572,7 +1572,7 @@ void KBabelMW::gettextHelp()
void KBabelMW::buildDictMenus()
{
- QPtrList<ModuleInfo> dictList = m_view->dictionaries();
+ TQPtrList<ModuleInfo> dictList = m_view->dictionaries();
dictList.setAutoDelete(true);
dictMenu->clear();
@@ -1584,10 +1584,10 @@ void KBabelMW::buildDictMenus()
ModuleInfo *info;
for(info = dictList.first(); info !=0; info = dictList.next())
{
- QString accel="Ctrl+Alt+%1";
+ TQString accel="Ctrl+Alt+%1";
dictMenu->add(info->name,info->id, accel);
- accel=QString("Ctrl+%1");
+ accel=TQString("Ctrl+%1");
selectionDictMenu->add(info->name,info->id, accel);
configDictMenu->add(info->name,info->id);
@@ -1607,14 +1607,14 @@ void KBabelMW::updateCursorPosition(int line, int col)
}
-KBabelMW *KBabelMW::winForURL(const KURL& url, QString project)
+KBabelMW *KBabelMW::winForURL(const KURL& url, TQString project)
{
KBabelMW *kb=0;
KBabelView *v = KBabelView::viewForURL(url,project);
if(v)
{
- QObject *p = v->parent();
+ TQObject *p = v->parent();
while(p && !p->inherits("KBabelMW"))
{
p = p->parent();
@@ -1627,14 +1627,14 @@ KBabelMW *KBabelMW::winForURL(const KURL& url, QString project)
return kb;
}
-KBabelMW *KBabelMW::emptyWin(QString project)
+KBabelMW *KBabelMW::emptyWin(TQString project)
{
KBabelMW *kb=0;
KBabelView *v = KBabelView::emptyView(project);
if(v)
{
- QObject *p = v->parent();
+ TQObject *p = v->parent();
while(p && !p->inherits("KBabelMW"))
{
p = p->parent();
@@ -1647,11 +1647,11 @@ KBabelMW *KBabelMW::emptyWin(QString project)
return kb;
}
-void KBabelMW::spellcheckMoreFiles(QStringList filelist)
+void KBabelMW::spellcheckMoreFiles(TQStringList filelist)
{
if( filelist.isEmpty() ) return;
_toSpellcheck = filelist;
- connect( m_view, SIGNAL( signalSpellcheckDone(int) ), this, SLOT( spellcheckDone(int)));
+ connect( m_view, TQT_SIGNAL( signalSpellcheckDone(int) ), this, TQT_SLOT( spellcheckDone(int)));
spellcheckDone( KS_IGNORE ); // use something else than KS_STOP
}
@@ -1659,22 +1659,22 @@ void KBabelMW::spellcheckDone( int result)
{
if( _toSpellcheck.isEmpty() || result == KS_STOP)
{
- disconnect( m_view, SIGNAL( signalSpellcheckDone(int)), this, SLOT(spellcheckDone( int)));
+ disconnect( m_view, TQT_SIGNAL( signalSpellcheckDone(int)), this, TQT_SLOT(spellcheckDone( int)));
KMessageBox::information( this, i18n("MessageBox text", "Spellchecking of multiple files is finished."),
i18n("MessageBox caption", "Spellcheck Done"));
}
else
{
- QString file = _toSpellcheck.first();
+ TQString file = _toSpellcheck.first();
_toSpellcheck.pop_front();
if( m_view->isModified() ) fileSave();
- open(KURL( file ), QString::null, false);
+ open(KURL( file ), TQString::null, false);
kdDebug(KBABEL) << "Starting another spellcheck" << endl;
- QTimer::singleShot( 1, m_view, SLOT(spellcheckAllMulti()));
+ TQTimer::singleShot( 1, m_view, TQT_SLOT(spellcheckAllMulti()));
}
}
-void KBabelMW::initBookmarks(QPtrList<KBabelBookmark> list)
+void KBabelMW::initBookmarks(TQPtrList<KBabelBookmark> list)
{
bmHandler->setBookmarks(list);
}
@@ -1705,12 +1705,12 @@ void KBabelMW::projectNew()
void KBabelMW::projectOpen()
{
- QString oldproject = m_view->project();
+ TQString oldproject = m_view->project();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
- oldproject = QString();
+ oldproject = TQString();
}
- const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this);
+ const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this);
if (file.isEmpty())
{
return;
@@ -1731,9 +1731,9 @@ void KBabelMW::projectOpenRecent(const KURL& url)
}
}
-void KBabelMW::projectOpen(const QString& file)
+void KBabelMW::projectOpen(const TQString& file)
{
- QString oldproject = m_view->project();
+ TQString oldproject = m_view->project();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
oldproject = "";
@@ -1761,13 +1761,13 @@ void KBabelMW::projectOpen(const QString& file)
void KBabelMW::projectClose()
{
- QString defaultProject = KBabel::ProjectManager::defaultProjectName();
+ TQString defaultProject = KBabel::ProjectManager::defaultProjectName();
m_view->useProject( KBabel::ProjectManager::open(defaultProject) );
_project = ProjectManager::open(defaultProject);
changeProjectActions(defaultProject);
}
-void KBabelMW::changeProjectActions(const QString& project)
+void KBabelMW::changeProjectActions(const TQString& project)
{
bool def = (project == KBabel::ProjectManager::defaultProjectName());
@@ -1792,8 +1792,8 @@ void KBabelMW::projectConfigure()
if(!_projectDialog)
{
_projectDialog = new ProjectDialog(_project);
- connect (_projectDialog, SIGNAL (settingsChanged())
- , m_view, SLOT (updateProjectSettings()));
+ connect (_projectDialog, TQT_SIGNAL (settingsChanged())
+ , m_view, TQT_SLOT (updateProjectSettings()));
}
int prefHeight=_projectDialog->height();
@@ -1804,7 +1804,7 @@ void KBabelMW::projectConfigure()
int x=width/2-prefWidth/2;
int y=height/2-prefHeight/2;
- _projectDialog->move(mapToGlobal(QPoint(x,y)));
+ _projectDialog->move(mapToGlobal(TQPoint(x,y)));
if(!_projectDialog->isVisible())
{
diff --git a/kbabel/kbabel/kbabel.h b/kbabel/kbabel/kbabel.h
index 4ff184c1..f6c5aa18 100644
--- a/kbabel/kbabel/kbabel.h
+++ b/kbabel/kbabel/kbabel.h
@@ -42,8 +42,8 @@
#include <kapplication.h>
#include <kdeversion.h>
#include <kdockwidget.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kmdimainfrm.h>
#include "kbabelview.h"
@@ -86,23 +86,23 @@ public:
/**
* Default Constructor
*/
- KBabelMW(QString projectFile = QString());
+ KBabelMW(TQString projectFile = TQString());
/** use this contructor, if you just want to create a new view of an existing catalog*/
- KBabelMW(KBCatalog* catalog, QString projectFile = QString());
+ KBabelMW(KBCatalog* catalog, TQString projectFile = TQString());
/**
* Default Destructor
*/
virtual ~KBabelMW();
- QString project() const { return _project->filename(); }
+ TQString project() const { return _project->filename(); }
- void open(const KURL& url, const QString package, bool newWindow);
- void openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow=false);
- void projectOpen(const QString& filename);
+ void open(const KURL& url, const TQString package, bool newWindow);
+ void openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow=false);
+ void projectOpen(const TQString& filename);
- void spellcheckMoreFiles( QStringList filelist);
+ void spellcheckMoreFiles( TQStringList filelist);
void setSettings(KBabel::SaveSettings,KBabel::IdentitySettings);
void updateSettings();
@@ -111,13 +111,13 @@ public:
* @return A pointer to a KBabel, that has opened file URL or 0 if no
* KBabel was found
*/
- static KBabelMW *winForURL(const KURL& url, QString projectFile = QString::null);
+ static KBabelMW *winForURL(const KURL& url, TQString projectFile = TQString::null);
/**
* @return A pointer to a KBabel, that has opened no file URL or 0 if no
* KBabel was found
*/
- static KBabelMW *emptyWin(QString projectFile = QString::null);
+ static KBabelMW *emptyWin(TQString projectFile = TQString::null);
public slots:
void toggleEditMode();
@@ -126,13 +126,13 @@ protected:
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
/**
* Overrriden virtual for wheel event handling to forward to KBabelView
*/
- virtual void wheelEvent(QWheelEvent *e);
+ virtual void wheelEvent(TQWheelEvent *e);
/**
* This function is called when it is time for the app to save its
@@ -212,15 +212,15 @@ private slots:
* activity. message is displayed left to the progressbar
* and max is the maximum number for the progressbar
*/
- void prepareProgressBar(QString message,int max);
+ void prepareProgressBar(TQString message,int max);
/**
* resets the progressBar and enables the window
*/
void clearProgressBar();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
void clearStatusbarMsg();
- void changeCaption(const QString& text);
+ void changeCaption(const TQString& text);
void showModified(bool);
/**
@@ -228,7 +228,7 @@ private slots:
*/
void enableDefaults(bool readOnly);
- void setLedColor(const QColor& color);
+ void setLedColor(const TQColor& color);
void buildDictMenus();
@@ -254,7 +254,7 @@ private:
void init(KBCatalog* catalog);
void setupActions();
void setupDynamicActions();
- void changeProjectActions(const QString& project);
+ void changeProjectActions(const TQString& project);
void setupStatusBar();
void saveSettings();
void restoreSettings();
@@ -263,7 +263,7 @@ private:
*
* @param list the list of bookmarks.
*/
- void initBookmarks(QPtrList<KBabelBookmark> list);
+ void initBookmarks(TQPtrList<KBabelBookmark> list);
private:
KBabelView *m_view;
@@ -273,22 +273,22 @@ private:
int _currentIndex;
KProgress* _progressBar;
- QLabel* _progressLabel;
+ TQLabel* _progressLabel;
KLed* _fuzzyLed;
KLed* _untransLed;
KLed* _errorLed;
- QTimer *_statusbarTimer;
+ TQTimer *_statusbarTimer;
KBabelPreferences* _prefDialog;
- QStringList _toSpellcheck;
+ TQStringList _toSpellcheck;
/**
* used for updating preferences, that are common in
* the whole application
*/
- static QPtrList<KBabelPreferences> prefDialogs;
+ static TQPtrList<KBabelPreferences> prefDialogs;
// frequently used actions
@@ -316,7 +316,7 @@ private:
KSharedConfig::Ptr _config;
KBabel::ProjectDialog* _projectDialog;
- QMap<QString,QString> _toolsShortcuts;
+ TQMap<TQString,TQString> _toolsShortcuts;
KBabel::KBabelMailer* mailer;
KBabelBookmarkHandler* bmHandler;
diff --git a/kbabel/kbabel/kbabeliface.h b/kbabel/kbabel/kbabeliface.h
index d03b927d..49d19f5c 100644
--- a/kbabel/kbabel/kbabeliface.h
+++ b/kbabel/kbabel/kbabeliface.h
@@ -36,7 +36,7 @@
#define KBABELIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KBabelIface : virtual public DCOPObject
{
@@ -44,38 +44,38 @@ class KBabelIface : virtual public DCOPObject
public:
k_dcop:
- virtual void openURL(QCString url, QCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";}
- virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile)
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";}
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile)
{ url = ""; window = 0; newWindow = 0; projectFile=""; package= "";}
- virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";}
- virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow, QCString projectFile)
+ virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";}
+ virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow, TQCString projectFile)
{ openFilename = ""; saveFilename = ""; newWindow = 0; projectFile=""; package= "";}
/**
* open file url, if not already opened and goto entry
* that is equal msgid
*/
- virtual void gotoFileEntry(QCString url, QCString msgid)=0;
- virtual void gotoFileEntry(QCString url, QCString package, int msgid)=0;
- virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString msgid)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile)=0;
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave)=0;
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker,
int ignoreContextInfo, int ask, int askForNextFile, int askForSave)=0;
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project )=0;
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project )=0;
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker,
- int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project )=0;
- virtual void spellcheck(QStringList fileList)=0;
+ int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project )=0;
+ virtual void spellcheck(TQStringList fileList)=0;
};
#endif // KBABELIFACE_H
diff --git a/kbabel/kbabel/kbabelpref.cpp b/kbabel/kbabel/kbabelpref.cpp
index 2907f060..2592385e 100644
--- a/kbabel/kbabel/kbabelpref.cpp
+++ b/kbabel/kbabel/kbabelpref.cpp
@@ -42,14 +42,14 @@
#include "colorpreferences.h"
#include "toolaction.h"
#include "toolselectionwidget.h"
-#include "qcombobox.h"
+#include "tqcombobox.h"
#include <klocale.h>
#include <kapplication.h>
using namespace KBabel;
-KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
+KBabelPreferences::KBabelPreferences(TQPtrList<ModuleInfo> ml)
: KConfigDialog(0, "Preferences", KBabelSettings::self())
{
_editorPage = new EditorPreferences(0, "editor");
@@ -59,12 +59,12 @@ KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
, i18n("Options for Editing"));
// this contains a custom widget for tool selection, set it up
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
_editorPage->_kcfg_AutoCheckTools->loadTools( "validate", tools );
- connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( added( QListBoxItem * ) ),
- this, SLOT (updateButtons()));
- connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( removed( QListBoxItem * ) ),
- this, SLOT (updateButtons()));
+ connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( added( TQListBoxItem * ) ),
+ this, TQT_SLOT (updateButtons()));
+ connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( removed( TQListBoxItem * ) ),
+ this, TQT_SLOT (updateButtons()));
addPage(_searchPage = new SearchPreferences(0, "search")
, i18n("title of page in preferences dialog","Search")
@@ -78,8 +78,8 @@ KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
_searchPage->_kcfg_DefaultModule->insertItem(info->name);
}
moduleList = ml;
- connect( _searchPage->_kcfg_DefaultModule, SIGNAL( activated(int) ),
- this, SLOT (updateButtons()));
+ connect( _searchPage->_kcfg_DefaultModule, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT (updateButtons()));
addPage(new EditorDiffPreferences(0, "diff")
,i18n("title of page in preferences dialog","Diff")
diff --git a/kbabel/kbabel/kbabelpref.h b/kbabel/kbabel/kbabelpref.h
index a275e11e..6d72aaf1 100644
--- a/kbabel/kbabel/kbabelpref.h
+++ b/kbabel/kbabel/kbabelpref.h
@@ -36,7 +36,7 @@
#define KBABELPREF_H
#include <kconfigdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class SearchPreferences;
class EditorPreferences;
@@ -46,7 +46,7 @@ class KBabelPreferences : public KConfigDialog
{
Q_OBJECT
public:
- KBabelPreferences(QPtrList<ModuleInfo>);
+ KBabelPreferences(TQPtrList<ModuleInfo>);
protected slots:
virtual void slotHelp();
@@ -62,7 +62,7 @@ private:
SearchPreferences* _searchPage;
EditorPreferences* _editorPage;
- QPtrList<ModuleInfo> moduleList;
+ TQPtrList<ModuleInfo> moduleList;
};
diff --git a/kbabel/kbabel/kbabelsplash.cpp b/kbabel/kbabel/kbabelsplash.cpp
index a13d8cd7..4166cffe 100644
--- a/kbabel/kbabel/kbabelsplash.cpp
+++ b/kbabel/kbabel/kbabelsplash.cpp
@@ -28,36 +28,36 @@
#include "kbabelsplash.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
KBabelSplash* KBabelSplash::instance = 0;
-KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
- : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
+KBabelSplash::KBabelSplash( TQWidget* parent, const char* name )
+ : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
{
setMargin( 0 );
setSpacing( 0 );
- QLabel* picLabel = new QLabel( this );
- QPixmap pixmap;
+ TQLabel* picLabel = new TQLabel( this );
+ TQPixmap pixmap;
if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) )
picLabel->setPixmap( pixmap );
- picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
// Set geometry, with support for Xinerama systems
- QRect r;
+ TQRect r;
r.setSize(sizeHint());
- int ps = QApplication::desktop()->primaryScreen();
- r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() );
+ int ps = TQApplication::desktop()->primaryScreen();
+ r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() );
setGeometry(r);
delete instance;
@@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
}
-void KBabelSplash::mousePressEvent( QMouseEvent* )
+void KBabelSplash::mousePressEvent( TQMouseEvent* )
{
close();
}
diff --git a/kbabel/kbabel/kbabelsplash.h b/kbabel/kbabel/kbabelsplash.h
index 3ae14c9a..b9a92c53 100644
--- a/kbabel/kbabel/kbabelsplash.h
+++ b/kbabel/kbabel/kbabelsplash.h
@@ -30,7 +30,7 @@
#ifndef KBABELSPLASH_H
#define KBABELSPLASH_H
-#include <qvbox.h>
+#include <tqvbox.h>
class QLabel;
class QMouseEvent;
@@ -43,13 +43,13 @@ class KBabelSplash : public QVBox
Q_OBJECT
public:
- KBabelSplash( QWidget* parent = 0, const char* name = 0 );
+ KBabelSplash( TQWidget* parent = 0, const char* name = 0 );
~KBabelSplash() { instance = 0; }
static KBabelSplash* instance;
protected:
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
};
#endif
diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp
index 2e9ebfa3..ca41a7ad 100644
--- a/kbabel/kbabel/kbabelview.cpp
+++ b/kbabel/kbabel/kbabelview.cpp
@@ -39,21 +39,21 @@
#include "kbabelsettings.h"
#include "kbprojectsettings.h"
-#include <qlayout.h>
-
-#include <qlabel.h>
-#include <qframe.h>
-#include <qfileinfo.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qstylesheet.h>
-#include <qtabwidget.h>
-#include <qtextview.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqfileinfo.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqstylesheet.h>
+#include <tqtabwidget.h>
+#include <tqtextview.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <dcopclient.h>
#include <kdeversion.h>
@@ -113,17 +113,17 @@
using namespace KBabel;
-QPtrList<KBabelView> *KBabelView::viewList = 0;
+TQPtrList<KBabelView> *KBabelView::viewList = 0;
KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project)
- : QWidget(parent)
+ : TQWidget(parent)
, _redirectedBackSearch (false)
, _project (project)
, m_mainwindow (parent)
, m_sourceview (0)
{
if(!viewList)
- viewList = new QPtrList<KBabelView>;
+ viewList = new TQPtrList<KBabelView>;
viewList->append(this);
@@ -181,7 +181,7 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project
hide();
dictBox = new KBabelDictBox(this,"dictBox");
- QWhatsThis::add(dictBox,
+ TQWhatsThis::add(dictBox,
i18n("<qt><p><b>Search results</b></p>"
"<p>This part of the window shows the results of searching in "
"dictionaries.<p>"
@@ -201,68 +201,68 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project
msgstrEdit->setReadOnly(true);
dictBox->setEnabled(false);
- connect(this, SIGNAL(signalNewFileOpened(KURL)),
- m_cataloglistview, SLOT(slotNewFileOpened()));
+ connect(this, TQT_SIGNAL(signalNewFileOpened(KURL)),
+ m_cataloglistview, TQT_SLOT(slotNewFileOpened()));
- connect(msgstrEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*)));
- connect(msgstrEdit,SIGNAL(textChanged()),this
- ,SIGNAL(signalMsgstrChanged()));
+ connect(msgstrEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*)));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged()),this
+ ,TQT_SIGNAL(signalMsgstrChanged()));
- connect(msgstrEdit,SIGNAL(textChanged(const QString&)),m_cataloglistview
- ,SLOT(msgstrChanged(const QString&)));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged(const TQString&)),m_cataloglistview
+ ,TQT_SLOT(msgstrChanged(const TQString&)));
- connect(this,SIGNAL(signalMsgstrChanged()),this,SLOT(autoCheck()));
- connect(msgstrEdit,SIGNAL(currentFormChanged(uint)), this
- ,SLOT(msgstrPluralFormChanged(uint)));
-
- connect(msgidLabel,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
- connect(msgstrEdit,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
-
- connect(dictBox,SIGNAL(searchStarted()),this
- ,SLOT(forwardSearchStart()));
- connect(dictBox, SIGNAL(progressStarts(const QString&)), this
- ,SLOT(forwardProgressStart(const QString&)));
- connect(dictBox,SIGNAL(progressed(int)),this
- ,SIGNAL(signalProgress(int)));
- connect(dictBox,SIGNAL(searchStopped()),this
- ,SLOT(forwardSearchStop()));
- connect(dictBox,SIGNAL(progressEnds()),this
- ,SIGNAL(signalClearProgressBar()));
-
- connect(dictBox,SIGNAL(modulesChanged()),this,
- SIGNAL(signalDictionariesChanged()));
- connect(dictBox,SIGNAL(errorInModule(const QString&)),this
- ,SLOT(showError(const QString&)));
-
- connect(_catalog,SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)),
- this, SLOT(setNewLanguage()));
-
- connect(_catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)),
- this, SLOT(checkFuzzies()));
- connect(_catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)),
- this, SLOT(checkUntranslated()));
+ connect(this,TQT_SIGNAL(signalMsgstrChanged()),this,TQT_SLOT(autoCheck()));
+ connect(msgstrEdit,TQT_SIGNAL(currentFormChanged(uint)), this
+ ,TQT_SLOT(msgstrPluralFormChanged(uint)));
+
+ connect(msgidLabel,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
+ connect(msgstrEdit,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
+
+ connect(dictBox,TQT_SIGNAL(searchStarted()),this
+ ,TQT_SLOT(forwardSearchStart()));
+ connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&)), this
+ ,TQT_SLOT(forwardProgressStart(const TQString&)));
+ connect(dictBox,TQT_SIGNAL(progressed(int)),this
+ ,TQT_SIGNAL(signalProgress(int)));
+ connect(dictBox,TQT_SIGNAL(searchStopped()),this
+ ,TQT_SLOT(forwardSearchStop()));
+ connect(dictBox,TQT_SIGNAL(progressEnds()),this
+ ,TQT_SIGNAL(signalClearProgressBar()));
+
+ connect(dictBox,TQT_SIGNAL(modulesChanged()),this,
+ TQT_SIGNAL(signalDictionariesChanged()));
+ connect(dictBox,TQT_SIGNAL(errorInModule(const TQString&)),this
+ ,TQT_SLOT(showError(const TQString&)));
+
+ connect(_catalog,TQT_SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)),
+ this, TQT_SLOT(setNewLanguage()));
+
+ connect(_catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)),
+ this, TQT_SLOT(checkFuzzies()));
+ connect(_catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)),
+ this, TQT_SLOT(checkUntranslated()));
if(buildLeds)
{
- connect(this,SIGNAL(signalFuzzyDisplayed(bool))
- ,this,SLOT(toggleFuzzyLed(bool)));
- connect(this,SIGNAL(signalUntranslatedDisplayed(bool))
- ,this,SLOT(toggleUntransLed(bool)));
- connect(this,SIGNAL(signalFaultyDisplayed(bool))
- ,this,SLOT(toggleErrorLed(bool)));
+ connect(this,TQT_SIGNAL(signalFuzzyDisplayed(bool))
+ ,this,TQT_SLOT(toggleFuzzyLed(bool)));
+ connect(this,TQT_SIGNAL(signalUntranslatedDisplayed(bool))
+ ,this,TQT_SLOT(toggleUntransLed(bool)));
+ connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool))
+ ,this,TQT_SLOT(toggleErrorLed(bool)));
}
- _dropMenu = new QPopupMenu(this);
+ _dropMenu = new TQPopupMenu(this);
_dropMenu->insertItem(i18n("Menu item", "Open"),ID_DROP_OPEN);
_dropMenu->insertItem(i18n("Open Template"),ID_DROP_OPEN_TEMPLATE);
readSettings(_config);
readProject(_project);
- connect (project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
if(!_catalog->currentURL().isEmpty())
{
@@ -304,10 +304,10 @@ KBabelView::~KBabelView()
void KBabelView::initDockWidgets()
{
// setup main dock widget - original text
- QWidget *tempWidget=new QWidget(this,"msgidWidget");
+ TQWidget *tempWidget=new TQWidget(this,"msgidWidget");
tempWidget->setMinimumSize(350,150);
- QVBoxLayout *layout=new QVBoxLayout(tempWidget);
+ TQVBoxLayout *layout=new TQVBoxLayout(tempWidget);
msgidLabel = new HidingMsgEdit(2, this, 0, tempWidget,"msgidLabel");
msgidLabel->installEventFilter(this);
@@ -330,22 +330,22 @@ void KBabelView::initDockWidgets()
"Many good ideas, especially for the Catalog Manager, are taken\n"
"from KTranslator by Andrea Rizzi.").arg(VERSION).arg(2006));
- QLabel *label=new QLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget);
+ TQLabel *label=new TQLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget);
- QHBoxLayout* hb=new QHBoxLayout(layout);
+ TQHBoxLayout* hb=new TQHBoxLayout(layout);
hb->addSpacing(KDialog::marginHint());
hb->addWidget(label);
layout->addWidget(msgidLabel);
layout->setStretchFactor(msgidLabel,1);
- QWhatsThis::add(tempWidget,
+ TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Original String</b></p>\n\
<p>This part of the window shows the original message\n\
of the currently displayed entry.</p></qt>"));
KDockWidget* mainDock;
- mainDock = m_mainwindow->createDockWidget( "Original", QPixmap ());
+ mainDock = m_mainwindow->createDockWidget( "Original", TQPixmap ());
//i18n: translators: Dock window caption
mainDock->setCaption(i18n("Original Text"));
mainDock->setGeometry(50, 50, 100, 100);
@@ -356,12 +356,12 @@ of the currently displayed entry.</p></qt>"));
m_mainwindow->setMainDockWidget(mainDock); // master dockwidget
mainDock->show ();
m_mainwindow->setView (mainDock);
- connect (this, SIGNAL (signalCopy ()), this, SLOT (textCopy ()));
- connect (this, SIGNAL (signalCut ()), this, SLOT (textCut ()));
- connect (this, SIGNAL (signalPaste ()), this, SLOT (textPaste ()));
- connect (this, SIGNAL (signalSelectAll ()), this, SLOT (selectAll ()));
+ connect (this, TQT_SIGNAL (signalCopy ()), this, TQT_SLOT (textCopy ()));
+ connect (this, TQT_SIGNAL (signalCut ()), this, TQT_SLOT (textCut ()));
+ connect (this, TQT_SIGNAL (signalPaste ()), this, TQT_SLOT (textPaste ()));
+ connect (this, TQT_SIGNAL (signalSelectAll ()), this, TQT_SLOT (selectAll ()));
- KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", QPixmap ());
+ KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", TQPixmap ());
//i18n: translators: Dock window caption
comment_dock->setCaption(i18n("Comment"));
comment_dock->setGeometry(50, 50, 100, 100);
@@ -372,17 +372,17 @@ of the currently displayed entry.</p></qt>"));
KDockWidget::DockRight, // dock site
20 ); // relation target/this (in percent)
comment_dock->show ();
- connect (this, SIGNAL (signalCopy ()), m_commentview, SLOT (textCopy ()));
- connect (this, SIGNAL (signalCut ()), m_commentview, SLOT (textCut ()));
- connect (this, SIGNAL (signalPaste ()), m_commentview, SLOT (textPaste ()));
- connect (this, SIGNAL (signalSelectAll ()), m_commentview, SLOT (textSelectAll ()));
+ connect (this, TQT_SIGNAL (signalCopy ()), m_commentview, TQT_SLOT (textCopy ()));
+ connect (this, TQT_SIGNAL (signalCut ()), m_commentview, TQT_SLOT (textCut ()));
+ connect (this, TQT_SIGNAL (signalPaste ()), m_commentview, TQT_SLOT (textPaste ()));
+ connect (this, TQT_SIGNAL (signalSelectAll ()), m_commentview, TQT_SLOT (textSelectAll ()));
m_commentview->installEventFilter( this );
// build the msgstr widget
- tempWidget=new QWidget(this,"msgstrWidget");
+ tempWidget=new TQWidget(this,"msgstrWidget");
tempWidget->setMinimumSize(350,150);
- layout=new QVBoxLayout(tempWidget);
+ layout=new TQVBoxLayout(tempWidget);
// if undefined number of plural forms, use 1
int pf = _catalog->defaultNumberOfPluralForms();
@@ -393,9 +393,9 @@ of the currently displayed entry.</p></qt>"));
msgstrEdit->installEventFilter(this);
KCursor::setAutoHideCursor(msgstrEdit,true);
- label=new QLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget);
+ label=new TQLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget);
- hb=new QHBoxLayout(layout);
+ hb=new TQHBoxLayout(layout);
hb->setSpacing(KDialog::spacingHint());
hb->addSpacing(KDialog::marginHint());
@@ -407,7 +407,7 @@ of the currently displayed entry.</p></qt>"));
_fuzzyLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_fuzzyLed->setFixedSize(15,12);
- label = new QLabel(i18n("fuzzy"),tempWidget);
+ label = new TQLabel(i18n("fuzzy"),tempWidget);
hb->addWidget(_fuzzyLed);
hb->addWidget(label);
@@ -416,7 +416,7 @@ of the currently displayed entry.</p></qt>"));
_untransLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_untransLed->setFixedSize(15,12);
- label = new QLabel(i18n("untranslated"),tempWidget);
+ label = new TQLabel(i18n("untranslated"),tempWidget);
hb->addWidget(_untransLed);
hb->addWidget(label);
@@ -425,7 +425,7 @@ of the currently displayed entry.</p></qt>"));
_errorLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_errorLed->setFixedSize(15,12);
- label = new QLabel(i18n("faulty"),tempWidget);
+ label = new TQLabel(i18n("faulty"),tempWidget);
hb->addWidget(_errorLed);
hb->addWidget(label);
@@ -434,24 +434,24 @@ of the currently displayed entry.</p></qt>"));
hb->addStretch(1);
// ### TODO: perhaps it should be moreprecise where the setting can be changed
- QString ledMsg=i18n("<qt><p><b>Status LEDs</b></p>\n"
+ TQString ledMsg=i18n("<qt><p><b>Status LEDs</b></p>\n"
"<p>These LEDs display the status of the currently displayed message.\n"
"You can change their color in the preferences dialog section\n"
"<b>Editor</b> on page <b>Appearance</b></p></qt>");
- QWhatsThis::add(_fuzzyLed,ledMsg);
- QWhatsThis::add(_untransLed,ledMsg);
- QWhatsThis::add(_errorLed,ledMsg);
+ TQWhatsThis::add(_fuzzyLed,ledMsg);
+ TQWhatsThis::add(_untransLed,ledMsg);
+ TQWhatsThis::add(_errorLed,ledMsg);
}
layout->addWidget(msgstrEdit);
layout->setStretchFactor(msgstrEdit,1);
- QWhatsThis::add(tempWidget,
+ TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Translation Editor</b></p>\n\
<p>This editor displays and lets you edit the translation of the currently displayed message.<p></qt>"));
- KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", QPixmap ());
+ KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", TQPixmap ());
//i18n: translators: Dock window caption
msgstr_dock->setCaption(i18n("Translated String"));
msgstr_dock->setEnableDocking(KDockWidget::DockCorner);
@@ -461,7 +461,7 @@ of the currently displayed entry.</p></qt>"));
50 ); // relation target/this (in percent)
msgstr_dock->show ();
- KDockWidget* dock = m_mainwindow->createDockWidget( "Search", QPixmap ());
+ KDockWidget* dock = m_mainwindow->createDockWidget( "Search", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("the search (noun)","Search"));
//i18n: translators: Dock tab caption
@@ -475,7 +475,7 @@ of the currently displayed entry.</p></qt>"));
KDockWidget* tools = dock;
- dock = m_mainwindow->createDockWidget( "PO context", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "PO context", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("PO Context"));
//i18n: translators: Dock tab caption
@@ -488,7 +488,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- dock = m_mainwindow->createDockWidget( "Charselector", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Charselector", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Character Table"));
//i18n: translators: Dock tab caption
@@ -502,7 +502,7 @@ of the currently displayed entry.</p></qt>"));
dock->show ();
- dock = m_mainwindow->createDockWidget( "Tag List", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Tag List", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Tag List"));
//i18n: translators: Dock tab caption
@@ -515,7 +515,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- dock = m_mainwindow->createDockWidget( "Source Context", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Source Context", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Source Context"));
//i18n: translators: Dock tab caption
@@ -528,7 +528,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", QPixmap ());
+ KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", TQPixmap ());
translist_dock->setCaption(i18n("Translation List"));
translist_dock->setGeometry(50, 50, 100, 100);
translist_dock->setEnableDocking(KDockWidget::DockFullSite);
@@ -537,7 +537,7 @@ of the currently displayed entry.</p></qt>"));
translist_dock->manualDock( mainDock, KDockWidget::DockTop,100);
translist_dock->show ();
- dock = m_mainwindow->createDockWidget( "Error List", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Error List", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Error List"));
//i18n: translators: Dock tab caption
@@ -550,33 +550,33 @@ of the currently displayed entry.</p></qt>"));
20 );
dock->show ();
- connect(m_cataloglistview,SIGNAL(signalSelectionChanged(const KBabel::DocPosition&))
- ,this,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_commentview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_contextview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_taglistview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_sourceview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_errorlistview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalFaultyDisplayed(bool))
- ,m_errorlistview,SLOT(updateView()));
- connect(m_charselectorview, SIGNAL( characterDoubleClicked(QChar) )
- ,this, SLOT( insertChar(QChar) ));
- connect(m_taglistview,SIGNAL(signalTagSelected(const QString&))
- , this, SLOT(insertTagFromTool(const QString&)));
- connect(m_taglistview,SIGNAL(signalHighlightedTagChanged(int))
- , this, SLOT(skipToTagFromTool(int)));
- connect(this, SIGNAL(signalNextTag(int))
- , m_taglistview, SLOT(highlightTag(int)));
- connect(m_commentview,SIGNAL(signalCursorPosChanged(int,int))
- , m_mainwindow, SLOT(updateCursorPosition(int,int)));
+ connect(m_cataloglistview,TQT_SIGNAL(signalSelectionChanged(const KBabel::DocPosition&))
+ ,this,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_commentview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_contextview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_taglistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_sourceview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_errorlistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool))
+ ,m_errorlistview,TQT_SLOT(updateView()));
+ connect(m_charselectorview, TQT_SIGNAL( characterDoubleClicked(TQChar) )
+ ,this, TQT_SLOT( insertChar(TQChar) ));
+ connect(m_taglistview,TQT_SIGNAL(signalTagSelected(const TQString&))
+ , this, TQT_SLOT(insertTagFromTool(const TQString&)));
+ connect(m_taglistview,TQT_SIGNAL(signalHighlightedTagChanged(int))
+ , this, TQT_SLOT(skipToTagFromTool(int)));
+ connect(this, TQT_SIGNAL(signalNextTag(int))
+ , m_taglistview, TQT_SLOT(highlightTag(int)));
+ connect(m_commentview,TQT_SIGNAL(signalCursorPosChanged(int,int))
+ , m_mainwindow, TQT_SLOT(updateCursorPosition(int,int)));
}
-KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
+KBabelView *KBabelView::viewForURL(const KURL& url, const TQString project)
{
if(url.isEmpty())
return 0;
@@ -587,7 +587,7 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
KURL u = url;
u.cleanPath();
- QPtrListIterator<KBabelView> it(*viewList);
+ TQPtrListIterator<KBabelView> it(*viewList);
KBabelView *view=0;
while( it.current() && !view)
{
@@ -605,12 +605,12 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
return view;
}
-KBabelView *KBabelView::emptyView(const QString)
+KBabelView *KBabelView::emptyView(const TQString)
{
if(!viewList)
return 0;
- QPtrListIterator<KBabelView> it(*viewList);
+ TQPtrListIterator<KBabelView> it(*viewList);
KBabelView *view=0;
while( it.current() && !view)
{
@@ -684,8 +684,8 @@ void KBabelView::readSettings(KConfig* config)
if(KBabelSettings::autoUnsetFuzzy())
{
- connect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
setupAutoCheckTools();
@@ -770,7 +770,7 @@ void KBabelView::readProject(Project::Ptr project)
spell2.config->setEncoding(_spellcheckSettings.spellEncoding);
spell2.config->setDictionary(_spellcheckSettings.spellDict);
- spell2.kspell= new KSpell(this, "", this, SLOT(dummy(KSpell *)),
+ spell2.kspell= new KSpell(this, "", this, TQT_SLOT(dummy(KSpell *)),
spell2.config, false, false);
if(spell2.kspell->status() == KSpell::Error)
kdWarning(KBABEL) << "Something's wrong with KSpell, can't start on-the-fly checking" << endl;
@@ -853,13 +853,13 @@ void KBabelView::updateSettings()
_errorLed->setColor(KBabelSettings::ledColor());
}
- disconnect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
if(KBabelSettings::autoUnsetFuzzy())
{
- connect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgstrEdit->setCleverEditing(KBabelSettings::cleverEditing());
@@ -926,9 +926,9 @@ void KBabelView::setupAutoCheckTools()
if(!KBabelSettings::autoCheckTools().isEmpty() )
{
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QValueList<KDataToolInfo>::Iterator it;
+ TQValueList<KDataToolInfo>::Iterator it;
for( it=tools.begin(); it!=tools.end() ; ++it )
{
if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) )
@@ -942,14 +942,14 @@ void KBabelView::setupAutoCheckTools()
}
}
-void KBabelView::setRMBEditMenu(QPopupMenu* popup)
+void KBabelView::setRMBEditMenu(TQPopupMenu* popup)
{
msgidLabel->setContextMenu( popup );
msgstrEdit->setContextMenu( popup );
KContextMenuManager::insert(this,popup);
}
-void KBabelView::setRMBSearchMenu(QPopupMenu* popup)
+void KBabelView::setRMBSearchMenu(TQPopupMenu* popup)
{
dictBox->setRMBMenu(popup);
}
@@ -965,7 +965,7 @@ void KBabelView::restoreView(KConfig *)
void KBabelView::saveSession(KConfig* config)
{
- QString focus;
+ TQString focus;
int line=0,col=0;
if(msgstrEdit->hasFocus())
{
@@ -1009,11 +1009,11 @@ void KBabelView::saveSession(KConfig* config)
void KBabelView::restoreSession(KConfig* config)
{
- QString url=config->readPathEntry("URL");
+ TQString url=config->readPathEntry("URL");
if(!url.isEmpty())
{
- open(KURL( url ), QString::null, false,true);
+ open(KURL( url ), TQString::null, false,true);
}
@@ -1031,7 +1031,7 @@ void KBabelView::restoreSession(KConfig* config)
pos.form=config->readNumEntry("PluralForm");
gotoEntry(pos);
- QString focus=config->readEntry("Focus");
+ TQString focus=config->readEntry("Focus");
int line=config->readNumEntry("CursorLine");
int col=config->readNumEntry("CursorCol");
if(focus=="msgstr")
@@ -1067,7 +1067,7 @@ void KBabelView::newFileOpened(bool readOnly)
msgstrEdit->setReadOnly(readOnly);
msgstrEdit->setFocus();
- QString caption=_catalog->package();
+ TQString caption=_catalog->package();
if(readOnly)
caption+=i18n(" [readonly]");
emit signalChangeCaption(caption);
@@ -1103,7 +1103,7 @@ void KBabelView::open()
open(KURL());
}
-void KBabelView::open(const KURL& _url, const QString & package, bool checkIfModified, bool newView)
+void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfModified, bool newView)
{
#if KDE_IS_VERSION( 3, 5, 0)
KURL url = KIO::NetAccess::mostLocalURL(_url,this);
@@ -1126,7 +1126,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
{
if(url.isEmpty())
{
- QString filename;
+ TQString filename;
if ((url = KFileDialog::getOpenURL(currentURL().url(), CatalogImportPlugin::availableImportMimeTypes().join(" ")
,this)).isEmpty())
{
@@ -1192,7 +1192,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
}
case RECOVERED_PARSE_ERROR:
{
- QString msg=i18n(
+ TQString msg=i18n(
"The file contained syntax errors and an attempt has been "
"made to recover it.\n"
"Please check the questionable entries by using "
@@ -1243,8 +1243,8 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
_autoSaveDelay = _catalog->saveSettings( ).autoSaveDelay;
if ( _autoSaveDelay ) {
if ( !autoSaveTimer ) {
- autoSaveTimer = new QTimer( this, "AUTOSAVE TIMER" );
- connect( autoSaveTimer, SIGNAL( timeout( ) ), this, SLOT( slotAutoSaveTimeout( ) ) );
+ autoSaveTimer = new TQTimer( this, "AUTOSAVE TIMER" );
+ connect( autoSaveTimer, TQT_SIGNAL( timeout( ) ), this, TQT_SLOT( slotAutoSaveTimeout( ) ) );
}
autoSaveTimer->stop( );
autoSaveTimer->start( 1000 * 60 * _autoSaveDelay );
@@ -1268,7 +1268,7 @@ void KBabelView::revertToSaved()
}
}
- open(_catalog->currentURL(),QString::null,false);
+ open(_catalog->currentURL(),TQString::null,false);
}
void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
@@ -1448,7 +1448,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
if (KIO::NetAccess::exists(url, false, this))
{
- if(KMessageBox::warningContinueCancel(this,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
{
return false;
@@ -1468,7 +1468,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
do
{
// select the right error message
- QString message;
+ TQString message;
switch(stat)
{
case NO_PERMISSIONS:
@@ -1569,7 +1569,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
bool KBabelView::saveFileSpecial()
{
- QString tmpname;
+ TQString tmpname;
bool result = false;
{
@@ -1596,7 +1596,7 @@ bool KBabelView::saveFileSpecial()
, "filesave"
, i18n("Options for File Saving"));
- if( _prefDialog->exec() == QDialog::Accepted )
+ if( _prefDialog->exec() == TQDialog::Accepted )
{
SaveSettings settings = project->saveSettings();
SaveSettings originalSettings = _catalog->saveSettings();
@@ -1607,7 +1607,7 @@ bool KBabelView::saveFileSpecial()
}
}
- QFile::remove( tmpname );
+ TQFile::remove( tmpname );
return result;
}
@@ -1623,11 +1623,11 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
return false;
bool returnCode=true;
- QString output;
+ TQString output;
Msgfmt::Status result=_catalog->checkSyntax( output );
- const QStringList outputLines = QStringList::split("\n",output);
+ const TQStringList outputLines = TQStringList::split("\n",output);
switch(result)
{
@@ -1654,7 +1654,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
case Msgfmt::HeaderError:
case Msgfmt::SyntaxError:
{
- QString msg = ( result == Msgfmt::SyntaxError )
+ TQString msg = ( result == Msgfmt::SyntaxError )
? i18n("msgfmt detected a syntax error.\n")
: i18n("msgfmt detected a header syntax error.\n");
@@ -1695,7 +1695,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
case Msgfmt::NoExecutable:
case Msgfmt::Error:
{
- QString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n"
+ TQString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n"
"Please make sure that you have installed\n"
"the GNU gettext package properly.");
if(question)
@@ -1742,9 +1742,9 @@ bool KBabelView::checkAll()
bool a,badresult=false;
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
KDataTool* tool = (*entry).createTool();
@@ -1756,7 +1756,7 @@ bool KBabelView::checkAll()
}
}
- QString output;
+ TQString output;
a = (_catalog->checkSyntax(output, false)!=Msgfmt::Ok);
badresult=badresult||a;
@@ -1831,7 +1831,7 @@ void KBabelView::updateEditor(int form, bool delay)
if(KBabelSettings::autoUnsetFuzzy() && !msgstrEdit->isModified())
{
- disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgidLabel->setText(_catalog->msgid(_currentIndex), _catalog->msgctxt(_currentIndex));
@@ -1844,7 +1844,7 @@ void KBabelView::updateEditor(int form, bool delay)
if(KBabelSettings::autoUnsetFuzzy() && _catalog->isFuzzy(_currentIndex))
{
- connect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgstrEdit->blockSignals(false);
@@ -1862,7 +1862,7 @@ void KBabelView::updateEditor(int form, bool delay)
{
if (delay)
{
- QTimer::singleShot(0, this, SLOT (startSearch()));
+ TQTimer::singleShot(0, this, TQT_SLOT (startSearch()));
}
else
{
@@ -2034,7 +2034,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>End of document reached.<br>Continue from the beginning?</qt>",
"<qt>%n replacements made.<br>End of document reached.<br>Continue from the beginning?</qt>",
- _replacesTotal), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2042,7 +2042,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue from the beginning?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
if(opts.inMsgid && !forReplace)
@@ -2078,23 +2078,23 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
if( opts.askForNextFile )
{
int r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue in the next file?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue in the next file?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
if( r != KMessageBox::Yes ) return false;
}
if( isModified() && !opts.askForSave ) saveFile();
DCOPClient *client = kapp->dcopClient();
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
bool morefiles = false; // more files to lookup in
if( !client->call( _fileSource,"CatalogManagerIFace",
"findNextFile()", data, replyType, replyData) ) kdDebug(KBABEL) << "unable to call, reply type is " << replyType << endl;
- else if( replyType == "QCString" )
+ else if( replyType == "TQCString" )
{
- QDataStream rep( replyData, IO_ReadOnly);
- QCString f;
+ TQDataStream rep( replyData, IO_ReadOnly);
+ TQCString f;
rep >> f;
- QString foundFile = QString::fromUtf8(f);
+ TQString foundFile = TQString::fromUtf8(f);
morefiles = !f.isEmpty() && !f.isNull();
if( morefiles )
{
@@ -2219,7 +2219,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
"<qt>%n replacements made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
- _replacesTotal),QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal),TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2228,7 +2228,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("Beginning of document reached.\n"
- "Continue from the end?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the end?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
pos.item = _catalog->numberOfEntries()-1;
@@ -2345,7 +2345,7 @@ void KBabelView::find()
_findDialog = new FindDialog(false,this);
}
- QString marked;
+ TQString marked;
if(msgstrEdit->hasFocus()) {
marked=msgstrEdit->selectedText();
msgstrEdit->selectAll(false);
@@ -2363,7 +2363,7 @@ void KBabelView::find()
if(marked==_lastFoundString)
marked="";
- if( _findDialog->exec(marked) == QDialog::Accepted ) {
+ if( _findDialog->exec(marked) == TQDialog::Accepted ) {
DocPosition pos;
FindOptions opts=_findDialog->findOpts();
opts.askFile = false; // do not search in more files
@@ -2443,7 +2443,7 @@ void KBabelView::replace()
if( !_replaceDialog ) {
_replaceDialog = new FindDialog(true,this);
}
- QString marked;
+ TQString marked;
if(msgstrEdit->hasFocus()) {
marked=msgstrEdit->selectedText();
msgstrEdit->selectAll(false);
@@ -2460,7 +2460,7 @@ void KBabelView::replace()
if(marked==_lastFoundString)
marked="";
- if( _replaceDialog->exec(marked) == QDialog::Accepted ) {
+ if( _replaceDialog->exec(marked) == TQDialog::Accepted ) {
KBabel::ReplaceOptions opts=_replaceDialog->replaceOpts();
if(opts.fromCursor) {
_findBreakAtEnd=false;
@@ -2518,9 +2518,9 @@ void KBabelView::replace()
if(success) {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext()));
- connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace()));
- connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
if(opts.ask) {
@@ -2551,7 +2551,7 @@ void KBabelView::replaceNext()
Part part;
uint form = 0;
- QString str;
+ TQString str;
if(_replacePos.part==Msgstr) {
part=Msgstr;
@@ -2629,7 +2629,7 @@ void KBabelView::replaceAll()
Part part;
uint form=0;
- QString str;
+ TQString str;
if(_replacePos.part==Msgstr) {
part=Msgstr;
@@ -2689,7 +2689,7 @@ void KBabelView::findNextReplace()
}
-void KBabelView::findInFile(QCString fileSource, FindOptions options)
+void KBabelView::findInFile(TQCString fileSource, FindOptions options)
{
DocPosition pos;
pos.item=0;
@@ -2714,7 +2714,7 @@ void KBabelView::findInFile(QCString fileSource, FindOptions options)
findNext_internal(pos);
}
-void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions options)
+void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options)
{
_replacePos.item=0;
_replacePos.part=Msgid;
@@ -2749,9 +2749,9 @@ void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions optio
else {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext()));
- connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace()));
- connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
if(options.ask) {
@@ -2800,7 +2800,7 @@ void KBabelView::clear()
void KBabelView::msgid2msgstr()
{
// FIXME: should care about plural forms
- QString text = _catalog->msgid(_currentIndex).first();
+ TQString text = _catalog->msgid(_currentIndex).first();
// this is KDE specific:
if(text.find("_: NAME OF TRANSLATORS\\n")==0)
@@ -2830,7 +2830,7 @@ void KBabelView::msgid2msgstr()
// end of KDE specific part
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(text.contains(reg))
{
text.replace(reg,"");
@@ -3182,7 +3182,7 @@ void KBabelView::editHeader()
int x=w/2-editWidth/2;
int y=h/2-editHeight/2;
- editor->move(mapToGlobal(QPoint(x,y)));
+ editor->move(mapToGlobal(TQPoint(x,y)));
editor->show();
editor->raise();
@@ -3202,8 +3202,8 @@ void KBabelView::startSearch()
void KBabelView::startSearch(bool delay)
{
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3220,11 +3220,11 @@ void KBabelView::startSearch(bool delay)
}
}
-void KBabelView::startSearch(const QString module)
+void KBabelView::startSearch(const TQString module)
{
// FIXME: should care about plural forms
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3240,7 +3240,7 @@ void KBabelView::startSelectionSearch()
startSelectionSearch(KBabelSettings::defaultModule());
}
-void KBabelView::startSelectionSearch(const QString module)
+void KBabelView::startSelectionSearch(const TQString module)
{
dictBox->setActiveModule(module);
@@ -3256,8 +3256,8 @@ void KBabelView::startSelectionSearch(const QString module)
else
{
// should care about plural forms
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3299,8 +3299,8 @@ void KBabelView::emitEntryState()
if(isError)
{
- QPalette palette=msgstrEdit->palette();
- palette.setColor( QColorGroup::Text, red );
+ TQPalette palette=msgstrEdit->palette();
+ palette.setColor( TQColorGroup::Text, red );
if( _catalog->itemStatus(_currentIndex).contains("syntax error"))
{
@@ -3335,7 +3335,7 @@ void KBabelView::checkUntranslated()
void KBabelView::autoRemoveFuzzyStatus()
{
// only at first text change remove fuzzy status
- disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
//removeFuzzyStatus();
}
@@ -3398,18 +3398,18 @@ void KBabelView::toggleErrorLed(bool on)
-void KBabelView::showError(const QString& message)
+void KBabelView::showError(const TQString& message)
{
KMessageBox::error(this,message);
}
-void KBabelView::dragEnterEvent(QDragEnterEvent *event)
+void KBabelView::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KBabelView::dropEvent(QDropEvent *event)
+void KBabelView::dropEvent(TQDropEvent *event)
{
KURL::List uri;
@@ -3421,33 +3421,33 @@ void KBabelView::dropEvent(QDropEvent *event)
}
-bool KBabelView::eventFilter( QObject* object, QEvent* event)
+bool KBabelView::eventFilter( TQObject* object, TQEvent* event)
{
- if(event->type() == QEvent::DragEnter)
+ if(event->type() == TQEvent::DragEnter)
{
- QDragEnterEvent* e = (QDragEnterEvent*) event;
+ TQDragEnterEvent* e = (TQDragEnterEvent*) event;
if(KURLDrag::canDecode(e))
{
e->accept(true);
return true;
}
}
- else if(event->type() == QEvent::Drop)
+ else if(event->type() == TQEvent::Drop)
{
KURL::List uri;
// see if we can decode a URI.. if not, just ignore it
- if (KURLDrag::decode((QDropEvent*)event, uri))
+ if (KURLDrag::decode((TQDropEvent*)event, uri))
{
- processUriDrop(uri ,( (QWidget*)object)->mapToGlobal( ( (QDropEvent*)event )->pos()));
+ processUriDrop(uri ,( (TQWidget*)object)->mapToGlobal( ( (TQDropEvent*)event )->pos()));
return true;
}
}
- else if(event->type() == QEvent::KeyPress)
+ else if(event->type() == TQEvent::KeyPress)
{
// This is a little workaround to use CTRL+ALT+Home, CTRL+ALT+End, Undo keys
// to go to the first and the last entry. Because otherwise
// CTRL+Home and CTRL+End and Undo are caught by QTextEdit
- QKeyEvent *ke = (QKeyEvent*)event;
+ TQKeyEvent *ke = (TQKeyEvent*)event;
if(ke->key() == Key_Home && ke->state() == (AltButton | ControlButton))
{
@@ -3480,7 +3480,7 @@ bool KBabelView::eventFilter( QObject* object, QEvent* event)
return false;
}
-void KBabelView::processUriDrop(KURL::List& uriList, const QPoint& pos)
+void KBabelView::processUriDrop(KURL::List& uriList, const TQPoint& pos)
{
// if we have two entries, the chance is high, that it
// is a drag from the catalog manager
@@ -3526,12 +3526,12 @@ void KBabelView::forwardMsgstrEditCmd(EditCommand* cmd)
/*
if(cmd->terminator()!=0)
{
- kdDebug(KBABEL) << QString::number(cmd->terminator()) << endl;
+ kdDebug(KBABEL) << TQString::number(cmd->terminator()) << endl;
}
else
{
DelTextCmd* delcmd = (DelTextCmd*) cmd;
- kdDebug(KBABEL) << QString::number(delcmd->offset)+":"+delcmd->str+"|" << endl;
+ kdDebug(KBABEL) << TQString::number(delcmd->offset)+":"+delcmd->str+"|" << endl;
}
*/
bool fuzzyRemoved=false;
@@ -3576,9 +3576,9 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
{
if( !_autocheckTools.isEmpty() )
{
- QStringList oldStatus = _catalog->itemStatus(_currentIndex);
+ TQStringList oldStatus = _catalog->itemStatus(_currentIndex);
- QStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools );
+ TQStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools );
// if there is more than one view, the status changes only in
// one view, so we have to update always.
@@ -3587,12 +3587,12 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
if( !status.isEmpty() )
{
- QString msg = "";
+ TQString msg = "";
// ### TODO: whynot use i18n("context",text) directly?
KLocale* locale=KGlobal::locale();
- for( QStringList::iterator it=status.begin() ; it != status.end() ; ++it )
+ for( TQStringList::iterator it=status.begin() ; it != status.end() ; ++it )
{
if( msg.isEmpty() ) msg = locale->translate("what check found errors",(*it).utf8());
else msg += ", "+locale->translate("what check found errors",(*it).utf8());
@@ -3712,20 +3712,20 @@ void KBabelView::spellcheckCommon()
delete spellDlg;
}
-void KBabelView::addSpellcheckWords( uint pos, QString text, uint index, uint form )
+void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint form )
{
// special format chars
- QString spclChars="abfnrtv'\"?\\";
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQString spclChars="abfnrtv'\"?\\";
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
uint textLength=text.length();
do
{
- QString word="";
+ TQString word="";
bool wordBegin=false;
while(!wordBegin && pos < textLength)
{
- QChar c=text[pos];
+ TQChar c=text[pos];
if(c.isLetter() || c==accelMarker)
{
wordBegin=true;
@@ -3830,7 +3830,7 @@ void KBabelView::spellcheck()
spell.lastIndex=_currentIndex;
_tagExtractor->setString(msgstrEdit->selectedText());
- QString marked=_tagExtractor->plainString(true);
+ TQString marked=_tagExtractor->plainString(true);
addSpellcheckWords(msgstrEdit->beginOfMarkedText(),marked
,_currentIndex,msgstrEdit->currentForm());
@@ -3839,7 +3839,7 @@ void KBabelView::spellcheck()
{
uint first=0;
uint last=_catalog->numberOfEntries()-1;
- QString text;
+ TQString text;
bool emitProgress=false;
@@ -3863,12 +3863,12 @@ void KBabelView::spellcheck()
int pos=msgstrEdit->currentIndex();
int form=msgstrEdit->currentForm();
- QStringList msgs = _catalog->msgstr(_currentIndex);
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
_tagExtractor->setString((*msgs.at(form)));
text=_tagExtractor->plainString(true);
addSpellcheckWords( pos, text, _currentIndex, form++ );
- for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
+ for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
{
_tagExtractor->setString(*i);
text=_tagExtractor->plainString(true);
@@ -3903,9 +3903,9 @@ void KBabelView::spellcheck()
kapp->processEvents(100);
}
- QStringList msgs=_catalog->msgstr(i);
+ TQStringList msgs=_catalog->msgstr(i);
uint formCounter=0;
- for(QStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j)
+ for(TQStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j)
{
_tagExtractor->setString(*j);
text=_tagExtractor->plainString(true);
@@ -3918,12 +3918,12 @@ void KBabelView::spellcheck()
int pos=msgstrEdit->currentIndex();
int form=msgstrEdit->currentForm();
- QStringList msgs = _catalog->msgstr(_currentIndex);
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
_tagExtractor->setString((*msgs.at(form)).left(pos));
text=_tagExtractor->plainString(true);
addSpellcheckWords( 0, text, _currentIndex, form++ );
- for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
+ for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
{
_tagExtractor->setString(*i);
text=_tagExtractor->plainString(true);
@@ -3943,7 +3943,7 @@ void KBabelView::spellcheck()
_dontBeep=true;
spell.kspell= new KSpell (this, i18n("Spellcheck"),
- this, SLOT(spellStart(KSpell *)), spell.config, true, true);
+ this, TQT_SLOT(spellStart(KSpell *)), spell.config, true, true);
if( spell.kspell->status() == KSpell::Error )
{
KMessageBox::error( this, i18n("KBabel cannot start spell checker. "
@@ -3951,20 +3951,20 @@ void KBabelView::spellcheck()
return;
}
- connect(spell.kspell, SIGNAL(death()),this, SLOT(spellCleanDone()));
+ connect(spell.kspell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone()));
- connect(spell.kspell, SIGNAL(misspelling(const QString &, const QStringList &
+ connect(spell.kspell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &
, unsigned int)), this
- , SLOT(spellMisspelled(const QString &, const QStringList &, unsigned int)));
+ , TQT_SLOT(spellMisspelled(const TQString &, const TQStringList &, unsigned int)));
- connect(spell.kspell, SIGNAL(corrected(const QString &, const QString &, unsigned int))
- , this, SLOT(spellCorrected(const QString &, const QString &, unsigned int)));
+ connect(spell.kspell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int))
+ , this, TQT_SLOT(spellCorrected(const TQString &, const TQString &, unsigned int)));
- connect(spell.kspell,SIGNAL(ignoreall(const QString &))
- , this, SLOT(spellAddIgnore(const QString &)));
+ connect(spell.kspell,TQT_SIGNAL(ignoreall(const TQString &))
+ , this, TQT_SLOT(spellAddIgnore(const TQString &)));
- connect(spell.kspell, SIGNAL(done(bool))
- , this, SLOT(spellResult(bool)));
+ connect(spell.kspell, TQT_SIGNAL(done(bool))
+ , this, TQT_SLOT(spellResult(bool)));
spell.kspell->setAutoDelete(true); // let KSpell handle delete
}
@@ -3980,7 +3980,7 @@ void KBabelView::spellStart(KSpell *)
// set ignored words
if(_spellcheckSettings.rememberIgnored)
{
- QString urlString = _spellcheckSettings.ignoreURL;
+ TQString urlString = _spellcheckSettings.ignoreURL;
if(urlString.contains("@PACKAGE@"))
{
urlString.replace("@PACKAGE@",_catalog->packageName());
@@ -3989,15 +3989,15 @@ void KBabelView::spellStart(KSpell *)
KURL url(urlString);
if(url.isLocalFile())
{
- QFile file(url.path());
+ TQFile file(url.path());
if(file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString contents = stream.read();
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString contents = stream.read();
file.close();
- spell.ignoreList = QStringList::split('\n',contents);
+ spell.ignoreList = TQStringList::split('\n',contents);
}
else if(file.exists())
{
@@ -4023,7 +4023,7 @@ void KBabelView::spellStart(KSpell *)
uint total = spell.ignoreList.count();
uint oldPercent=0;
uint counter=0;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it=spell.ignoreList.begin(); it != spell.ignoreList.end(); ++it)
{
counter++;
@@ -4045,7 +4045,7 @@ void KBabelView::spellStart(KSpell *)
}
-bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
+bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
{
Position *p = spell.posDict.at(pos);
if(!p)
@@ -4081,9 +4081,9 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
int end=p->end+spell.posCorrection-spell.inWordCorrection;
// check if this is the correct word
- QString text = *_catalog->msgstr(p->index).at(p->form);
+ TQString text = *_catalog->msgstr(p->index).at(p->form);
text=text.mid(begin,end-begin);
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(text.contains(accelMarker))
{
@@ -4104,7 +4104,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
if( n > 0 )
{
// re-get the original text since we replace some things above
- QString text = *_catalog->msgstr(p->index).at(p->form);
+ TQString text = *_catalog->msgstr(p->index).at(p->form);
text=text.mid(begin,end-begin);
bool textFound=false;
@@ -4126,7 +4126,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
if(e<0) e=text.length();
- QString w=text.mid(lastPos,e-lastPos);
+ TQString w=text.mid(lastPos,e-lastPos);
if(w.contains(accelMarker))
{
w.replace(accelMarker,"");
@@ -4183,7 +4183,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
return textOk;
}
-void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsigned int pos)
+void KBabelView::spellMisspelled(const TQString &orig, const TQStringList &, unsigned int pos)
{
kdDebug(KBABEL) << "misspelled: " << orig << " pos: " << pos << endl;
@@ -4192,11 +4192,11 @@ void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsig
markMisspelled(orig,pos);
}
-void KBabelView::spellCorrected(const QString &orig, const QString &word, unsigned int pos)
+void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsigned int pos)
{
if(orig != word)
{
- QString newWord(word);
+ TQString newWord(word);
kdDebug(KBABEL) << "corrected: " << orig << " " << newWord
<< " pos: " << pos << endl;
@@ -4222,12 +4222,12 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign
if(markMisspelled(orig,pos))
{
- QString marked=msgstrEdit->selectedText();
+ TQString marked=msgstrEdit->selectedText();
spell.origWords.append(marked);
if(marked.contains("\n") && !newWord.contains('\n'))
{
- QString s1=newWord;
+ TQString s1=newWord;
s1.replace(" ","\n");
// if only a newline has been replaced with a white space
@@ -4240,11 +4240,11 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign
// check if the old word had an accelerator. If yes and the new
// word has no accelerator, try to add the accelerator for
// the same char else add in at the same position
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(marked.contains(accelMarker) && !newWord.contains(accelMarker))
{
int b=marked.find(accelMarker);
- QChar accel=marked[b+1];
+ TQChar accel=marked[b+1];
int nb=newWord.find(accel,0,false);
if(nb>=0)
{
@@ -4308,9 +4308,9 @@ void KBabelView::spellResult(bool flag)
else if(spell.replaced > 0 && spell.what2Check!=Current
&& spell.what2Check!=Marked)
{
- QStringList list;
- QStringList::Iterator origIt;
- QStringList::Iterator newIt;
+ TQStringList list;
+ TQStringList::Iterator origIt;
+ TQStringList::Iterator newIt;
origIt=spell.origWords.begin();
newIt=spell.newWords.begin();
@@ -4332,12 +4332,12 @@ void KBabelView::spellResult(bool flag)
KURL url(_spellcheckSettings.ignoreURL);
if(url.isLocalFile())
{
- QFile file(url.path());
+ TQFile file(url.path());
if(file.open(IO_WriteOnly|IO_Append))
{
- QStringList::Iterator it;
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQStringList::Iterator it;
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
for(it=spell.newIgnoreList.begin();
it!=spell.newIgnoreList.end();
@@ -4368,7 +4368,7 @@ void KBabelView::spellResult(bool flag)
spell.kspell->cleanUp();
emit signalSpellcheckDone(s);
- QTimer::singleShot(0,this,SLOT(cleanUpSpellStruct()));
+ TQTimer::singleShot(0,this,TQT_SLOT(cleanUpSpellStruct()));
}
@@ -4420,7 +4420,7 @@ void KBabelView::cancelSpellcheck()
spell.active=false;
}
-void KBabelView::spellAddIgnore(const QString &word)
+void KBabelView::spellAddIgnore(const TQString &word)
{
if(!spell.ignoreList.contains(word))
{
@@ -4440,7 +4440,7 @@ void KBabelView::forwardSearchStop()
emit signalSearchActive(false);
}
-void KBabelView::forwardProgressStart(const QString& msg)
+void KBabelView::forwardProgressStart(const TQString& msg)
{
emit signalResetProgressBar(msg,100);
}
@@ -4458,16 +4458,16 @@ void KBabelView::slotAutoSaveTimeout( )
void KBabelView::useProject (Project::Ptr project)
{
// FIXME: close the current project first
- disconnect (_project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ disconnect (_project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
_project = project;
_catalog->useProject(_project);
readProject(_project);
- connect (project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
}
#include "kbabelview.moc"
diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h
index a52ed4dc..fb86cd6b 100644
--- a/kbabel/kbabel/kbabelview.h
+++ b/kbabel/kbabel/kbabelview.h
@@ -65,8 +65,8 @@ struct ModuleInfo;
#include <kdockwidget.h>
#include <kurl.h>
#include <kconfig.h>
-#include <qwidget.h>
-#include <qstrlist.h>
+#include <tqwidget.h>
+#include <tqstrlist.h>
#include <resources.h>
#include <catalogview.h>
@@ -90,7 +90,7 @@ class TagListView;
* @author Matthias Kiefer <matthias.kiefer@gmx.de>
* @version 0.1
*/
-class KBabelView : public QWidget, public KBabel::CatalogView
+class KBabelView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
@@ -109,16 +109,16 @@ public:
* @return the view, that has opened file url or 0 if this
* file is not opened
*/
- static KBabelView *viewForURL(const KURL& url, const QString project);
+ static KBabelView *viewForURL(const KURL& url, const TQString project);
/**
* @return the view, that has no opened file url or 0 if there
* is no such view
*/
- static KBabelView *emptyView(const QString project);
+ static KBabelView *emptyView(const TQString project);
KURL currentURL() const;
- QString project() const { return _project->filename(); }
+ TQString project() const { return _project->filename(); }
void useProject (KBabel::Project::Ptr project);
bool isLastView() const;
@@ -178,7 +178,7 @@ public:
KBCatalog* catalog() const{return _catalog;}
- void processUriDrop(KURL::List& uriList, const QPoint & pos);
+ void processUriDrop(KURL::List& uriList, const TQPoint & pos);
/**
* checks the status of the displayed entry: last, first, fuzzy,...
@@ -186,12 +186,12 @@ public:
*/
void emitEntryState();
- void setRMBEditMenu(QPopupMenu*);
- void setRMBSearchMenu(QPopupMenu*);
- void setTagsMenu(QPopupMenu*);
- void setArgsMenu(QPopupMenu*);
+ void setRMBEditMenu(TQPopupMenu*);
+ void setRMBSearchMenu(TQPopupMenu*);
+ void setTagsMenu(TQPopupMenu*);
+ void setArgsMenu(TQPopupMenu*);
- QPtrList<ModuleInfo> dictionaries();
+ TQPtrList<ModuleInfo> dictionaries();
KBabelDictBox* searchView() { return dictBox; }
bool autoDiffEnabled() const {return _diffEnabled;}
@@ -202,7 +202,7 @@ public slots:
/** opens a filedialog and asks for an url */
void open();
- void open(const KURL& url, const QString & package=QString::null, bool checkModified=true, bool newView=false);
+ void open(const KURL& url, const TQString & package=TQString::null, bool checkModified=true, bool newView=false);
void setFilePackage();
void revertToSaved();
@@ -217,8 +217,8 @@ public slots:
bool findNext();
bool findPrev();
void find();
- void findInFile(QCString fileSource, KBabel::FindOptions options);
- void replaceInFile(QCString fileSource, KBabel::ReplaceOptions options);
+ void findInFile(TQCString fileSource, KBabel::FindOptions options);
+ void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options);
void replace();
void selectAll();
void deselectAll();
@@ -259,7 +259,7 @@ public slots:
void insertNextTag();
void insertNextTagMsgid();
void insertNextArg();
- void insertTagFromTool( const QString& tag );
+ void insertTagFromTool( const TQString& tag );
void showTagsMenu();
void showArgsMenu();
void skipToNextTag();
@@ -282,23 +282,23 @@ public slots:
void stopSearch();
void startSearch();
void startSelectionSearch();
- void startSearch(const QString id);
- void startSelectionSearch(const QString id);
+ void startSearch(const TQString id);
+ void startSelectionSearch(const TQString id);
- void configureDictionary(const QString id);
- void editDictionary(const QString id);
- void aboutDictionary(const QString id);
+ void configureDictionary(const TQString id);
+ void editDictionary(const TQString id);
+ void aboutDictionary(const TQString id);
/**
* this was originally protected, but we need this to expose for
* KBabelMW forwarding
*/
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
protected:
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
- virtual bool eventFilter(QObject*, QEvent* event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
+ virtual bool eventFilter(TQObject*, TQEvent* event);
signals:
/** emited when a fuzzy catalogentry is shown */
@@ -346,15 +346,15 @@ signals:
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
+ void signalChangeCaption(const TQString& text);
void signalNewFileOpened(KURL url);
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
@@ -365,7 +365,7 @@ signals:
void signalForwardHistory(bool have);
void signalBackHistory(bool have);
- void ledColorChanged(const QColor& color);
+ void ledColorChanged(const TQColor& color);
void signalDictionariesChanged();
@@ -441,12 +441,12 @@ private:
* Inserts a text into the msgstr (into the current form) using undoable commands.
* if @param clearFirst is set to true, it will clear the contents of msgstr before inserting
*/
- void modifyMsgstrText(const uint offset, const QString& text, bool clearFirst=false);
+ void modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst=false);
protected slots:
- bool validateUsingTool( const KDataToolInfo & info, const QString & command );
- void modifyUsingTool( const KDataToolInfo & info, const QString & command );
- void modifyCatalogUsingTool( const KDataToolInfo & info, const QString & command );
+ bool validateUsingTool( const KDataToolInfo & info, const TQString & command );
+ void modifyUsingTool( const KDataToolInfo & info, const TQString & command );
+ void modifyCatalogUsingTool( const KDataToolInfo & info, const TQString & command );
private slots:
void msgstrPluralFormChanged (uint index);
@@ -455,7 +455,7 @@ private slots:
/** connected to the catalog. it is called when a new file is opened*/
void newFileOpened(bool readOnly);
- void showError(const QString& message);
+ void showError(const TQString& message);
void toggleFuzzyLed(bool on);
void toggleUntransLed(bool on);
@@ -493,7 +493,7 @@ private slots:
void informDictionary();
void setNewLanguage();
- void forwardProgressStart(const QString& msg);
+ void forwardProgressStart(const TQString& msg);
void forwardSearchStart();
void forwardSearchStop();
@@ -520,14 +520,14 @@ private slots:
void insertArg(int n);
void updateArgs();
- void insertChar(QChar ch);
+ void insertChar(TQChar ch);
void showTryLaterMessageBox();
void dummy(KSpell*) {}
private:
- static QPtrList<KBabelView> *viewList;
+ static TQPtrList<KBabelView> *viewList;
HidingMsgEdit* msgstrEdit;
HidingMsgEdit* msgidLabel;
@@ -537,7 +537,7 @@ private:
FindDialog* _replaceDialog;
ReplaceDialog* _replaceAskDialog;
- QPopupMenu* _dropMenu;
+ TQPopupMenu* _dropMenu;
KLed* _fuzzyLed;
KLed* _untransLed;
@@ -551,8 +551,8 @@ private:
bool _autoSearchTempDisabled;
- QValueList<uint> _backHistory;
- QValueList<uint> _forwardHistory;
+ TQValueList<uint> _backHistory;
+ TQValueList<uint> _forwardHistory;
// flag to not beep, when switching to the next entry, because
// go -> next or prev entry was used.
@@ -566,7 +566,7 @@ private:
/**
* the string that was marked during the last search
*/
- QString _lastFoundString;
+ TQString _lastFoundString;
/*
* flag, if internal find functions should break at end or ask for
@@ -590,13 +590,13 @@ private:
int _replaceExtraOffset;
/** appId for a source of the next files to be searched */
- QCString _fileSource;
+ TQCString _fileSource;
- QStringList _tags;
- QPopupMenu *_tagsMenu;
+ TQStringList _tags;
+ TQPopupMenu *_tagsMenu;
- QStringList _args;
- QPopupMenu *_argsMenu;
+ TQStringList _args;
+ TQPopupMenu *_argsMenu;
bool _diffEnabled;
bool _loadingDiffFile;
@@ -606,7 +606,7 @@ private:
* flag, set if editing KDE documentation PO-file
*/
bool _editingDocumentation;
- QPtrList<KDataTool> _autocheckTools;
+ TQPtrList<KDataTool> _autocheckTools;
//spellcheck things
private:
@@ -624,13 +624,13 @@ private:
{
KSpell *kspell;
KSpellConfig* config;
- QStringList wordList;
+ TQStringList wordList;
bool active;
int misspelled;
int replaced;
int posCorrection;
uint lastIndex;
- QPtrList<Position> posDict;
+ TQPtrList<Position> posDict;
SpellWhat what2Check;
// the last word, that was misspelled
@@ -639,11 +639,11 @@ private:
// needed if words with '-' are treated as seperate words
int inWordCorrection;
- QStringList origWords;
- QStringList newWords;
+ TQStringList origWords;
+ TQStringList newWords;
- QStringList ignoreList;
- QStringList newIgnoreList;
+ TQStringList ignoreList;
+ TQStringList newIgnoreList;
} spell;
struct {
@@ -665,23 +665,23 @@ private:
* @returns false, if the there is a synchronization error,
* means the word has not been found in the editor.
*/
- bool markMisspelled(const QString &orig, unsigned int pos);
+ bool markMisspelled(const TQString &orig, unsigned int pos);
private slots:
void spellcheck();
void cancelSpellcheck();
void spellStart(KSpell*);
- void spellMisspelled(const QString &orig, const QStringList &sug, unsigned int pos);
- void spellCorrected(const QString &orig, const QString &newWord, unsigned int pos);
+ void spellMisspelled(const TQString &orig, const TQStringList &sug, unsigned int pos);
+ void spellCorrected(const TQString &orig, const TQString &newWord, unsigned int pos);
void spellResult(bool);
void spellCleanDone();
- void spellAddIgnore(const QString &);
+ void spellAddIgnore(const TQString &);
// initialize spellchecking struct
void cleanUpSpellStruct();
void slotAutoSaveTimeout( );
private:
- void addSpellcheckWords(uint pos, QString text, uint index, uint form);
+ void addSpellcheckWords(uint pos, TQString text, uint index, uint form);
private:
// configuration file
@@ -692,7 +692,7 @@ private:
KBabel::RegExpExtractor* _tagExtractor;
KBabel::RegExpExtractor* _argExtractor;
- QTimer * autoSaveTimer;
+ TQTimer * autoSaveTimer;
int _autoSaveDelay;
int _currentTag;
diff --git a/kbabel/kbabel/kbabelview2.cpp b/kbabel/kbabel/kbabelview2.cpp
index c07990d0..101674a3 100644
--- a/kbabel/kbabel/kbabelview2.cpp
+++ b/kbabel/kbabel/kbabelview2.cpp
@@ -43,12 +43,12 @@
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
#include "catalogsettings.h"
#include "editcmd.h"
@@ -65,25 +65,25 @@
using namespace KBabel;
-QPtrList<ModuleInfo> KBabelView::dictionaries()
+TQPtrList<ModuleInfo> KBabelView::dictionaries()
{
- QPtrList<ModuleInfo> list = dictBox->moduleInfos();
+ TQPtrList<ModuleInfo> list = dictBox->moduleInfos();
return list;
}
-void KBabelView::configureDictionary(const QString id)
+void KBabelView::configureDictionary(const TQString id)
{
dictBox->configure(id);
}
-void KBabelView::editDictionary(const QString id)
+void KBabelView::editDictionary(const TQString id)
{
dictBox->edit(id);
}
-void KBabelView::aboutDictionary(const QString id)
+void KBabelView::aboutDictionary(const TQString id)
{
dictBox->aboutModule(id);
}
@@ -121,7 +121,7 @@ void KBabelView::setNewLanguage()
}
-void KBabelView::wheelEvent(QWheelEvent *e)
+void KBabelView::wheelEvent(TQWheelEvent *e)
{
if( _catalog->numberOfEntries() == 0 ) return;
@@ -196,12 +196,12 @@ void KBabelView::updateTags()
{
_tagsMenu->clear();
- QStringList tList;
- QStringList::Iterator it;
+ TQStringList tList;
+ TQStringList::Iterator it;
int counter=0;
for(it=_tags.begin(); it!=_tags.end(); ++it)
{
- QString s = *it;
+ TQString s = *it;
if( s.startsWith("&") ) s = "&"+s;
if(!tList.contains(s))
{
@@ -259,7 +259,7 @@ void KBabelView::selectTag()
// count number of eofs in tag
uint diff=0;
// FIXME: what about plural forms
- QString msgid = _catalog->msgid(_currentIndex).first();
+ TQString msgid = _catalog->msgid(_currentIndex).first();
for( uint i = _tagExtractor->matchIndex(_currentTag); i < _tagExtractor->matchIndex(_currentTag)+_tags[_currentTag].length()+1; i++ )
{
@@ -269,14 +269,14 @@ void KBabelView::selectTag()
emit signalNextTag (_currentTag);
}
-void KBabelView::setTagsMenu(QPopupMenu *menu)
+void KBabelView::setTagsMenu(TQPopupMenu *menu)
{
_tagsMenu=menu;
- connect(_tagsMenu,SIGNAL(activated(int)),this,SLOT(insertTag(int)));
+ connect(_tagsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertTag(int)));
}
-void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool clearFirst)
+void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst)
{
_catalog->applyBeginCommand( _currentIndex, Msgstr ,this);
@@ -296,7 +296,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool c
void KBabelView::insertTag(int n)
{
- QString tag = _tagsMenu->text(n);
+ TQString tag = _tagsMenu->text(n);
if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display
modifyMsgstrText( msgstrEdit->currentIndex(), tag );
@@ -324,9 +324,9 @@ void KBabelView::insertNextTagMsgid()
int offset = msgstrEdit->beginOfLastMarkedText(); //msgstrEdit->currentIndex();
- QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
+ TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
- QString t;
+ TQString t;
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
@@ -359,7 +359,7 @@ void KBabelView::showTagsMenu()
{
int y=msgstrEdit->height()/2;
int x=msgstrEdit->width()/2;
- _tagsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) );
+ _tagsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) );
return;
}
@@ -376,12 +376,12 @@ void KBabelView::updateArgs()
{
_argsMenu->clear();
- QStringList tList;
- QStringList::Iterator it;
+ TQStringList tList;
+ TQStringList::Iterator it;
int counter=0;
for(it=_args.begin(); it!=_args.end(); ++it)
{
- QString s = *it;
+ TQString s = *it;
if(!tList.contains(s))
{
_argsMenu->insertItem(s,counter);
@@ -403,17 +403,17 @@ void KBabelView::updateArgs()
}
}
-void KBabelView::setArgsMenu(QPopupMenu *menu)
+void KBabelView::setArgsMenu(TQPopupMenu *menu)
{
_argsMenu=menu;
- connect(_argsMenu,SIGNAL(activated(int)),this,SLOT(insertArg(int)));
+ connect(_argsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertArg(int)));
}
void KBabelView::insertArg(int n)
{
- QString arg = _argsMenu->text(n);
+ TQString arg = _argsMenu->text(n);
modifyMsgstrText( msgstrEdit->currentIndex(), arg );
}
@@ -422,7 +422,7 @@ void KBabelView::insertNextArg()
{
int offset = msgstrEdit->currentIndex();
- QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
+ TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
@@ -444,7 +444,7 @@ void KBabelView::insertNextArg()
return;
}
- QString t=_args[num];
+ TQString t=_args[num];
modifyMsgstrText( offset,t );
}
@@ -455,7 +455,7 @@ void KBabelView::showArgsMenu()
{
int y=msgstrEdit->height()/2;
int x=msgstrEdit->width()/2;
- _argsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) );
+ _argsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) );
return;
}
@@ -507,7 +507,7 @@ void KBabelView::diffInternal(bool autoDf)
_diffing = true;
uint diffIndex = _currentIndex;
- QString diffString;
+ TQString diffString;
Catalog::DiffResult r = _catalog->diff(_currentIndex, &diffString);
@@ -521,9 +521,9 @@ void KBabelView::diffInternal(bool autoDf)
bool wasEnabled=_diffEnabled;
_diffEnabled=false;
- QValueList<DiffEntry> diffList;
- QString error;
- QString package = _catalog->packageName()+".po";
+ TQValueList<DiffEntry> diffList;
+ TQString error;
+ TQString package = _catalog->packageName()+".po";
kdDebug(KBABEL) << "getting list for " << package << endl;
if(dictBox->messagesForPackage(package,diffList,error))
@@ -569,12 +569,12 @@ void KBabelView::diffInternal(bool autoDf)
case 2:
{
// get the list of all entries
- QValueList<DiffEntry> diffList = _catalog->asDiffList();
+ TQValueList<DiffEntry> diffList = _catalog->asDiffList();
- QValueList<DiffEntry> resultList;
+ TQValueList<DiffEntry> resultList;
// swap msgstr and msgid
- QValueList<DiffEntry>::iterator it;
+ TQValueList<DiffEntry>::iterator it;
DiffEntry entry;
for ( it = diffList.begin(); it != diffList.end(); ++it )
@@ -663,18 +663,18 @@ bool KBabelView::openDiffFile(bool autoDiff)
KURL poBaseURL( _project->catManSettings().poBaseDir );
- QString poBase = poBaseURL.path();
+ TQString poBase = poBaseURL.path();
int len = poBase.length();
if(fileURL.path().left(len) == poBase)
{
- QString fileRelPath = fileURL.path().mid(len);
+ TQString fileRelPath = fileURL.path().mid(len);
if(fileRelPath[0] == '/')
fileRelPath=fileRelPath.mid(1);
if(_project->settings()->diffBaseDir().right(1) != "/")
_project->settings()->diffBaseDir() += '/';
- QString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath;
+ TQString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath;
KURL diffFileURL(diffFilePath);
@@ -706,7 +706,7 @@ bool KBabelView::openDiffFile(bool autoDiff)
Catalog cat;
- connect(&cat,SIGNAL(signalProgress(int)),this,SIGNAL(signalProgress(int)));
+ connect(&cat,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(signalProgress(int)));
emit signalResetProgressBar(i18n("loading file for diff"),100);
ConversionStatus stat = cat.openURL(url);
@@ -786,19 +786,19 @@ void KBabelView::showTryLaterMessageBox()
this, "information", true, true,
KStdGuiItem::ok() );
- QVBox *topcontents = new QVBox (dialog);
+ TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
topcontents->setMargin(KDialog::marginHint()*2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout * lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout * lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint()*2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( i18n("The search string has not been found yet.\n"
+ TQLabel *label2 = new TQLabel( i18n("The search string has not been found yet.\n"
"However, the string might be found "
"in the files being searched at the moment.\n"
"Please try later."), contents);
@@ -807,11 +807,11 @@ void KBabelView::showTryLaterMessageBox()
lay->add( label2 );
lay->addStretch(1);
- QCheckBox *checkbox = new QCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
+ TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
dialog->setMainWidget(topcontents);
dialog->enableButtonSeparator(false);
- dialog->incInitialSize( QSize(50,0) );
+ dialog->incInitialSize( TQSize(50,0) );
dialog->exec();
@@ -822,7 +822,7 @@ void KBabelView::showTryLaterMessageBox()
void KBabelView::setFilePackage()
{
bool result=false;
- QString p = KInputDialog::getText(QString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this);
+ TQString p = KInputDialog::getText(TQString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this);
if( result )
{
_catalog->setPackage(p);
@@ -830,7 +830,7 @@ void KBabelView::setFilePackage()
}
}
-void KBabelView::insertTagFromTool( const QString& tag )
+void KBabelView::insertTagFromTool( const TQString& tag )
{
modifyMsgstrText(msgstrEdit->currentIndex(),tag);
@@ -848,14 +848,14 @@ void KBabelView::plural2msgstr()
int currentFormBegin, currentFormEnd, pos;
uint i;
- QStringList msgs = _catalog->msgstr(_currentIndex);
- QString text= *msgs.at(msgstrEdit->currentForm());
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
+ TQString text= *msgs.at(msgstrEdit->currentForm());
uint numForms = _catalog->numberOfPluralForms(_currentIndex);
if( text.isEmpty() || _catalog->pluralForm(_currentIndex) == NoPluralForm) return;
- QString result;
+ TQString result;
switch( _catalog->pluralForm(_currentIndex) )
{
@@ -864,7 +864,7 @@ void KBabelView::plural2msgstr()
_catalog->applyBeginCommand( _currentIndex, Msgstr ,this);
i=0;
- for( QStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it )
+ for( TQStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it )
{
if( i!= msgstrEdit->currentForm() )
{
@@ -912,7 +912,7 @@ void KBabelView::plural2msgstr()
text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin);
- QString result=text;
+ TQString result=text;
for( i=1; i<numForms ; i++ )
result+="\\n\n"+text;
@@ -925,7 +925,7 @@ void KBabelView::plural2msgstr()
}
-bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &command )
+bool KBabelView::validateUsingTool( const KDataToolInfo & info, const TQString &command )
{
if(currentURL().isEmpty())
return false;
@@ -940,7 +940,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &c
bool result=_catalog->checkUsingTool(tool);
emitEntryState();
- QString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
+ TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
if(result)
{
@@ -972,7 +972,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &c
return result;
}
-void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &command )
+void KBabelView::modifyUsingTool( const KDataToolInfo & info, const TQString &command )
{
KDataTool* tool = info.createTool();
if( !tool )
@@ -987,7 +987,7 @@ void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &com
delete tool;
}
-void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QString &command )
+void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const TQString &command )
{
KDataTool* tool = info.createTool();
if( !tool )
@@ -1002,7 +1002,7 @@ void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QStri
delete tool;
}
-void KBabelView::insertChar( QChar ch )
+void KBabelView::insertChar( TQChar ch )
{
if( isReadOnly() || _catalog->package().isEmpty() )
return;
diff --git a/kbabel/kbabel/kbbookmarkhandler.cpp b/kbabel/kbabel/kbbookmarkhandler.cpp
index fde1b051..2685905b 100644
--- a/kbabel/kbabel/kbbookmarkhandler.cpp
+++ b/kbabel/kbabel/kbbookmarkhandler.cpp
@@ -31,15 +31,15 @@
**************************************************************************** */
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include "kbbookmarkhandler.h"
// implementation of KBabelBookmark
-KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext)
+KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext)
{
_msgindex = msgindex;
if (msgtext.length() > 32) {
@@ -49,7 +49,7 @@ KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext)
// insert one '&' before every consecutive group of ampersands to keep the
// first of these from acting either as accelerator or mask in the menu
- QRegExp rx("&+");
+ TQRegExp rx("&+");
int pos = msgtext.find(rx);
while (pos >= 0) {
msgtext.insert(pos, '&');
@@ -64,14 +64,14 @@ int KBabelBookmark::msgindex() const
return _msgindex;
}
-QString KBabelBookmark::msgtext() const
+TQString KBabelBookmark::msgtext() const
{
return _msgtext;
}
// implementation of KBabelBookmarkHandler
-KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu)
+KBabelBookmarkHandler::KBabelBookmarkHandler(TQPopupMenu* menu)
{
_menu = menu;
_list.setAutoDelete(true);
@@ -80,7 +80,7 @@ KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu)
void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b)
{
// check if a bookmark to the current msgid exists already
- QPtrListIterator<KBabelBookmark> it(_list);
+ TQPtrListIterator<KBabelBookmark> it(_list);
KBabelBookmark* temp;
while((temp = it.current()) != 0) {
@@ -94,18 +94,18 @@ void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b)
// if it's okay then add the bookmark
_list.append(b);
- _menu->insertItem(QString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()),
- this, SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex());
+ _menu->insertItem(TQString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()),
+ this, TQT_SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex());
}
-void KBabelBookmarkHandler::addBookmark(int msgindex, QString msgtext)
+void KBabelBookmarkHandler::addBookmark(int msgindex, TQString msgtext)
{
addBookmark(new KBabelBookmark(msgindex, msgtext));
}
-void KBabelBookmarkHandler::setBookmarks(QPtrList<KBabelBookmark> list)
+void KBabelBookmarkHandler::setBookmarks(TQPtrList<KBabelBookmark> list)
{
- QPtrListIterator<KBabelBookmark> it(list);
+ TQPtrListIterator<KBabelBookmark> it(list);
KBabelBookmark* temp;
while((temp = it.current()) != 0) {
@@ -114,7 +114,7 @@ void KBabelBookmarkHandler::setBookmarks(QPtrList<KBabelBookmark> list)
}
}
-QPtrList<KBabelBookmark> KBabelBookmarkHandler::bookmarks() const
+TQPtrList<KBabelBookmark> KBabelBookmarkHandler::bookmarks() const
{
return _list;
}
diff --git a/kbabel/kbabel/kbbookmarkhandler.h b/kbabel/kbabel/kbbookmarkhandler.h
index f47c2dbf..42e94959 100644
--- a/kbabel/kbabel/kbbookmarkhandler.h
+++ b/kbabel/kbabel/kbbookmarkhandler.h
@@ -34,8 +34,8 @@
#ifndef KBBOOKMARKHANDLER_H
#define KBBOOKMARKHANDLER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class QPopupMenu;
class QString;
@@ -55,7 +55,7 @@ class KBabelBookmark
* @param msgindex the index of the bookmarked msgid.
* @param msgtext the msgid.
*/
- KBabelBookmark(int msgindex, QString msgtext);
+ KBabelBookmark(int msgindex, TQString msgtext);
/**
* Return the index of the msgid.
@@ -68,7 +68,7 @@ class KBabelBookmark
*
* @return the msgid.
*/
- QString msgtext() const;
+ TQString msgtext() const;
private:
/**
@@ -78,7 +78,7 @@ class KBabelBookmark
/**
* The classes' own copy of the msgid.
*/
- QString _msgtext;
+ TQString _msgtext;
};
@@ -96,7 +96,7 @@ class KBabelBookmarkHandler : public QObject
* @param menu the pointer to the menu where the bookmarks will be
* displayed.
*/
- KBabelBookmarkHandler(QPopupMenu* menu);
+ KBabelBookmarkHandler(TQPopupMenu* menu);
/**
* Add a bookmark.
@@ -113,20 +113,20 @@ class KBabelBookmarkHandler : public QObject
* @param msgindex the index of the bookmark's msgid.
* @param msgtext the msgindex of the bookmark to be added.
*/
- void addBookmark(int msgindex, QString msgtext);
+ void addBookmark(int msgindex, TQString msgtext);
/**
* Provide the handler with a list of bookmarks.
* Especially useful when creating a new view of the KBabel window.
*
* @param list the list to be copied.
*/
- void setBookmarks(QPtrList<KBabelBookmark> list);
+ void setBookmarks(TQPtrList<KBabelBookmark> list);
/**
* Return the list of bookmarks for a new view of the KBabel window.
*
* @return the internal list of bookmarks
*/
- QPtrList<KBabelBookmark> bookmarks() const;
+ TQPtrList<KBabelBookmark> bookmarks() const;
public slots:
/**
@@ -145,11 +145,11 @@ class KBabelBookmarkHandler : public QObject
/**
* The pointer to the menu.
*/
- QPopupMenu* _menu;
+ TQPopupMenu* _menu;
/**
* The internal list for storing the bookmarks.
*/
- QPtrList<KBabelBookmark> _list;
+ TQPtrList<KBabelBookmark> _list;
};
#endif // KBBOOKMARKHANDLER_H
diff --git a/kbabel/kbabel/kbcatalog.cpp b/kbabel/kbabel/kbcatalog.cpp
index 52205484..4c4e269a 100644
--- a/kbabel/kbabel/kbcatalog.cpp
+++ b/kbabel/kbabel/kbcatalog.cpp
@@ -35,7 +35,7 @@
#include "headereditor.h"
-KBCatalog::KBCatalog(QString configFile, QObject* parent, const char* name)
+KBCatalog::KBCatalog(TQString configFile, TQObject* parent, const char* name)
: KBabel::Catalog(parent,name,configFile)
{
_headerEditor=0;
diff --git a/kbabel/kbabel/kbcatalog.h b/kbabel/kbabel/kbcatalog.h
index ae6508cf..2c2846d4 100644
--- a/kbabel/kbabel/kbcatalog.h
+++ b/kbabel/kbabel/kbcatalog.h
@@ -48,7 +48,7 @@ class KBCatalog : public KBabel::Catalog
Q_OBJECT
public:
- KBCatalog(QString configFile = QString::null ,QObject* parent=0, const char* name=0);
+ KBCatalog(TQString configFile = TQString::null ,TQObject* parent=0, const char* name=0);
virtual ~KBCatalog();
HeaderEditor* headerEditor();
diff --git a/kbabel/kbabel/kbcataloglistview.cpp b/kbabel/kbabel/kbcataloglistview.cpp
index 51f9b008..e04da3c2 100644
--- a/kbabel/kbabel/kbcataloglistview.cpp
+++ b/kbabel/kbabel/kbcataloglistview.cpp
@@ -28,17 +28,17 @@
#include <klocale.h>
#include <klistview.h>
-#include <qcolor.h>
-#include <qlayout.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
#include <kglobalsettings.h>
using namespace KBabel;
-KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project)
- : QWidget(parent)
+KBCatalogListView::KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project)
+ : TQWidget(parent)
{
m_catalog= catalog;
- QVBoxLayout* layout=new QVBoxLayout(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(this);
m_listview = new KListView(this, "catalogListView");
m_listview->addColumn(i18n("Id"));
@@ -52,7 +52,7 @@ KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel
layout->addWidget(m_listview);
layout->setStretchFactor(m_listview,1);
- connect(m_listview,SIGNAL(selectionChanged(QListViewItem *)), this,SLOT(selectionChanged(QListViewItem *)));
+ connect(m_listview,TQT_SIGNAL(selectionChanged(TQListViewItem *)), this,TQT_SLOT(selectionChanged(TQListViewItem *)));
}
KBCatalogListView::~KBCatalogListView()
@@ -60,7 +60,7 @@ KBCatalogListView::~KBCatalogListView()
}
-void KBCatalogListView::selectionChanged ( QListViewItem * item)
+void KBCatalogListView::selectionChanged ( TQListViewItem * item)
{
DocPosition pos;
int number = m_items->find(reinterpret_cast<KBCatalogListViewItem*>(item));
@@ -74,7 +74,7 @@ void KBCatalogListView::selectionChanged ( QListViewItem * item)
void KBCatalogListView::setSelectedItem(int index)
{
- QListViewItem * item = m_items->at(index);
+ TQListViewItem * item = m_items->at(index);
// block signals - don't reemit the selected item signal
blockSignals(true);
@@ -100,7 +100,7 @@ void KBCatalogListView::update(EditCommand* cmd, bool undo)
*/
}
-void KBCatalogListView::msgstrChanged(const QString& str)
+void KBCatalogListView::msgstrChanged(const TQString& str)
{
KBCatalogListViewItem * item = reinterpret_cast<KBCatalogListViewItem *>(m_listview->selectedItem());
item->setMsgStr(str);
@@ -112,12 +112,12 @@ void KBCatalogListView::slotNewFileOpened()
KBCatalogListViewItem * tempItem;
if(m_catalog)
{
- m_items = new QPtrVector<KBCatalogListViewItem>(m_catalog->numberOfEntries());
+ m_items = new TQPtrVector<KBCatalogListViewItem>(m_catalog->numberOfEntries());
for(uint i=0;i<m_catalog->numberOfEntries();i++)
{
- QString msgid = ( *m_catalog->msgid(i).at(0) );
- QString msgstr = ( *m_catalog->msgstr(i).at(0) );
+ TQString msgid = ( *m_catalog->msgid(i).at(0) );
+ TQString msgstr = ( *m_catalog->msgstr(i).at(0) );
tempItem = new KBCatalogListViewItem(m_listview,0,i+1,
msgid,
msgstr);
diff --git a/kbabel/kbabel/kbcataloglistview.h b/kbabel/kbabel/kbcataloglistview.h
index d9737871..c2c46bdf 100644
--- a/kbabel/kbabel/kbcataloglistview.h
+++ b/kbabel/kbabel/kbcataloglistview.h
@@ -23,11 +23,11 @@
#ifndef KBCATALOGLISTVIEW_H
#define KBCATALOGLISTVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <catalogview.h>
#include <kconfig.h>
-#include <qwidget.h>
-//#include <qstrlist.h>
+#include <tqwidget.h>
+//#include <tqstrlist.h>
#include <resources.h>
#include "catalog.h"
#include "kbcatalog.h"
@@ -47,11 +47,11 @@ class KListView;
/**
@author
*/
-class KBCatalogListView : public QWidget, public KBabel::CatalogView
+class KBCatalogListView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
- KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project);
+ KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project);
~KBCatalogListView();
@@ -68,15 +68,15 @@ signals:
public slots:
virtual void slotNewFileOpened();
- void msgstrChanged(const QString&);
+ void msgstrChanged(const TQString&);
private:
KListView * m_listview;
KBCatalog* m_catalog;
- QPtrVector<KBCatalogListViewItem>* m_items;
+ TQPtrVector<KBCatalogListViewItem>* m_items;
private slots:
- void selectionChanged ( QListViewItem * item);
+ void selectionChanged ( TQListViewItem * item);
};
#endif
diff --git a/kbabel/kbabel/kbcataloglistviewitem.cpp b/kbabel/kbabel/kbcataloglistviewitem.cpp
index 5a4012a2..4bbc3049 100644
--- a/kbabel/kbabel/kbcataloglistviewitem.cpp
+++ b/kbabel/kbabel/kbcataloglistviewitem.cpp
@@ -23,10 +23,10 @@
#include "kbcataloglistviewitem.h"
#include <assert.h>
-KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr)
+KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr)
: Super(lv, parent, "","",""), m_id(id), m_msgid(msgid), m_msgstr(msgstr)
{
- setText(0,QString::number(id));
+ setText(0,TQString::number(id));
}
@@ -34,14 +34,14 @@ KBCatalogListViewItem::~KBCatalogListViewItem()
{
}
-void KBCatalogListViewItem::setMsgId(const QString& st)
+void KBCatalogListViewItem::setMsgId(const TQString& st)
{
m_msgid = st;
setup();
repaint();
}
-void KBCatalogListViewItem::setMsgStr(const QString& st)
+void KBCatalogListViewItem::setMsgStr(const TQString& st)
{
m_msgstr = st;
setup();
@@ -60,10 +60,10 @@ void KBCatalogListViewItem::setId(const uint id)
repaint();
}
-QString KBCatalogListViewItem::key ( int column, bool ascending ) const{
+TQString KBCatalogListViewItem::key ( int column, bool ascending ) const{
if(column==0)
- return QString().sprintf("%.8u", m_id);
+ return TQString().sprintf("%.8u", m_id);
else if(column==1)
return m_msgid;
else if(column==2)
@@ -84,7 +84,7 @@ void KBCatalogListViewItem::setup()
makeDocAvailable();
- QListView* lv = listView();
+ TQListView* lv = listView();
m_doc_msgid->setWidth(std::max(1, int(lv->columnWidth(1))));
m_doc_msgstr->setWidth(std::max(1, int(lv->columnWidth(2))));
@@ -97,7 +97,7 @@ void KBCatalogListViewItem::setup()
}
-void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintMsgIdCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
// check width
@@ -123,11 +123,11 @@ void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg,
// draw it
- m_doc_msgid->draw(p, 0, 0, QRect(0,0, width, height()), cg);
+ m_doc_msgid->draw(p, 0, 0, TQRect(0,0, width, height()), cg);
}
-void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintMsgStrCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
// check width
@@ -162,11 +162,11 @@ void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg,
// draw it
- m_doc_msgstr->draw(p, 0, 0, QRect(0,0, width, height()), cg);
+ m_doc_msgstr->draw(p, 0, 0, TQRect(0,0, width, height()), cg);
}
-void KBCatalogListViewItem::paintCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
assert(m_doc_msgid.get() && m_doc_msgstr.get() && p);
@@ -195,16 +195,16 @@ void KBCatalogListViewItem::makeDocAvailable()
assert(listView());
- m_doc_msgid.reset(new QSimpleRichText(
+ m_doc_msgid.reset(new TQSimpleRichText(
formatMsg(m_msgid), listView()->font()));
- m_doc_msgstr.reset(new QSimpleRichText(
+ m_doc_msgstr.reset(new TQSimpleRichText(
formatMsg(m_msgstr), listView()->font()));
}
-QString KBCatalogListViewItem::formatMsg(const QString str)
+TQString KBCatalogListViewItem::formatMsg(const TQString str)
{
// TODO: Use KBHighlighting for this
- QString tmp_msgid = str;
+ TQString tmp_msgid = str;
tmp_msgid = tmp_msgid.replace( "\\n", "<br>" );
tmp_msgid = tmp_msgid.replace( "<", "&lt;" );
tmp_msgid = tmp_msgid.replace( ">", "&gt;" );
diff --git a/kbabel/kbabel/kbcataloglistviewitem.h b/kbabel/kbabel/kbcataloglistviewitem.h
index 8fa6704a..4a24c159 100644
--- a/kbabel/kbabel/kbcataloglistviewitem.h
+++ b/kbabel/kbabel/kbcataloglistviewitem.h
@@ -24,7 +24,7 @@
#define KBCATALOGLISTVIEWITEM_H
#include <memory>
#include <klistview.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
#include "mymultilineedit.h"
/**
@@ -34,39 +34,39 @@ class KBCatalogListViewItem : public KListViewItem
{
typedef KListViewItem Super;
public:
- KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr);
+ KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr);
~KBCatalogListViewItem();
- void setMsgId(const QString& st);
- void setMsgStr(const QString& st);
+ void setMsgId(const TQString& st);
+ void setMsgStr(const TQString& st);
void setId(const uint id);
uint getId();
protected:
virtual void setup();
- virtual QString key ( int column, bool ascending ) const;
+ virtual TQString key ( int column, bool ascending ) const;
- virtual void paintCell(QPainter* p, const QColorGroup& cg,
+ virtual void paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
private:
void makeDocAvailable();
- void paintMsgIdCell(QPainter* p, const QColorGroup& cg,
+ void paintMsgIdCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
- void paintMsgStrCell(QPainter* p, const QColorGroup& cg,
+ void paintMsgStrCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
- QString formatMsg(const QString str);
+ TQString formatMsg(const TQString str);
uint m_id;
- QString m_msgid;
- QString m_msgstr;
+ TQString m_msgid;
+ TQString m_msgstr;
- std::auto_ptr<QSimpleRichText> m_doc_msgid;
- std::auto_ptr<QSimpleRichText> m_doc_msgstr;
+ std::auto_ptr<TQSimpleRichText> m_doc_msgid;
+ std::auto_ptr<TQSimpleRichText> m_doc_msgstr;
};
#endif
diff --git a/kbabel/kbabel/kbcatalogview.cpp b/kbabel/kbabel/kbcatalogview.cpp
index ba8e9c03..ae701c4e 100644
--- a/kbabel/kbabel/kbcatalogview.cpp
+++ b/kbabel/kbabel/kbcatalogview.cpp
@@ -36,8 +36,8 @@
using namespace KBabel;
-KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr project)
- : QWidget (parent), KBabel::CatalogView () , _project (project)
+KBCatalogView::KBCatalogView(KBCatalog* catalog, TQWidget* parent, Project::Ptr project)
+ : TQWidget (parent), KBabel::CatalogView () , _project (project)
{
if (catalog == 0)
kdFatal(KBABEL) << "catalog==0" << endl;
@@ -49,8 +49,8 @@ KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr p
_currentIndex=1; // here we use 1 to accept update at opening a file
- connect ( _project, SIGNAL (signalSettingsChanged()), this, SLOT (readProjectSettings()) );
- connect ( _catalog, SIGNAL (signalFileOpened(bool)), this, SLOT (readFileSettings() ) );
+ connect ( _project, TQT_SIGNAL (signalSettingsChanged()), this, TQT_SLOT (readProjectSettings()) );
+ connect ( _catalog, TQT_SIGNAL (signalFileOpened(bool)), this, TQT_SLOT (readFileSettings() ) );
readProjectSettings();
readFileSettings();
diff --git a/kbabel/kbabel/kbcatalogview.h b/kbabel/kbabel/kbcatalogview.h
index 5f23381a..355e2a4c 100644
--- a/kbabel/kbabel/kbcatalogview.h
+++ b/kbabel/kbabel/kbcatalogview.h
@@ -33,21 +33,21 @@
#ifndef KBCATALOGVIEW_H
#define KBCATALOGVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <catalogview.h>
#include "kbcatalog.h"
#include "kbproject.h"
#include "projectsettings.h"
-class KBCatalogView : public QWidget, public KBabel::CatalogView
+class KBCatalogView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
/**
* Default constructor
*/
- KBCatalogView(KBCatalog* catalog, QWidget* parent, KBabel::Project::Ptr project);
+ KBCatalogView(KBCatalog* catalog, TQWidget* parent, KBabel::Project::Ptr project);
/**
* Destructor
diff --git a/kbabel/kbabel/kbcharselect.cpp b/kbabel/kbabel/kbcharselect.cpp
index 63316255..8dd87bcc 100644
--- a/kbabel/kbabel/kbcharselect.cpp
+++ b/kbabel/kbabel/kbcharselect.cpp
@@ -37,32 +37,32 @@
#include <kdialog.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qscrollview.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqscrollview.h>
-KBCharSelect::KBCharSelect(QWidget* parent,const char* name)
- : QVBox(parent,name)
+KBCharSelect::KBCharSelect(TQWidget* parent,const char* name)
+ : TQVBox(parent,name)
{
setSpacing( KDialog::spacingHint() );
- QHBox* bar = new QHBox(this);
+ TQHBox* bar = new TQHBox(this);
bar->setSpacing( KDialog::spacingHint() );
- QLabel *lTable = new QLabel( i18n( "Table:" ), bar );
- _tableNum = new QSpinBox( 0, 255, 1, bar );
+ TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar );
+ _tableNum = new TQSpinBox( 0, 255, 1, bar );
lTable->setBuddy( _tableNum );
bar->setStretchFactor( _tableNum, 1 );
- QScrollView* scroll = new QScrollView( this );
+ TQScrollView* scroll = new TQScrollView( this );
_table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0);
_table->setNumCols(16);
_table->setNumRows(16);
scroll->addChild(_table);
- connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) );
- connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) ));
+ connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) );
+ connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) ));
}
void KBCharSelect::emitChar()
@@ -80,7 +80,7 @@ void KBCharSelect::saveSettings(KConfig* config)
KConfigGroupSaver saver(config, "KBCharSelector" );
config->writeEntry( "TableNum", _tableNum->value() );
- config->writeEntry( "SelectedChar", QString(_table->chr()) );
+ config->writeEntry( "SelectedChar", TQString(_table->chr()) );
}
void KBCharSelect::restoreSettings(KConfig* config)
diff --git a/kbabel/kbabel/kbcharselect.h b/kbabel/kbabel/kbcharselect.h
index 4de3460f..7b42318c 100644
--- a/kbabel/kbabel/kbcharselect.h
+++ b/kbabel/kbabel/kbcharselect.h
@@ -33,7 +33,7 @@
#ifndef KBCHARSELECT_H
#define KBCHARSELECT_H
-#include <qvbox.h>
+#include <tqvbox.h>
class KConfig;
class KCharSelectTable;
@@ -43,13 +43,13 @@ class KBCharSelect : public QVBox
{
Q_OBJECT
public:
- KBCharSelect(QWidget* parent, const char* name=0);
+ KBCharSelect(TQWidget* parent, const char* name=0);
void saveSettings(KConfig* config);
void restoreSettings(KConfig* config);
signals:
- void characterDoubleClicked( QChar ch );
+ void characterDoubleClicked( TQChar ch );
public slots:
void emitChar();
@@ -59,7 +59,7 @@ private slots:
private:
KCharSelectTable* _table;
- QSpinBox* _tableNum;
+ TQSpinBox* _tableNum;
};
#endif // KBCHARSELECT_H
diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp
index ce58c483..3d555d7b 100644
--- a/kbabel/kbabel/kbhighlighting.cpp
+++ b/kbabel/kbabel/kbhighlighting.cpp
@@ -34,10 +34,10 @@
**************************************************************************** */
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextedit.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextedit.h>
#include "kapplication.h"
#include <kconfig.h>
@@ -49,7 +49,7 @@
#include "kbhighlighting.h"
#include "resources.h"
-KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObject()
+KBabelHighlighter::KBabelHighlighter( TQTextEdit * edit, KSpell *spell ) : TQObject()
, _edit( edit )
, syntaxHighlighting(true)
, mSpell(0), alwaysEndsWithSpace(true)
@@ -74,7 +74,7 @@ KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObjec
readSettings( );
regexps << accelMarker + "[\\w]";
- connect( _edit, SIGNAL( textChanged( ) ), this, SLOT( highlight( ) ) );
+ connect( _edit, TQT_SIGNAL( textChanged( ) ), this, TQT_SLOT( highlight( ) ) );
setSpellChecker(spell);
}
@@ -97,10 +97,10 @@ void KBabelHighlighter::highlight( )
// create a single line out of the text: remove "\n", so that we only
// have to deal with one single line of text.
- QString text = _edit->text( );
+ TQString text = _edit->text( );
text.replace( "\n", "" );
- QRegExp rx;
+ TQRegExp rx;
int pos;
if (syntaxHighlighting)
@@ -180,7 +180,7 @@ void KBabelHighlighter::doHighlighting( HighlightType type, int pos, int length
_edit->removeSelection( );
}
-void KBabelHighlighter::setHighlightColor( HighlightType type, QColor color )
+void KBabelHighlighter::setHighlightColor( HighlightType type, TQColor color )
{
colors[type] = color;
}
@@ -195,7 +195,7 @@ void KBabelHighlighter::readSettings( )
// FIXME: does not care about different projects yet
KConfig * config = KGlobal::config( );
config->setGroup( "Misc" );
- QString temp = config->readEntry( "AccelMarker", "&" );
+ TQString temp = config->readEntry( "AccelMarker", "&" );
accelMarker = temp[0];
}
@@ -210,14 +210,14 @@ void KBabelHighlighter::flushCurrentWord()
currentPos++;
}
- QChar ch;
+ TQChar ch;
while ((ch = currentWord[(int) currentWord.length() - 1]).isPunct()
&& ch != '(' && ch != '@')
currentWord.truncate( currentWord.length() - 1 );
// try to remove tags (they might not be fully compliant, but
// we don't want to check them anyway
- QRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|(</[-_.:A-Za-z0-9]*[\\s]*>)");
+ TQRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|(</[-_.:A-Za-z0-9]*[\\s]*>)");
if( tags.search (currentWord) != -1 )
{
currentPos += tags.matchedLength();
@@ -228,7 +228,7 @@ void KBabelHighlighter::flushCurrentWord()
if (!currentWord.isEmpty()) {
bool isPlainWord = true;
for (int i = 0; i < (int) currentWord.length(); i++) {
- QChar ch = currentWord[i];
+ TQChar ch = currentWord[i];
if (ch.upper() == ch) {
isPlainWord = false;
break;
@@ -241,15 +241,15 @@ void KBabelHighlighter::flushCurrentWord()
currentWord = "";
}
-QDict<int> KBabelHighlighter::dict(50021);
+TQDict<int> KBabelHighlighter::dict(50021);
-bool KBabelHighlighter::isMisspelled(const QString& wordRaw)
+bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
{
// We have to treat ampersands (like in "&go" or "g&o") in a special way.
// they must not break the word. And we cannot change the parameter, as
// then the highlight would be one character short. So we have to copy the
// word first.
- QString word = wordRaw;
+ TQString word = wordRaw;
kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl;
word.replace("&", "" );
kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl;
@@ -271,8 +271,8 @@ bool KBabelHighlighter::isMisspelled(const QString& wordRaw)
return false;
}
-void KBabelHighlighter::slotMisspelling(const QString & originalword,
- const QStringList & suggestions, unsigned int)
+void KBabelHighlighter::slotMisspelling(const TQString & originalword,
+ const TQStringList & suggestions, unsigned int)
{
kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl;
dict.replace( originalword, NotOkay );
@@ -285,8 +285,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell )
{
if( mSpell )
{
- disconnect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int)));
+ disconnect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int)));
// cleanup the cache
dict.clear();
@@ -296,8 +296,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell )
if( mSpell )
{
- connect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int)));
+ connect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int)));
// wait for KSpell to startup correctly
kapp->processEvents(500);
diff --git a/kbabel/kbabel/kbhighlighting.h b/kbabel/kbabel/kbhighlighting.h
index 91a6202d..fe93e0ef 100644
--- a/kbabel/kbabel/kbhighlighting.h
+++ b/kbabel/kbabel/kbhighlighting.h
@@ -37,10 +37,10 @@
#ifndef KBHIGHLIGHTING_H
#define KBHIGHLIGHTING_H
-#include <qmemarray.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqmemarray.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KSpell;
class QColor;
@@ -63,21 +63,21 @@ class KBabelHighlighter : public QObject
SpellcheckError
};
- KBabelHighlighter( QTextEdit * edit, KSpell *spell );
+ KBabelHighlighter( TQTextEdit * edit, KSpell *spell );
- void setHighlightColor( HighlightType type, QColor color );
+ void setHighlightColor( HighlightType type, TQColor color );
void setHasErrors( bool err );
void setSpellChecker( KSpell* spell);
- bool isMisspelled(const QString& word);
+ bool isMisspelled(const TQString& word);
public slots:
void highlight( );
void setSyntaxHighlighting( bool enable );
protected slots:
- void slotMisspelling (const QString & originalword,
- const QStringList & suggestions, unsigned int pos);
+ void slotMisspelling (const TQString & originalword,
+ const TQStringList & suggestions, unsigned int pos);
private:
void doHighlighting( HighlightType type, int pos, int length );
@@ -85,18 +85,18 @@ class KBabelHighlighter : public QObject
void flushCurrentWord();
private:
- QTextEdit * _edit;
+ TQTextEdit * _edit;
bool syntaxHighlighting;
- QStringList regexps;
- QMemArray<QColor> colors;
+ TQStringList regexps;
+ TQMemArray<TQColor> colors;
bool _hasErrors;
- QString accelMarker;
+ TQString accelMarker;
- static QDict<int> dict;
- QGuardedPtr<KSpell> mSpell;
- QString currentWord;
+ static TQDict<int> dict;
+ TQGuardedPtr<KSpell> mSpell;
+ TQString currentWord;
int currentPos;
bool alwaysEndsWithSpace;
};
diff --git a/kbabel/kbabel/main.cpp b/kbabel/kbabel/main.cpp
index 40c28926..5758d563 100644
--- a/kbabel/kbabel/main.cpp
+++ b/kbabel/kbabel/main.cpp
@@ -49,41 +49,41 @@
#include <kuniqueapplication.h>
#include <kwin.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
class KBabelInterface : public KBabelIface
{
public:
KBabelInterface();
- virtual void openURL(QCString url, QCString package, WId window, int newWindow);
- virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile);
- virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow );
- virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile );
- virtual void gotoFileEntry(QCString url, QCString msgid);
- virtual void gotoFileEntry(QCString url, QCString package, int msgid);
- virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile);
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow);
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile);
+ virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow );
+ virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile );
+ virtual void gotoFileEntry(TQCString url, TQCString msgid);
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid);
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile);
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave);
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave);
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project );
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project );
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project );
- virtual void spellcheck(QStringList fileList);
+ int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project );
+ virtual void spellcheck(TQStringList fileList);
private:
- KBabelMW* findInstance( const KURL& url, const QString& project, const QString& package) const;
+ KBabelMW* findInstance( const KURL& url, const TQString& project, const TQString& package) const;
};
@@ -130,8 +130,8 @@ int KBabelApp::newInstance()
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QTimer timer;
- QWidget *splash=0;
+ TQTimer timer;
+ TQWidget *splash=0;
bool showSplash=args->isSet("splash");
if( showSplash && first )
@@ -142,10 +142,10 @@ int KBabelApp::newInstance()
timer.start(4000,true);
}
- QString projectFile=args->getOption("project");
+ TQString projectFile=args->getOption("project");
if( !projectFile.isEmpty() )
{
- QFileInfo fi(projectFile);
+ TQFileInfo fi(projectFile);
projectFile = fi.absFilePath();
}
else
@@ -155,11 +155,11 @@ int KBabelApp::newInstance()
}
kdDebug() << "Project: " << projectFile << endl;
- QCString msgid=args->getOption("gotomsgid");
+ TQCString msgid=args->getOption("gotomsgid");
if(!msgid.isEmpty() && args->count() > 0)
{
kdDebug(KBABEL) << "gotomsgid" << endl;
- QString m = QString::fromLocal8Bit(msgid);
+ TQString m = TQString::fromLocal8Bit(msgid);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -187,7 +187,7 @@ int KBabelApp::newInstance()
widget->show();
for (int i=0; i < args->count(); i++)
{
- widget->open( args->url(i) , QString::null, i != 0 );
+ widget->open( args->url(i) , TQString::null, i != 0 );
}
kdDebug () << "Resuming DCOP" << endl;
@@ -223,18 +223,18 @@ KBabelInterface::KBabelInterface()
{
}
-void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow)
+void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow)
{
openURL(url,package,window,newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit());
}
-void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile)
+void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile)
{
- const QString project( QString::fromLocal8Bit( projectFile ) );
+ const TQString project( TQString::fromLocal8Bit( projectFile ) );
kdDebug() << "openURL " << url << endl;
- KURL u(QString::fromLocal8Bit(url));
+ KURL u(TQString::fromLocal8Bit(url));
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
@@ -256,7 +256,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
{
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u, QString::fromUtf8(package),newWindow);
+ kb->open(u, TQString::fromUtf8(package),newWindow);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -274,7 +274,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
// it's empty
KWin::setActiveWindow(kb->topLevelWidget()->winId());
kb->projectOpen(projectFile);
- kb->open(u,QString::fromUtf8(package),false);
+ kb->open(u,TQString::fromUtf8(package),false);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -290,7 +290,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
{
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u, QString::fromUtf8(package),newWindow);
+ kb->open(u, TQString::fromUtf8(package),newWindow);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -306,24 +306,24 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
kb->show();
} else kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u,QString::fromUtf8(package),newWindow);
+ kb->open(u,TQString::fromUtf8(package),newWindow);
}
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
}
-void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow)
+void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow)
{
openTemplate(openFilename, saveFilename, package, newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit());
}
-void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile)
+void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile)
{
- const QString project( QString::fromLocal8Bit( projectFile ) );
+ const TQString project( TQString::fromLocal8Bit( projectFile ) );
- const KURL u( QString::fromLocal8Bit( saveFilename ) );
- const KURL t( QString::fromLocal8Bit( openFilename ) );
+ const KURL u( TQString::fromLocal8Bit( saveFilename ) );
+ const KURL t( TQString::fromLocal8Bit( openFilename ) );
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
@@ -344,14 +344,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename,
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
kb->projectOpen(projectFile);
- kb->openTemplate(t,u,QString::fromUtf8(package),newWindow);
+ kb->openTemplate(t,u,TQString::fromUtf8(package),newWindow);
}
else
{
kb = new KBabelMW(project);
kb->show();
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->openTemplate(t,u,QString::fromUtf8(package));
+ kb->openTemplate(t,u,TQString::fromUtf8(package));
}
}
@@ -359,14 +359,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename,
kapp->dcopClient()->resume();
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString m)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString m)
{
- const KURL u( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), QString() );
+ const KURL u( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), TQString() );
if(!kb) return;
- QString msgid = QString::fromUtf8(m);
+ TQString msgid = TQString::fromUtf8(m);
int index = kb->m_view->catalog()->indexForMsgid(msgid);
if(index >= 0)
{
@@ -377,15 +377,15 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString m)
}
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m)
{
gotoFileEntry(url, package, m, KBabel::ProjectManager::defaultProjectName().local8Bit() );
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCString projectFile)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m, TQCString projectFile)
{
- const KURL u ( QString::fromLocal8Bit( url ) );
- const QString p ( QString::fromUtf8( package ) ); // ### VERIFY encoding!
+ const KURL u ( TQString::fromLocal8Bit( url ) );
+ const TQString p ( TQString::fromUtf8( package ) ); // ### VERIFY encoding!
KBabelMW *kb = findInstance( u, projectFile, p );
if(!kb) return;
@@ -396,8 +396,8 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCStr
kb->m_view->gotoEntry(pos);
}
-bool KBabelInterface::findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave)
{
@@ -408,15 +408,15 @@ bool KBabelInterface::findInFile(QCString fileSource, QCString url,
KBabel::ProjectManager::defaultProjectName().utf8() );
}
-bool KBabelInterface::findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project )
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project )
{
kdDebug(KBABEL) << "findInFile (" <<fileSource<< "): " << url << " for " << findStr << endl;
- const KURL u( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, QString::fromLocal8Bit(project), QString() );
+ const KURL u( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, TQString::fromLocal8Bit(project), TQString() );
if(!kb) return false;
@@ -439,8 +439,8 @@ bool KBabelInterface::findInFile(QCString fileSource, QCString url,
return true;
}
-bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave)
{
@@ -451,16 +451,16 @@ bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
KBabel::ProjectManager::defaultProjectName().utf8() );
}
-bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave,
- QCString project )
+ TQCString project )
{
kdDebug(KBABEL) << "replaceInFile (" <<fileSource<< "): " << url << " for " << findStr << endl;
- const KURL u ( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, QString::fromLocal8Bit(project), QString() );
+ const KURL u ( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, TQString::fromLocal8Bit(project), TQString() );
if( !kb ) return false;
@@ -485,15 +485,15 @@ bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
return true;
}
-void KBabelInterface::spellcheck(QStringList fileList)
+void KBabelInterface::spellcheck(TQStringList fileList)
{
// ### FIXME: the default project might use the wrong language!
- KBabelMW *kb = findInstance( KURL(), KBabel::ProjectManager::defaultProjectName(), QString() );
+ KBabelMW *kb = findInstance( KURL(), KBabel::ProjectManager::defaultProjectName(), TQString() );
kb->show();
kb->spellcheckMoreFiles( fileList );
}
-KBabelMW* KBabelInterface::findInstance( const KURL& url, const QString& project, const QString& package) const
+KBabelMW* KBabelInterface::findInstance( const KURL& url, const TQString& project, const TQString& package) const
{
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
diff --git a/kbabel/kbabel/mymultilineedit.cpp b/kbabel/kbabel/mymultilineedit.cpp
index 820d493e..9b7913d1 100644
--- a/kbabel/kbabel/mymultilineedit.cpp
+++ b/kbabel/kbabel/mymultilineedit.cpp
@@ -41,16 +41,16 @@
#include "editcmd.h"
#include "resources.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qdragobject.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
//#include <private/qrichtext_p.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -62,7 +62,7 @@
using namespace KBabel;
-MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name)
+MyMultiLineEdit::MyMultiLineEdit(int ID, TQWidget* parent,const char* name)
:KTextEdit(parent,name), emitUndo(true),
_firstChangedLine(0),
_lastChangedLine(0),
@@ -77,7 +77,7 @@ MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name)
setWordWrap( WidgetWidth );
viewport()->setAcceptDrops( false ); // we need our parent to get drops
- connect(this, SIGNAL(selectionChanged()), this, SLOT( onSelectionChanged() ) );
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT( onSelectionChanged() ) );
}
void MyMultiLineEdit::onSelectionChanged()
@@ -118,11 +118,11 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo)
bool oldEmitUndo = emitUndo;
emitUndo = false;
- QPalette _visibleHighlight( palette() );
- QPalette _invisibleHighlight( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::HighlightedText, newcg.text() );
- newcg.setColor( QColorGroup::Highlight, newcg.base() );
+ TQPalette _visibleHighlight( palette() );
+ TQPalette _invisibleHighlight( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::HighlightedText, newcg.text() );
+ newcg.setColor( TQColorGroup::Highlight, newcg.base() );
if( hasFocus() ) _invisibleHighlight.setActive( newcg );
else _invisibleHighlight.setInactive( newcg );
setPalette( _invisibleHighlight );
@@ -213,34 +213,34 @@ void MyMultiLineEdit::emitCursorPosition()
emit cursorPositionChanged(line, col);
}
-void MyMultiLineEdit::wheelEvent(QWheelEvent *e)
+void MyMultiLineEdit::wheelEvent(TQWheelEvent *e)
{
e->ignore();
}
-void MyMultiLineEdit::focusInEvent(QFocusEvent *e)
+void MyMultiLineEdit::focusInEvent(TQFocusEvent *e)
{
KTextEdit::focusInEvent(e);
emitCursorPosition();
}
-void MyMultiLineEdit::contentsContextMenuEvent( QContextMenuEvent * e)
+void MyMultiLineEdit::contentsContextMenuEvent( TQContextMenuEvent * e)
{
e->accept();
if( _menu ) _menu->exec( e->globalPos() );
}
-QPopupMenu * MyMultiLineEdit::createPopupMenu()
+TQPopupMenu * MyMultiLineEdit::createPopupMenu()
{
return _menu;
}
-QPopupMenu * MyMultiLineEdit::createPopupMenu(const QPoint &)
+TQPopupMenu * MyMultiLineEdit::createPopupMenu(const TQPoint &)
{
return 0;
}
-void MyMultiLineEdit::setContextMenu( QPopupMenu * menu )
+void MyMultiLineEdit::setContextMenu( TQPopupMenu * menu )
{
_menu = menu;
}
@@ -270,10 +270,10 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action )
{
int x,y;
getCursorPosition( &x, &y );
- QString s = text(x);
+ TQString s = text(x);
if( y < (int)s.length()-1 ) // not the end of paragraph
{
- QString delText = s.mid( y, s.length()-y-1);
+ TQString delText = s.mid( y, s.length()-y-1);
emit signalUndoCmd( new DelTextCmd(currentIndex(), delText, _myID ) );
} else
if( x < paragraphs()-1 ) // not the end of text
@@ -288,7 +288,7 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action )
emitCursorPosition();
}
-void MyMultiLineEdit::setText(const QString& s)
+void MyMultiLineEdit::setText(const TQString& s)
{
_lastParagraph=0;
_lastParagraphOffset=0;
@@ -303,7 +303,7 @@ void MyMultiLineEdit::setText(const QString& s)
emitCursorPosition();
}
-void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark )
+void MyMultiLineEdit::insertAt( const TQString & s, int line, int col, bool mark )
{
// it will invoke insert, don't need to send InsTextCmd
KTextEdit::insertAt(s,line,col);
@@ -316,7 +316,7 @@ void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark
emitCursorPosition();
}
-void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLine, bool removeSelected )
+void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewLine, bool removeSelected )
{
int row,col;
@@ -360,11 +360,11 @@ void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLi
// setup palettes
- QPalette _visibleHighlight( palette() );
- QPalette _invisibleHighlight( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::HighlightedText, newcg.text() );
- newcg.setColor( QColorGroup::Highlight, newcg.base() );
+ TQPalette _visibleHighlight( palette() );
+ TQPalette _invisibleHighlight( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::HighlightedText, newcg.text() );
+ newcg.setColor( TQColorGroup::Highlight, newcg.base() );
if( hasFocus() ) _invisibleHighlight.setActive( newcg );
else _invisibleHighlight.setInactive( newcg );
setPalette( _invisibleHighlight );
@@ -391,7 +391,7 @@ void MyMultiLineEdit::clear()
_dontUpdate=true;
- QString s = text();
+ TQString s = text();
if( !s.isEmpty() && emitUndo ) {
emit signalUndoCmd( new BeginCommand(-1,UndefPart) );
emit signalUndoCmd( new DelTextCmd(0,s,_myID) );
@@ -423,10 +423,10 @@ void MyMultiLineEdit::my_backspace()
{
int offset = currentIndex();
- QString s= text(cursorY);
+ TQString s= text(cursorY);
if(cursorX != 0)
{
- QString delTxt(s[cursorX-1]);
+ TQString delTxt(s[cursorX-1]);
emit signalUndoCmd(new DelTextCmd(offset-1,delTxt,_myID));
}
else if( cursorY > 0 || cursorX > 0 ) // not at the beginning
@@ -453,10 +453,10 @@ void MyMultiLineEdit::my_del()
{
int offset = pos2Offset(cursorY, cursorX);
- QString s=text(cursorY);
+ TQString s=text(cursorY);
if(cursorX != (int)s.length()-1)
{
- QString delTxt(s[cursorX]);
+ TQString delTxt(s[cursorX]);
emit signalUndoCmd(new DelTextCmd(offset,delTxt,_myID));
}
else if( cursorY < (int)paragraphs()-1 || ( (cursorY == (int)paragraphs()-1) && (cursorX < (int)text( paragraphs()-1 ).length()-1 ) ) )// !atEnd() )
@@ -583,7 +583,7 @@ void MyMultiLineEdit::setReadOnly(bool on)
setBackgroundMode(PaletteBase);
}
- QTextEdit::setReadOnly(on);
+ TQTextEdit::setReadOnly(on);
}
void MyMultiLineEdit::setOverwriteMode( bool b )
@@ -592,7 +592,7 @@ void MyMultiLineEdit::setOverwriteMode( bool b )
}
/*******************************************************************************/
-MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const char* name)
+MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, TQWidget* parent,const char* name)
:MyMultiLineEdit(ID, parent,name),
_quotes(false),
_cleverEditing(false),
@@ -620,32 +620,32 @@ MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const
diffPos.setAutoDelete(true);
diffPos.clear();
- _whitespace = new QPixmap(2,2,-1,QPixmap::BestOptim);
+ _whitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim);
_whitespace->fill(_textColor);
- _errorWhitespace = new QPixmap(2,2,-1,QPixmap::BestOptim);
+ _errorWhitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim);
_errorWhitespace->fill(_errorColor);
- _whitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim);
+ _whitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim);
_whitespaceNB->fill();
- _errorWhitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim);
+ _errorWhitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim);
_errorWhitespaceNB->fill();
- QPainter p(_whitespaceNB);
+ TQPainter p(_whitespaceNB);
p.setPen( _textColor );
p.drawEllipse(_whitespaceNB->rect());
- QPainter q(_errorWhitespaceNB);
+ TQPainter q(_errorWhitespaceNB);
q.setPen( _errorColor );
q.drawEllipse(_errorWhitespaceNB->rect());
// this will setup bitBlt pixmaps
setFont( font() );
highlighter = new KBabelHighlighter( this, spell );
- connect( this, SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, SLOT( setSyntaxHighlighting( bool ) ) );
+ connect( this, TQT_SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, TQT_SLOT( setSyntaxHighlighting( bool ) ) );
- connect( this, SIGNAL( selectionChanged() ), this, SLOT( paintSpacePoints() ) );
- connect( this, SIGNAL( cursorPositionChanged( int, int ) ), this, SLOT( paintSpacePoints(int, int) ) );
- connect( this, SIGNAL( textChanged() ), this, SLOT( emittedTextChanged() ) );
+ connect( this, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( paintSpacePoints() ) );
+ connect( this, TQT_SIGNAL( cursorPositionChanged( int, int ) ), this, TQT_SLOT( paintSpacePoints(int, int) ) );
+ connect( this, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( emittedTextChanged() ) );
}
MsgMultiLineEdit::~MsgMultiLineEdit ()
@@ -654,9 +654,9 @@ MsgMultiLineEdit::~MsgMultiLineEdit ()
delete highlighter;
}
-void MsgMultiLineEdit::setText(const QString& s)
+void MsgMultiLineEdit::setText(const TQString& s)
{
- QString str = s;
+ TQString str = s;
if(_showDiff)
{
@@ -664,13 +664,13 @@ void MsgMultiLineEdit::setText(const QString& s)
int lines = s.contains('\n');
diffPos.resize(lines+1);
- QStringList lineList = QStringList::split('\n',s,true);
+ TQStringList lineList = TQStringList::split('\n',s,true);
int lineCounter=-1;
bool haveAdd=false;
bool haveDel=false;
bool multiline=false;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = lineList.begin(); it != lineList.end(); ++it)
{
lineCounter++;
@@ -791,10 +791,10 @@ void MsgMultiLineEdit::setText(const QString& s)
if(di.begin >= 0)
{
- QValueList<DiffInfo> *list = diffPos[lineCounter];
+ TQValueList<DiffInfo> *list = diffPos[lineCounter];
if(!list)
{
- list = new QValueList<DiffInfo>;
+ list = new TQValueList<DiffInfo>;
diffPos.insert(lineCounter,list);
}
@@ -804,7 +804,7 @@ void MsgMultiLineEdit::setText(const QString& s)
}
}
- QRegExp reg("</?KBABELADD>");
+ TQRegExp reg("</?KBABELADD>");
str.replace(reg,"");
reg.setPattern("</?KBABELDEL>");
str.replace(reg,"");
@@ -833,7 +833,7 @@ void MsgMultiLineEdit::setHighlightBg(bool on)
}
-void MsgMultiLineEdit::setBgColor(const QColor& color)
+void MsgMultiLineEdit::setBgColor(const TQColor& color)
{
_bgColor=color;
@@ -857,8 +857,8 @@ void MsgMultiLineEdit::setHighlightSyntax(bool on)
update();
}
-void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor)
+void MsgMultiLineEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor)
{
_quoteColor=quoteColor;
_unquoteColor=unquoteColor;
@@ -875,13 +875,13 @@ void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor
}
-void MsgMultiLineEdit::setFont(const QFont& font)
+void MsgMultiLineEdit::setFont(const TQFont& font)
{
KTextEdit::setFont(font);
// we don't need to calculate a special offset for non-breaking space, since
// they are very similar in size
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
_wsOffsetX = QMAX(fm.width(' ')/2-2,1);
_wsOffsetY = QMAX(fm.height()/2-1,0);
@@ -897,8 +897,8 @@ void MsgMultiLineEdit::setDiffDisplayMode(bool addUnderline, bool delStrikeOut)
update();
}
-void MsgMultiLineEdit::setDiffColors(const QColor& addColor
- , const QColor& delColor)
+void MsgMultiLineEdit::setDiffColors(const TQColor& addColor
+ , const TQColor& delColor)
{
_diffAddColor = addColor;
_diffDelColor = delColor;
@@ -907,11 +907,11 @@ void MsgMultiLineEdit::setDiffColors(const QColor& addColor
update();
}
-void MsgMultiLineEdit::setTextColor(const QColor &color )
+void MsgMultiLineEdit::setTextColor(const TQColor &color )
{
- QPalette p( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::Text, color );
+ TQPalette p( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::Text, color );
if( hasFocus() ) p.setActive( newcg );
else p.setInactive( newcg );
setPalette( p );
@@ -919,7 +919,7 @@ void MsgMultiLineEdit::setTextColor(const QColor &color )
highlighter->setHighlightColor( KBabelHighlighter::Normal, color );
}
-void MsgMultiLineEdit::setErrorColor(const QColor &color )
+void MsgMultiLineEdit::setErrorColor(const TQColor &color )
{
_errorColor = color;
highlighter->setHighlightColor( KBabelHighlighter::Error, color );
@@ -961,17 +961,17 @@ void MsgMultiLineEdit::paintSpacePoints(int, int )
void MsgMultiLineEdit::paintSpacePoints()
{
- QRect r;
- QPainter painter(viewport() );
- const QFontMetrics& fm = fontMetrics();
+ TQRect r;
+ TQPainter painter(viewport() );
+ const TQFontMetrics& fm = fontMetrics();
- int paranum = paragraphAt(QPoint(contentsX(), contentsY()));
+ int paranum = paragraphAt(TQPoint(contentsX(), contentsY()));
if( _spacePoints )
{
int curpara = paranum;
painter.setPen( _currentColor );
- QPixmap* ws, *wsnb;
+ TQPixmap* ws, *wsnb;
if( _currentColor== _errorColor )
{
@@ -988,12 +988,12 @@ void MsgMultiLineEdit::paintSpacePoints()
{
if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break;
- const QString& s = text(curpara);
+ const TQString& s = text(curpara);
int i = s.find( " " );
while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN
{
- QPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws;
- QRect r = mapToView( curpara, i );
+ TQPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws;
+ TQRect r = mapToView( curpara, i );
r.moveBy( r.width()/2, (r.height() - fm.descent())/2 );
r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 );
bitBlt(viewport(), r.topLeft(), pm, pm->rect(), Qt::CopyROP);
@@ -1005,19 +1005,19 @@ void MsgMultiLineEdit::paintSpacePoints()
if( _quotes )
{
- QFontMetrics fm( font());
- QRect qs = fm.boundingRect("\"");
+ TQFontMetrics fm( font());
+ TQRect qs = fm.boundingRect("\"");
for( int curpara = paranum; curpara < paragraphs() ; curpara++ )
{
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- painter.drawText( QPoint( 0, mapToView( curpara, 0 ).top()) +
- QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
+ painter.drawText( TQPoint( 0, mapToView( curpara, 0 ).top()) +
+ TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
painter.drawText( mapToView( curpara, QMAX( 0,
((int)text( curpara ).length())-1)).topRight() +
- QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
+ TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
}
}
@@ -1031,16 +1031,16 @@ void MsgMultiLineEdit::paintSpacePoints()
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- QValueList<DiffInfo> *list = diffPos[curpara];
+ TQValueList<DiffInfo> *list = diffPos[curpara];
if(list)
{
- QValueList<DiffInfo>::ConstIterator it;
+ TQValueList<DiffInfo>::ConstIterator it;
for(it = list->begin(); it != list->end(); ++it)
{
- QRect beg = mapToView( curpara, (*it).begin );
- QRect end = mapToView( curpara, (*it).end );
+ TQRect beg = mapToView( curpara, (*it).begin );
+ TQRect end = mapToView( curpara, (*it).end );
- QColor* c = 0;
+ TQColor* c = 0;
if( (*it).add && !_diffUnderlineAdd)
c = &_diffAddColor;
else if(!(*it).add && !_diffStrikeOutDel)
@@ -1051,23 +1051,23 @@ void MsgMultiLineEdit::paintSpacePoints()
// Single or multiple lines?
if ( beg.top() == end.top())
{
- painter.fillRect( QRect( beg.topLeft(),
- QPoint( end.right(), end.bottom())), *c );
+ painter.fillRect( TQRect( beg.topLeft(),
+ TQPoint( end.right(), end.bottom())), *c );
}
else
{
- painter.fillRect( QRect(
+ painter.fillRect( TQRect(
beg.topLeft(),
- QPoint( r.right(), beg.bottom())), *c );
+ TQPoint( r.right(), beg.bottom())), *c );
if( end.top()-beg.bottom() > 2 ) {
// there is a line, not only thin space
- painter.fillRect( QRect(
- QPoint( r.left(), beg.bottom()),
- QPoint( r.right(), end.top())), *c );
+ painter.fillRect( TQRect(
+ TQPoint( r.left(), beg.bottom()),
+ TQPoint( r.right(), end.top())), *c );
}
- painter.fillRect( QRect(
- QPoint( r.left(), end.top()),
- QPoint( end.right(), end.bottom())), *c );
+ painter.fillRect( TQRect(
+ TQPoint( r.left(), end.top()),
+ TQPoint( end.right(), end.bottom())), *c );
}
}
}
@@ -1085,18 +1085,18 @@ void MsgMultiLineEdit::paintSpacePoints()
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- QValueList<DiffInfo> *list = diffPos[curpara];
+ TQValueList<DiffInfo> *list = diffPos[curpara];
if(list)
{
- QPen addPen(_diffAddColor,2);
- QPen delPen(_diffDelColor,2);
- QValueList<DiffInfo>::ConstIterator it;
+ TQPen addPen(_diffAddColor,2);
+ TQPen delPen(_diffDelColor,2);
+ TQValueList<DiffInfo>::ConstIterator it;
for(it = list->begin(); it != list->end(); ++it)
{
- QRect beg = mapToView( curpara, (*it).begin );
- QRect end = mapToView( curpara, (*it).end );
+ TQRect beg = mapToView( curpara, (*it).begin );
+ TQRect end = mapToView( curpara, (*it).end );
- QPen* p = 0;
+ TQPen* p = 0;
int dy = 0;
if( (*it).add && _diffUnderlineAdd)
p = &addPen;
@@ -1113,25 +1113,25 @@ void MsgMultiLineEdit::paintSpacePoints()
// Single or multiple lines?
if ( beg.top() == end.top())
painter.drawLine(
- beg.topLeft() + QPoint(0, fm.ascent()-dy),
- end.topRight()+ QPoint(0, fm.ascent()-dy));
+ beg.topLeft() + TQPoint(0, fm.ascent()-dy),
+ end.topRight()+ TQPoint(0, fm.ascent()-dy));
else
{
int y = beg.top() + fm.ascent();
painter.drawLine(
- QPoint(beg.left(), y),
- QPoint(r.right(), y));
+ TQPoint(beg.left(), y),
+ TQPoint(r.right(), y));
y += fm.lineSpacing();
while (y < end.top() + fm.ascent())
{
painter.drawLine(
- QPoint(r.left(), y),
- QPoint(r.right(), y));
+ TQPoint(r.left(), y),
+ TQPoint(r.right(), y));
y += fm.lineSpacing();
}
painter.drawLine(
- QPoint(r.left(), end.top() + fm.ascent()),
- QPoint(end.right(), end.top() + fm.ascent()));
+ TQPoint(r.left(), end.top() + fm.ascent()),
+ TQPoint(end.right(), end.top() + fm.ascent()));
}
}
}
@@ -1165,7 +1165,7 @@ void MsgMultiLineEdit::highlight()
{
/* if( _dontUpdate ) return;
- QColor bg;
+ TQColor bg;
if( _highlightBg ) bg = _bgColor;
else bg = colorGroup().base();
@@ -1185,19 +1185,19 @@ void MsgMultiLineEdit::highlight()
uint i;
- QRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)"
+ TQRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)"
"|(%[\\ddioxXucsfeEgGphln]+)|(&[^\\s])|(&[\\w-]+;)");
for( i = QMAX(_firstChangedLine,0) ; i < QMIN(_lastChangedLine+1,(uint)paragraphs()) ; i++ ) {
- QString line=text(i);
+ TQString line=text(i);
//remove old highlighting
setSelection(i,0,i,line.length());
setColor( _currentColor );
removeSelection();
- QColor colorToUse;
+ TQColor colorToUse;
int index=0;
index=markup.search( line, index );
@@ -1234,7 +1234,7 @@ void MsgMultiLineEdit::highlight()
int lineindex=0;
uint index=0;
int startPara, endPara, startIndex, endIndex;
- QString t= text();
+ TQString t= text();
if(_lastParagraph <= _firstChangedLine)
{
@@ -1245,19 +1245,19 @@ void MsgMultiLineEdit::highlight()
for( ; index<_firstChangedLine ; index++)
lineindex+=paragraphLength(index)+1;
- QRegExp re("<.*>");
+ TQRegExp re("<.*>");
re.setMinimal(true);
if( _firstChangedLine >0 )
{
- QColor c;
- QFont f;
+ TQColor c;
+ TQFont f;
VerticalAlignment v;
getFormat(_firstChangedLine-1, paragraphLength(_firstChangedLine-1)-1, &f, &c, &v);
- QString l = text(_firstChangedLine-1);
+ TQString l = text(_firstChangedLine-1);
if( c==_tagColor && !l.endsWith(">") ) // hope _tagColor will be different than other colors
{
- QRegExp endtag("[^<]*>");
+ TQRegExp endtag("[^<]*>");
tagindex=endtag.search(t, lineindex);
taglength=endtag.matchedLength();
} else {
@@ -1311,26 +1311,26 @@ void MsgMultiLineEdit::highlight()
*/
}
-void MsgMultiLineEdit::drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph )
+void MsgMultiLineEdit::drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
{
MyMultiLineEdit::drawContents( painter, clipx, clipy, clipw, cliph );
paintSpacePoints();
}
-void MsgMultiLineEdit::paintEvent( QPaintEvent *event )
+void MsgMultiLineEdit::paintEvent( TQPaintEvent *event )
{
MyMultiLineEdit::paintEvent( event );
paintSpacePoints();
}
-QRect MsgMultiLineEdit::mapToView( int para, int index )
+TQRect MsgMultiLineEdit::mapToView( int para, int index )
{
if( para < 0 || para > paragraphs() ||
index < 0 || index > paragraphLength(para) )
- return QRect(); //invalid rectangle
+ return TQRect(); //invalid rectangle
- const QFontMetrics& fm = fontMetrics();
- const QString& paratext = text(para);
+ const TQFontMetrics& fm = fontMetrics();
+ const TQString& paratext = text(para);
// Find index of the first character on the same line as parameter
// 'index' using binary search. Very fast, even for long texts.
@@ -1377,9 +1377,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
// no tag on the line, no bold
linewidth = fm.width( paratext.mid( linestart, index-linestart ));
} else {
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
- QFontMetrics bfm( f );
+ TQFontMetrics bfm( f );
// is tag single displayed line?
if( _tagStartPara == _tagEndPara
&& lineOfChar( _tagStartPara, _tagStartIndex ) == lineOfChar( _tagEndPara, _tagEndIndex ) )
@@ -1400,9 +1400,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
}
else {
// in tag
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
- QFontMetrics bfm( f );
+ TQFontMetrics bfm( f );
// is it the first line of the tag?
if( para == _tagStartPara && indexline == lineOfChar( _tagStartPara, _tagStartIndex ) ) {
// start of the line is normal
@@ -1415,23 +1415,23 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
}
}
- // FIXME as soon as it's possible to ask real margins from QTextEdit:
+ // FIXME as soon as it's possible to ask real margins from TQTextEdit:
const int left_margin = 4;
// const int top_margin = 4;
- QPainter painter( viewport());
- const QRect& linerect = paragraphRect(para);
- return QRect(
- contentsToViewport( QPoint(
+ TQPainter painter( viewport());
+ const TQRect& linerect = paragraphRect(para);
+ return TQRect(
+ contentsToViewport( TQPoint(
left_margin + linerect.left() + linewidth ,
/*top_margin + */linerect.top() + indexline * fm.lineSpacing() + fm.leading())),
- QSize(
+ TQSize(
fm.charWidth( paratext, index ),
fm.lineSpacing()
));
}
-void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
+void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
{
if(!_cleverEditing || isReadOnly())
{
@@ -1447,7 +1447,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(e->state() & ShiftButton)
{
@@ -1491,7 +1491,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
if( !str.isEmpty())
{
// construct new event without modifiers
- MyMultiLineEdit::keyPressEvent( new QKeyEvent(e->type(), e->key(), e->ascii(), 0,
+ MyMultiLineEdit::keyPressEvent( new TQKeyEvent(e->type(), e->key(), e->ascii(), 0,
e->text(), e->isAutoRepeat(), e->count() ) );
e->accept();
}
@@ -1515,12 +1515,12 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
{
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(!str.isEmpty() && col < (int)str.length() && str.at(col) == '\\'
&& !isMasked(&str,col))
{
- QString spclChars="abfnrtv'\"?\\";
+ TQString spclChars="abfnrtv'\"?\\";
if(col < (int)str.length()-1
&& spclChars.contains(str.at(col+1)))
{
@@ -1545,9 +1545,9 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
{
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
- QString spclChars="abfnrtv'\"?\\";
+ TQString spclChars="abfnrtv'\"?\\";
if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1)))
{
if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2))
@@ -1571,7 +1571,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(col == 0 || str.at(col-1) != '\\' || isMasked(&str,col-1) )
{
@@ -1589,14 +1589,14 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
}
else if(e->key() == Key_Space && ( e->state() & AltButton ) )
{
- insert( QChar( 0x00a0U ) );
+ insert( TQChar( 0x00a0U ) );
e->accept();
return;
}
// ALT+123 feature
else if(( e->state() & AltButton ) && e->text()[0].isDigit() )
{
- QString text=e->text();
+ TQString text=e->text();
while ( text[0].isDigit() ) {
_currentUnicodeNumber = 10*_currentUnicodeNumber+(text[0].digitValue());
text.remove( 0, 1 );
@@ -1608,11 +1608,11 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
}
}
-void MsgMultiLineEdit::keyReleaseEvent(QKeyEvent* e)
+void MsgMultiLineEdit::keyReleaseEvent(TQKeyEvent* e)
{
if ( e->key() == Key_Alt && _currentUnicodeNumber >= 32 )
{
- QString text = QChar( _currentUnicodeNumber );
+ TQString text = TQChar( _currentUnicodeNumber );
_currentUnicodeNumber=0;
insert( text );
}
@@ -1628,7 +1628,7 @@ void MsgMultiLineEdit::setDiffMode(bool on)
}
}
-bool MsgMultiLineEdit::isMasked(QString *str, uint col)
+bool MsgMultiLineEdit::isMasked(TQString *str, uint col)
{
if(col == 0 || !str)
return false;
diff --git a/kbabel/kbabel/mymultilineedit.h b/kbabel/kbabel/mymultilineedit.h
index 30771610..4f076af5 100644
--- a/kbabel/kbabel/mymultilineedit.h
+++ b/kbabel/kbabel/mymultilineedit.h
@@ -36,7 +36,7 @@
#define MYMULTILINEEDIT_H
#include <ktextedit.h>
-#include <qptrvector.h>
+#include <tqptrvector.h>
namespace KBabel
{
@@ -51,7 +51,7 @@ class MyMultiLineEdit : public KTextEdit
{
Q_OBJECT
public:
- MyMultiLineEdit(int ID,QWidget* parent,const char* name=0);
+ MyMultiLineEdit(int ID,TQWidget* parent,const char* name=0);
/**
applies cmd to the displayed text, but does not emit
@@ -79,7 +79,7 @@ public:
*/
int endOfLastMarkedText();
- virtual void insertAt ( const QString & s, int line, int col, bool mark = false );
+ virtual void insertAt ( const TQString & s, int line, int col, bool mark = false );
virtual void removeLine ( int line );
int pos2Offset(uint paragraph, uint index);
@@ -98,7 +98,7 @@ public:
/**
* need to override deleting of popup menus :-(
*/
- void contentsContextMenuEvent( QContextMenuEvent *e );
+ void contentsContextMenuEvent( TQContextMenuEvent *e );
/**
* need to reimplement overwrite mode :-(
@@ -110,27 +110,27 @@ public slots:
virtual void clear();
virtual void paste();
virtual void setReadOnly(bool on);
- virtual void setContextMenu( QPopupMenu *menu );
- virtual void setText(const QString& s);
+ virtual void setContextMenu( TQPopupMenu *menu );
+ virtual void setText(const TQString& s);
virtual void doKeyboardAction( KeyboardAction action );
virtual void removeSelectedText(int selNum = 0);
virtual void onSelectionChanged();
/**
- reimplemented overwrite mode, since QTextEdit handles this internally and does
+ reimplemented overwrite mode, since TQTextEdit handles this internally and does
not use any accessible virtual methods :-((.
*/
virtual void setOverwriteMode(bool b);
protected:
- virtual void focusInEvent(QFocusEvent*);
- virtual QPopupMenu *createPopupMenu();
- virtual QPopupMenu *createPopupMenu(const QPoint &pos);
+ virtual void focusInEvent(TQFocusEvent*);
+ virtual TQPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu(const TQPoint &pos);
/* the parent handles this */
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
bool emitUndo;
@@ -154,7 +154,7 @@ protected:
bool _dontUpdate;
protected slots:
- virtual void insert ( const QString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE );
+ virtual void insert ( const TQString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE );
virtual void emitCursorPosition();
signals:
@@ -165,7 +165,7 @@ protected:
int _myID;
private:
- QPopupMenu *_menu;
+ TQPopupMenu *_menu;
bool _overwrite;
};
@@ -176,7 +176,7 @@ class MsgMultiLineEdit : public MyMultiLineEdit
public:
enum TextColor { NormalColor, ErrorColor };
- MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0);
+ MsgMultiLineEdit(int ID, KSpell* spell=0, TQWidget* parent=0,const char* name=0);
virtual ~MsgMultiLineEdit();
/** is displaying surrounding quotes enabled? */
@@ -192,8 +192,8 @@ public:
bool highlightBg() const { return _highlightBg; }
/** enable or disable highlighting background*/
void setHighlightBg(bool on);
- QColor bgColor() const { return _bgColor; }
- void setBgColor(const QColor& color);
+ TQColor bgColor() const { return _bgColor; }
+ void setBgColor(const TQColor& color);
bool spacePoints() const { return _spacePoints; }
void setSpacePoints(bool on);
@@ -201,17 +201,17 @@ public:
bool highlightSyntax() const { return _hlSyntax; }
void highlight();
void setHighlightSyntax(bool on);
- void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor);
+ void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor);
- void setFont(const QFont& font);
+ void setFont(const TQFont& font);
void setDiffMode(bool on);
void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted);
- void setDiffColors(const QColor& addColor, const QColor& delColor);
+ void setDiffColors(const TQColor& addColor, const TQColor& delColor);
- void setTextColor(const QColor &color);
- void setErrorColor(const QColor &color);
+ void setTextColor(const TQColor &color);
+ void setErrorColor(const TQColor &color);
void setCurrentColor(const TextColor color);
@@ -220,9 +220,9 @@ public:
void selectTag(int start, int length);
public slots:
- virtual void setText(const QString& s);
+ virtual void setText(const TQString& s);
void paintSpacePoints();
- void paintSpacePoints( int para, int pos ); // overloaded for signal QTextEdit::cursorPositionChanged
+ void paintSpacePoints( int para, int pos ); // overloaded for signal TQTextEdit::cursorPositionChanged
/**
* reimplemented to call highlight()
@@ -237,49 +237,49 @@ public slots:
void ensureCursorVisible();
protected:
- virtual void paintEvent (QPaintEvent * event );
- virtual void drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph );
+ virtual void paintEvent (TQPaintEvent * event );
+ virtual void drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph );
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
/**
* Computes the pixel position in line which corresponds to
* character position xIndex
*/
- QRect mapToView( int para, int index );
+ TQRect mapToView( int para, int index );
/**
* tests if the character in string str at position col is masked with
* '\' by counting the number of '\' backwards
*/
- static bool isMasked(QString *str,uint col);
+ static bool isMasked(TQString *str,uint col);
private:
bool _quotes;
bool _cleverEditing;
bool _highlightBg;
bool _spacePoints;
- QColor _bgColor;
- QColor _textColor;
- QColor _errorColor;
- QColor _currentColor;
+ TQColor _bgColor;
+ TQColor _textColor;
+ TQColor _errorColor;
+ TQColor _currentColor;
- QPixmap* _whitespace;
- QPixmap* _whitespaceNB;
- QPixmap* _errorWhitespace;
- QPixmap* _errorWhitespaceNB;
+ TQPixmap* _whitespace;
+ TQPixmap* _whitespaceNB;
+ TQPixmap* _errorWhitespace;
+ TQPixmap* _errorWhitespaceNB;
int _wsOffsetX;
int _wsOffsetY;
bool _hlSyntax;
- QColor _quoteColor;
- QColor _unquoteColor;
- QColor _cformatColor;
- QColor _accelColor;
- QColor _tagColor;
+ TQColor _quoteColor;
+ TQColor _unquoteColor;
+ TQColor _cformatColor;
+ TQColor _accelColor;
+ TQColor _tagColor;
struct DiffInfo
{
@@ -288,12 +288,12 @@ private:
int end;
};
- QPtrVector< QValueList<DiffInfo> > diffPos;
+ TQPtrVector< TQValueList<DiffInfo> > diffPos;
bool _showDiff;
bool _diffUnderlineAdd;
bool _diffStrikeOutDel;
- QColor _diffAddColor;
- QColor _diffDelColor;
+ TQColor _diffAddColor;
+ TQColor _diffDelColor;
// for Alt+123 feature
int _currentUnicodeNumber;
diff --git a/kbabel/kbabel/sourceview.cpp b/kbabel/kbabel/sourceview.cpp
index 08c0f8a4..00d8a3b2 100644
--- a/kbabel/kbabel/sourceview.cpp
+++ b/kbabel/kbabel/sourceview.cpp
@@ -34,8 +34,8 @@
#include "sourceview.h"
#include "context.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -45,16 +45,16 @@
using namespace KBabel;
-SourceView::SourceView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+SourceView::SourceView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
_contextView = new SourceContext (this, project);
layout->addWidget (_contextView);
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void SourceView::updateView()
diff --git a/kbabel/kbabel/sourceview.h b/kbabel/kbabel/sourceview.h
index 8caeed35..a12ca767 100644
--- a/kbabel/kbabel/sourceview.h
+++ b/kbabel/kbabel/sourceview.h
@@ -44,7 +44,7 @@ public:
/**
* Default constructor
*/
- SourceView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ SourceView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
diff --git a/kbabel/kbabel/spelldlg.cpp b/kbabel/kbabel/spelldlg.cpp
index 49500e09..de9f2ce6 100644
--- a/kbabel/kbabel/spelldlg.cpp
+++ b/kbabel/kbabel/spelldlg.cpp
@@ -33,14 +33,14 @@
#include "spelldlg.h"
#include "spelldlgwidget.h"
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include <kconfig.h>
#include <kglobal.h>
#include <klocale.h>
-SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name)
+SpellDlg::SpellDlg(bool haveMarkedText,TQWidget *parent,const char *name)
: KDialogBase(parent,name,true,i18n("Caption of dialog","Spelling")
, Ok|Cancel)
{
@@ -61,7 +61,7 @@ SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name)
KConfig *config = KGlobal::config();
KConfigGroupSaver cs(config,"SpellDlg");
- QString what=config->readEntry("Default","All");
+ TQString what=config->readEntry("Default","All");
if(what=="All")
_mainWidget->allBtn->setChecked(true);
@@ -85,7 +85,7 @@ SpellDlg::~SpellDlg()
KConfig *config=KGlobal::config();
KConfigGroupSaver cs(config,"SpellDlg");
- QString what="All";
+ TQString what="All";
if(_mainWidget->endBtn->isChecked())
what="End";
else if(_mainWidget->beginBtn->isChecked())
diff --git a/kbabel/kbabel/spelldlg.h b/kbabel/kbabel/spelldlg.h
index ea857777..e12fc515 100644
--- a/kbabel/kbabel/spelldlg.h
+++ b/kbabel/kbabel/spelldlg.h
@@ -43,7 +43,7 @@ class SpellDlg : public KDialogBase
Q_OBJECT
public:
- SpellDlg(bool haveMarkedText, QWidget* parent, const char *name=0);
+ SpellDlg(bool haveMarkedText, TQWidget* parent, const char *name=0);
~SpellDlg();
bool all() const;
diff --git a/kbabel/kbabel/taglistview.cpp b/kbabel/kbabel/taglistview.cpp
index 8dedccea..476c2ed7 100644
--- a/kbabel/kbabel/taglistview.cpp
+++ b/kbabel/kbabel/taglistview.cpp
@@ -33,8 +33,8 @@
#include "taglistview.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klistbox.h>
@@ -44,23 +44,23 @@
using namespace KBabel;
-TagListView::TagListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+TagListView::TagListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
_tagBox = new KListBox (this, "taglist textview");
layout->addWidget (_tagBox);
- connect(_tagBox,SIGNAL(selected(const QString&))
- , this, SIGNAL(signalTagSelected(const QString&)));
- connect(_tagBox,SIGNAL(highlighted(int))
- , this, SIGNAL(signalHighlightedTagChanged(int)));
+ connect(_tagBox,TQT_SIGNAL(selected(const TQString&))
+ , this, TQT_SIGNAL(signalTagSelected(const TQString&)));
+ connect(_tagBox,TQT_SIGNAL(highlighted(int))
+ , this, TQT_SIGNAL(signalHighlightedTagChanged(int)));
- connect(_catalog, SIGNAL(signalFileOpened(bool))
- , this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool))
+ , this, TQT_SLOT(setDisabled(bool)));
}
void TagListView::updateView()
diff --git a/kbabel/kbabel/taglistview.h b/kbabel/kbabel/taglistview.h
index 0435e3ba..d4361a23 100644
--- a/kbabel/kbabel/taglistview.h
+++ b/kbabel/kbabel/taglistview.h
@@ -44,7 +44,7 @@ public:
/**
* Default constructor
*/
- TagListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ TagListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
@@ -52,7 +52,7 @@ public slots:
signals:
void signalHighlightedTagChanged (int index);
- void signalTagSelected (const QString& tag);
+ void signalTagSelected (const TQString& tag);
private:
KListBox* _tagBox;
diff --git a/kbabel/kbabeldict/aboutmoduledlg.cpp b/kbabel/kbabeldict/aboutmoduledlg.cpp
index eaab8b3b..5de3f0fb 100644
--- a/kbabel/kbabeldict/aboutmoduledlg.cpp
+++ b/kbabel/kbabeldict/aboutmoduledlg.cpp
@@ -35,7 +35,7 @@
#include <kbugreport.h>
#include <klocale.h>
-AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent)
+AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, TQWidget *parent)
: KAboutApplication(aboutData, parent)
, _aboutData(aboutData)
{
@@ -43,7 +43,7 @@ AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent)
enableLinkedHelp(true);
}
-void AboutModuleDlg::helpClickedSlot(const QString&)
+void AboutModuleDlg::helpClickedSlot(const TQString&)
{
KBugReport *bugReport = new KBugReport(0,true,_aboutData);
diff --git a/kbabel/kbabeldict/aboutmoduledlg.h b/kbabel/kbabeldict/aboutmoduledlg.h
index f79d77ec..09f13f8f 100644
--- a/kbabel/kbabeldict/aboutmoduledlg.h
+++ b/kbabel/kbabeldict/aboutmoduledlg.h
@@ -43,10 +43,10 @@ class AboutModuleDlg : public KAboutApplication
Q_OBJECT
public:
- AboutModuleDlg(const KAboutData *aboutData, QWidget* parent=0);
+ AboutModuleDlg(const KAboutData *aboutData, TQWidget* parent=0);
public slots:
- virtual void helpClickedSlot(const QString&);
+ virtual void helpClickedSlot(const TQString&);
private:
const KAboutData *_aboutData;
diff --git a/kbabel/kbabeldict/dictchooser.cpp b/kbabel/kbabeldict/dictchooser.cpp
index f9360b61..f99c3709 100644
--- a/kbabel/kbabeldict/dictchooser.cpp
+++ b/kbabel/kbabeldict/dictchooser.cpp
@@ -35,42 +35,42 @@
#include "dictchooser.h"
#include "resources.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klistbox.h>
#include <klocale.h>
#include <kdialog.h>
#include <ktempfile.h>
-DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
- , QWidget *parent, const char *name)
- : QWidget(parent,name), box(b)
+DictChooser::DictChooser(KBabelDictBox*b, TQStringList selected
+ , TQWidget *parent, const char *name)
+ : TQWidget(parent,name), box(b)
{
tempConfig.clear();
tempConfig.setAutoDelete(true);
dictList = box->moduleInfos();
- QGridLayout *layout = new QGridLayout(this);
+ TQGridLayout *layout = new TQGridLayout(this);
layout->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("dictionary to not use","Do not use:"),this);
+ TQLabel *label = new TQLabel(i18n("dictionary to not use","Do not use:"),this);
layout->addWidget(label,0,0);
- label = new QLabel(i18n("dictionary to use","Use:"),this);
+ label = new TQLabel(i18n("dictionary to use","Use:"),this);
layout->addWidget(label,0,2);
unselectedBox = new KListBox(this,"unselectedBox");
layout->addWidget(unselectedBox,1,0);
- QVBoxLayout *bLayout = new QVBoxLayout();
- selectBtn = new QPushButton(" &>> ", this);
+ TQVBoxLayout *bLayout = new TQVBoxLayout();
+ selectBtn = new TQPushButton(" &>> ", this);
selectBtn->setEnabled(false);
bLayout->addWidget(selectBtn);
- unselectBtn = new QPushButton(" &<< ", this);
+ unselectBtn = new TQPushButton(" &<< ", this);
unselectBtn->setEnabled(false);
bLayout->addWidget(unselectBtn);
bLayout->addStretch();
@@ -80,14 +80,14 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
layout->addWidget(selectedBox,1,2);
- bLayout = new QVBoxLayout();
- upBtn = new QPushButton(i18n("Move &Up"), this);
+ bLayout = new TQVBoxLayout();
+ upBtn = new TQPushButton(i18n("Move &Up"), this);
upBtn->setEnabled(false);
bLayout->addWidget(upBtn);
- downBtn = new QPushButton(i18n("Move &Down"), this);
+ downBtn = new TQPushButton(i18n("Move &Down"), this);
downBtn->setEnabled(false);
bLayout->addWidget(downBtn);
- configureBtn = new QPushButton(i18n("Con&figure..."), this);
+ configureBtn = new TQPushButton(i18n("Con&figure..."), this);
bLayout->addWidget(configureBtn);
bLayout->addStretch();
layout->addLayout(bLayout,1,3);
@@ -95,7 +95,7 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
dictList.setAutoDelete(true);
ModuleInfo *mi;
- for(QStringList::Iterator it=selected.begin(); it!=selected.end();
+ for(TQStringList::Iterator it=selected.begin(); it!=selected.end();
++it)
{
for(mi = dictList.first(); mi != 0; mi = dictList.next())
@@ -122,17 +122,17 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
}
- connect(selectedBox,SIGNAL(highlighted(int)), this
- , SLOT(selectedMarked(int)));
- connect(unselectedBox,SIGNAL(highlighted(int)), this
- , SLOT(unselectedMarked(int)));
+ connect(selectedBox,TQT_SIGNAL(highlighted(int)), this
+ , TQT_SLOT(selectedMarked(int)));
+ connect(unselectedBox,TQT_SIGNAL(highlighted(int)), this
+ , TQT_SLOT(unselectedMarked(int)));
- connect(selectBtn, SIGNAL(clicked()), this, SLOT(select()));
- connect(unselectBtn, SIGNAL(clicked()), this, SLOT(unselect()));
- connect(upBtn, SIGNAL(clicked()), this, SLOT(up()));
- connect(downBtn, SIGNAL(clicked()), this, SLOT(down()));
- connect(configureBtn,SIGNAL(clicked()), this
- , SLOT(configureSelected()));
+ connect(selectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(select()));
+ connect(unselectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(unselect()));
+ connect(upBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(up()));
+ connect(downBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(down()));
+ connect(configureBtn,TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(configureSelected()));
selectedBox->installEventFilter(this);
@@ -144,13 +144,13 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
}
-QStringList DictChooser::selectedDicts()
+TQStringList DictChooser::selectedDicts()
{
- QStringList selected;
+ TQStringList selected;
for(int i = 0; i < (int)selectedBox->count(); i++)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
ModuleInfo *mi;
for(mi = dictList.first(); mi!=0; mi = dictList.next())
@@ -192,7 +192,7 @@ void DictChooser::select()
int i = unselectedBox->currentItem();
if(i >= 0)
{
- QString text = unselectedBox->text(i);
+ TQString text = unselectedBox->text(i);
selectedBox->insertItem(text);
unselectedBox->removeItem(i);
@@ -214,7 +214,7 @@ void DictChooser::unselect()
int i = selectedBox->currentItem();
if(i >= 0 && selectedBox->count() > 1)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
unselectedBox->insertItem(text);
selectedBox->removeItem(i);
@@ -236,7 +236,7 @@ void DictChooser::up()
int i = selectedBox->currentItem();
if(i > 0)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
selectedBox->changeItem(selectedBox->text(i-1),i);
selectedBox->changeItem(text,i-1);
selectedBox->setSelected(i-1,true);
@@ -249,7 +249,7 @@ void DictChooser::down()
int i = selectedBox->currentItem();
if(i < (int)selectedBox->count()-1)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
selectedBox->changeItem(selectedBox->text(i+1),i);
selectedBox->changeItem(text,i+1);
selectedBox->setSelected(i+1,true);
@@ -257,9 +257,9 @@ void DictChooser::down()
}
-bool DictChooser::eventFilter(QObject *object, QEvent *event)
+bool DictChooser::eventFilter(TQObject *object, TQEvent *event)
{
- if(event->type() == QEvent::FocusIn)
+ if(event->type() == TQEvent::FocusIn)
{
if(object==selectedBox)
{
@@ -289,7 +289,7 @@ void DictChooser::configureSelected()
{
int ci = selectedBox->currentItem();
if( ci == -1 ) ci = 0; // there is always at least one item
- QString module = selectedBox->text(ci);
+ TQString module = selectedBox->text(ci);
ModuleInfo *mi;
for(mi = dictList.first(); mi!=0; mi = dictList.next())
@@ -320,7 +320,7 @@ void DictChooser::restoreConfig()
{
kdDebug( KBABEL_SEARCH ) << "Cleanup" << endl;
// cleanup
- QDictIterator<KTempFile> it( tempConfig ); // See QDictIterator
+ TQDictIterator<KTempFile> it( tempConfig ); // See QDictIterator
for( ; it.current(); ++it )
{
KConfig config( it.current()->name() );
diff --git a/kbabel/kbabeldict/dictchooser.h b/kbabel/kbabeldict/dictchooser.h
index 2b757455..c5740d33 100644
--- a/kbabel/kbabeldict/dictchooser.h
+++ b/kbabel/kbabeldict/dictchooser.h
@@ -35,9 +35,9 @@
#ifndef DICTCHOOSER_H
#define DICTCHOOSER_H
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kbabeldictbox.h>
class KListBox;
@@ -52,17 +52,17 @@ class KDE_EXPORT DictChooser : public QWidget
Q_OBJECT
public:
- DictChooser(KBabelDictBox* box, QStringList selected,
- QWidget *parent , const char *name=0);
+ DictChooser(KBabelDictBox* box, TQStringList selected,
+ TQWidget *parent , const char *name=0);
- QStringList selectedDicts();
+ TQStringList selectedDicts();
/** If the user configured some of the modules, this
* restores the original configuration of all these modules
*/
void restoreConfig();
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
private slots:
void select();
@@ -77,18 +77,18 @@ private slots:
private:
KBabelDictBox* box;
- QPtrList<ModuleInfo> dictList;
+ TQPtrList<ModuleInfo> dictList;
KListBox *selectedBox;
KListBox *unselectedBox;
- QPushButton *selectBtn;
- QPushButton *unselectBtn;
- QPushButton *upBtn;
- QPushButton *downBtn;
- QPushButton *configureBtn;
+ TQPushButton *selectBtn;
+ TQPushButton *unselectBtn;
+ TQPushButton *upBtn;
+ TQPushButton *downBtn;
+ TQPushButton *configureBtn;
- QDict<KTempFile> tempConfig;
+ TQDict<KTempFile> tempConfig;
};
#endif // DICTCHOOSER_H
diff --git a/kbabel/kbabeldict/dictionarymenu.cpp b/kbabel/kbabeldict/dictionarymenu.cpp
index 2ed57d5f..5d648697 100644
--- a/kbabel/kbabeldict/dictionarymenu.cpp
+++ b/kbabel/kbabeldict/dictionarymenu.cpp
@@ -36,11 +36,11 @@
#include <kdebug.h>
#include <kshortcut.h>
-#include <qsignalmapper.h>
+#include <tqsignalmapper.h>
DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collection
- , QObject *parent)
- : QObject(parent, "dictionarymenu")
+ , TQObject *parent)
+ : TQObject(parent, "dictionarymenu")
, popup(popupMenu)
, actionCollection(collection)
, maxId(10)
@@ -50,12 +50,12 @@ DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collect
if(popup)
{
- connect(popup,SIGNAL(activated(int)),this,SLOT(activated(int)));
+ connect(popup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activated(int)));
}
- dictionaryMapper = new QSignalMapper( this );
- connect( dictionaryMapper, SIGNAL( mapped( int ) ),
- this, SLOT( activated( int ) ) );
+ dictionaryMapper = new TQSignalMapper( this );
+ connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( activated( int ) ) );
}
@@ -68,7 +68,7 @@ void DictionaryMenu::clear()
{
if(popup)
{
- QIntDictIterator<QString> it( num2id ); // iterator for dict
+ TQIntDictIterator<TQString> it( num2id ); // iterator for dict
while ( it.current() )
{
popup->removeItem(it.currentKey());
@@ -80,49 +80,49 @@ void DictionaryMenu::clear()
// create new mapper
delete dictionaryMapper;
- dictionaryMapper = new QSignalMapper( this );
- connect( dictionaryMapper, SIGNAL( mapped( int ) ),
- this, SLOT( activated( int ) ) );
+ dictionaryMapper = new TQSignalMapper( this );
+ connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( activated( int ) ) );
}
-void DictionaryMenu::add(const QString& name, const QString& moduleId)
+void DictionaryMenu::add(const TQString& name, const TQString& moduleId)
{
if(popup)
{
- KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, SLOT(map()), actionCollection, moduleId.utf8() );
+ KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, TQT_SLOT(map()), actionCollection, moduleId.utf8() );
uint id = maxId++;
dictionaryAction->plug(popup, id);
dictionaryMapper->setMapping( dictionaryAction, id );
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
num2id.insert(id,idString);
}
}
-void DictionaryMenu::add(const QString& n, const QString& moduleId
- , const QString& key)
+void DictionaryMenu::add(const TQString& n, const TQString& moduleId
+ , const TQString& key)
{
if(popup)
{
- QString name=n;
+ TQString name=n;
- QString keyString=key;
+ TQString keyString=key;
if(keyString.contains("%1"))
{
keyString=key.arg(accel2id.count()+1);
}
KShortcut k(keyString);
- KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, SLOT(map()), actionCollection, key.arg(moduleId).utf8() );
+ KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, TQT_SLOT(map()), actionCollection, key.arg(moduleId).utf8() );
uint id = maxId++;
dictionaryAction->plug(popup,id);
if(!k.isNull())
{
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
accel2id.insert(id,idString);
dictionaryMapper->setMapping( dictionaryAction, id );
@@ -135,7 +135,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId
kdWarning() << "key not valid" << endl;
}
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
num2id.insert(id,idString);
}
}
@@ -143,7 +143,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId
void DictionaryMenu::activated(int id)
{
- QString *idString = num2id[id];
+ TQString *idString = num2id[id];
if(idString)
{
diff --git a/kbabel/kbabeldict/dictionarymenu.h b/kbabel/kbabeldict/dictionarymenu.h
index c688508e..c520501a 100644
--- a/kbabel/kbabeldict/dictionarymenu.h
+++ b/kbabel/kbabeldict/dictionarymenu.h
@@ -33,10 +33,10 @@
#ifndef DICTIONARYMENU_H
#define DICTIONARYMENU_H
-#include <qintdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include <kdemacros.h>
class QSignalMapper;
@@ -48,31 +48,31 @@ class KDE_EXPORT DictionaryMenu : public QObject
Q_OBJECT
public:
- DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, QObject *parent=0);
+ DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, TQObject *parent=0);
~DictionaryMenu();
- void add(const QString& name,const QString& id);
+ void add(const TQString& name,const TQString& id);
/**
* Adds an item to this menu and to the keyboard accelerator.
* If key contains %1 it is replaced with a number 1-9
*/
- void add(const QString& name,const QString& id, const QString& key);
+ void add(const TQString& name,const TQString& id, const TQString& key);
void clear();
signals:
- void activated(const QString moduleId);
+ void activated(const TQString moduleId);
private slots:
void activated(int);
private:
- QGuardedPtr<KPopupMenu> popup;
- QGuardedPtr<KActionCollection> actionCollection;
- QIntDict<QString> num2id;
- QIntDict<QString> accel2id;
- QSignalMapper* dictionaryMapper;
+ TQGuardedPtr<KPopupMenu> popup;
+ TQGuardedPtr<KActionCollection> actionCollection;
+ TQIntDict<TQString> num2id;
+ TQIntDict<TQString> accel2id;
+ TQSignalMapper* dictionaryMapper;
uint maxId;
};
diff --git a/kbabel/kbabeldict/kbabeldict.cpp b/kbabel/kbabeldict/kbabeldict.cpp
index ebb68227..cae04d07 100644
--- a/kbabel/kbabeldict/kbabeldict.cpp
+++ b/kbabel/kbabeldict/kbabeldict.cpp
@@ -47,13 +47,13 @@ KBabelDict::KBabelDict()
, i18n("About"), i18n("About Module")
, i18n("Hide Sett&ings"))
{
- connect(this, SIGNAL(closeClicked()),this,SLOT(saveConfig()));
- connect(this, SIGNAL(closeClicked()),this,SLOT(quit()));
+ connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(saveConfig()));
+ connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(quit()));
view = new KBabelDictView(this);
- connect(this, SIGNAL(user1Clicked()), view, SLOT(about()));
- connect(this, SIGNAL(user2Clicked()), view, SLOT(aboutModule()));
- connect(this, SIGNAL(user3Clicked()), this, SLOT(togglePref()));
+ connect(this, TQT_SIGNAL(user1Clicked()), view, TQT_SLOT(about()));
+ connect(this, TQT_SIGNAL(user2Clicked()), view, TQT_SLOT(aboutModule()));
+ connect(this, TQT_SIGNAL(user3Clicked()), this, TQT_SLOT(togglePref()));
// HACK: hide default button, otherwise it would be Help button
showButtonOK(false);
diff --git a/kbabel/kbabeldict/kbabeldictbox.cpp b/kbabel/kbabeldict/kbabeldictbox.cpp
index 2beed684..f6ca948f 100644
--- a/kbabel/kbabeldict/kbabeldictbox.cpp
+++ b/kbabel/kbabeldict/kbabeldictbox.cpp
@@ -58,17 +58,17 @@
#include <ktrader.h>
#include <kwin.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtextview.h>
-#include <qstylesheet.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtextview.h>
+#include <tqstylesheet.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#define KBABELDICT 5321
@@ -77,9 +77,9 @@ using namespace KBabel;
class ResultListItem : public QListViewItem
{
public:
- ResultListItem(QListView *parent, const SearchResult& result,bool richText);
+ ResultListItem(TQListView *parent, const SearchResult& result,bool richText);
- virtual QString key(int column, bool ascending) const;
+ virtual TQString key(int column, bool ascending) const;
const SearchResult* result() const;
bool richText() const { return _richText; }
@@ -88,9 +88,9 @@ private:
bool _richText;
};
-ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
+ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result
, bool richText)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
, _result(result)
, _richText(richText)
{
@@ -99,9 +99,9 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
score=0;
else if(score>100)
score=100;
- setText(0,QString::number(score));
+ setText(0,TQString::number(score));
- QString tmp;
+ TQString tmp;
if(richText)
tmp=_result.plainFound;
else
@@ -160,17 +160,17 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
}
-QString ResultListItem::key(int column, bool ascending) const
+TQString ResultListItem::key(int column, bool ascending) const
{
if(column==0)
{
- QString result=QString::number(_result.score);
+ TQString result=TQString::number(_result.score);
result=result.rightJustify(10,'0');
return result;
}
- return QListViewItem::key(column,ascending);
+ return TQListViewItem::key(column,ascending);
}
const SearchResult *ResultListItem::result() const
@@ -182,8 +182,8 @@ const SearchResult *ResultListItem::result() const
* Constructs a KBabelDictBox which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
- : DCOPObject("KBabelDict"), QWidget( parent, name, fl )
+KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
+ : DCOPObject("KBabelDict"), TQWidget( parent, name, fl )
{
active=-1;
currentResult=0;
@@ -191,39 +191,39 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
moduleList.setAutoDelete(false);
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
mainLayout->setMargin(KDialog::marginHint());
mainLayout->setSpacing(KDialog::spacingHint());
- QGridLayout *grid = new QGridLayout(mainLayout);
+ TQGridLayout *grid = new TQGridLayout(mainLayout);
- QHBoxLayout *hbox = new QHBoxLayout;
- QLabel *label = new QLabel(i18n("Total:"),this);
+ TQHBoxLayout *hbox = new QHBoxLayout;
+ TQLabel *label = new TQLabel(i18n("Total:"),this);
hbox->addWidget(label);
- totalResultsLabel = new QLabel("0",this);
+ totalResultsLabel = new TQLabel("0",this);
hbox->addWidget(totalResultsLabel);
grid->addLayout(hbox,0,0);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Current:"), this);
+ label = new TQLabel(i18n("Current:"), this);
hbox->addWidget(label);
- currentLabel = new QLabel("0",this);
+ currentLabel = new TQLabel("0",this);
hbox->addWidget(currentLabel);
grid->addLayout(hbox,1,0);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Found in:"), this);
+ label = new TQLabel(i18n("Found in:"), this);
hbox->addWidget(label);
- locationLabel = new QLabel(this);
+ locationLabel = new TQLabel(this);
hbox->addWidget(locationLabel);
hbox->setStretchFactor(locationLabel,2);
grid->addLayout(hbox,0,1);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Translator:"), this);
+ label = new TQLabel(i18n("Translator:"), this);
hbox->addWidget(label);
- translatorLabel = new QLabel(this);
+ translatorLabel = new TQLabel(this);
translatorLabel->setMinimumSize(50,0);
hbox->addWidget(translatorLabel);
hbox->setStretchFactor(translatorLabel,2);
@@ -233,14 +233,14 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Date:"),this);
+ label = new TQLabel(i18n("Date:"),this);
hbox->addWidget(label);
- dateLabel = new QLabel(this);
+ dateLabel = new TQLabel(this);
dateLabel->setMinimumSize(50,0);
hbox->addWidget(dateLabel);
hbox->setStretchFactor(dateLabel,2);
- moreButton = new QPushButton(this,"moreButton");
+ moreButton = new TQPushButton(this,"moreButton");
moreButton->setText(i18n("&More"));
moreButton->setEnabled(false);
moreButton->setAutoRepeat(true);
@@ -251,33 +251,33 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
hbox->addStretch(1);
- listButton = new QToolButton(Qt::UpArrow,this);
+ listButton = new TQToolButton(Qt::UpArrow,this);
listButton->setFixedSize(20,15);
listButton->setAutoRepeat(false);
- connect(listButton,SIGNAL(clicked()),this,SLOT(showListOnly()));
+ connect(listButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showListOnly()));
hbox->addWidget(listButton);
- detailButton = new QToolButton(Qt::DownArrow,this);
+ detailButton = new TQToolButton(Qt::DownArrow,this);
detailButton->setFixedSize(20,15);
detailButton->setAutoRepeat(false);
- connect(detailButton,SIGNAL(clicked()),this,SLOT(showDetailsOnly()));
+ connect(detailButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showDetailsOnly()));
hbox->addWidget(detailButton);
mainLayout->addLayout(hbox);
- resultSplitter = new QSplitter(Qt::Vertical,this
+ resultSplitter = new TQSplitter(Qt::Vertical,this
,"resultsplitter");
mainLayout->addWidget(resultSplitter);
- viewContainer = new QSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter");
- QVBoxLayout *vbox = new QVBoxLayout(viewContainer);
- vbox->setResizeMode(QLayout::FreeResize);
- origView = new QTextView(viewContainer,"origView");
- origView->setWordWrap( QTextEdit::WidgetWidth );
+ viewContainer = new TQSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter");
+ TQVBoxLayout *vbox = new TQVBoxLayout(viewContainer);
+ vbox->setResizeMode(TQLayout::FreeResize);
+ origView = new TQTextView(viewContainer,"origView");
+ origView->setWordWrap( TQTextEdit::WidgetWidth );
origView->setMinimumSize(1,1);
vbox->addWidget(origView);
- translationView = new QTextView(viewContainer,"translationView");
- origView->setWordWrap( QTextEdit::WidgetWidth );
+ translationView = new TQTextView(viewContainer,"translationView");
+ origView->setWordWrap( TQTextEdit::WidgetWidth );
translationView->setMinimumSize(1,1);
vbox->addWidget(translationView);
viewContainer->setMinimumSize(1,1);
@@ -291,17 +291,17 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
resultListView->installEventFilter(this);
connect(resultListView
- , SIGNAL(doubleClicked(QListViewItem *,const QPoint&,int))
- , this, SLOT(editFile()));
- connect(resultListView, SIGNAL(returnPressed(QListViewItem *))
- , this, SLOT(editFile()));
+ , TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint&,int))
+ , this, TQT_SLOT(editFile()));
+ connect(resultListView, TQT_SIGNAL(returnPressed(TQListViewItem *))
+ , this, TQT_SLOT(editFile()));
connect(resultListView
- , SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint&))
+ , TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint&))
, this
- , SLOT(showContextMenu(KListView *,QListViewItem *,const QPoint&)));
+ , TQT_SLOT(showContextMenu(KListView *,TQListViewItem *,const TQPoint&)));
- resultSplitter->setResizeMode(viewContainer,QSplitter::KeepSize);
- QValueList<int> sizes;
+ resultSplitter->setResizeMode(viewContainer,TQSplitter::KeepSize);
+ TQValueList<int> sizes;
sizes.append(50);
sizes.append(50);
resultSplitter->setSizes(sizes);
@@ -310,12 +310,12 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
hbox->addStretch(1);
- prevButton = new QPushButton(i18n("< &Previous"),this);
+ prevButton = new TQPushButton(i18n("< &Previous"),this);
prevButton->setEnabled(false);
prevButton->setAutoRepeat(true);
hbox->addWidget(prevButton);
- nextButton = new QPushButton(i18n("&Next >"),this);
+ nextButton = new TQPushButton(i18n("&Next >"),this);
nextButton->setEnabled(false);
nextButton->setAutoRepeat(true);
hbox->addWidget(nextButton);
@@ -330,21 +330,21 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
currentLabel->setFixedSize(currentLabel->sizeHint());
currentLabel->setNum(0);
- setRMBMenu(new QPopupMenu(this));
- QStringList fileList;
+ setRMBMenu(new TQPopupMenu(this));
+ TQStringList fileList;
#if 0
// try to find installed modules by looking into directories
// kbabeldict/modules and getting all files *.rc
- QStringList dirList = KGlobal::dirs()->findDirs("data"
+ TQStringList dirList = KGlobal::dirs()->findDirs("data"
,"kbabeldict/modules");
- for ( QStringList::Iterator it = dirList.begin(); it != dirList.end()
+ for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end()
; ++it )
{
- QDir dir((*it),"*.rc");
- QStringList list = dir.entryList(QDir::Files|QDir::Readable);
+ TQDir dir((*it),"*.rc");
+ TQStringList list = dir.entryList(TQDir::Files|TQDir::Readable);
- for ( QStringList::Iterator fit = list.begin(); fit != list.end()
+ for ( TQStringList::Iterator fit = list.begin(); fit != list.end()
; ++fit )
{
if(!fileList.contains((*fit)))
@@ -357,28 +357,28 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
// use locate to locate the actual file, because rcfiles in the users
// directory is prefered for systemwide rc files
- QStringList rcList;
- for( QStringList::Iterator fit = fileList.begin(); fit != fileList.end();
+ TQStringList rcList;
+ for( TQStringList::Iterator fit = fileList.begin(); fit != fileList.end();
++fit)
{
rcList.append(locate("data","kbabeldict/modules/"+(*fit)));
}
- for( QStringList::Iterator rit = rcList.begin(); rit != rcList.end();
+ for( TQStringList::Iterator rit = rcList.begin(); rit != rcList.end();
++rit)
{
KConfig rcConfig((*rit),true,false);
rcConfig.setGroup("SearchEngine");
- QStringList appList = rcConfig.readListEntry("Applications");
+ TQStringList appList = rcConfig.readListEntry("Applications");
KInstance *inst = KGlobal::instance();
if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName()))
{
continue;
}
- QString libName = rcConfig.readEntry("Lib");
+ TQString libName = rcConfig.readEntry("Lib");
if(!libName.isNull())
{
@@ -464,9 +464,9 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
}
}
- connect(nextButton,SIGNAL(clicked()),this,SLOT(slotNextResult()));
- connect(prevButton,SIGNAL(clicked()),this,SLOT(slotPrevResult()));
- connect(moreButton,SIGNAL(clicked()),this,SLOT(nextInfo()));
+ connect(nextButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextResult()));
+ connect(prevButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPrevResult()));
+ connect(moreButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(nextInfo()));
origView->installEventFilter(this);
@@ -475,8 +475,8 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
resultListView->setSorting(0,false);
resultListView->setAllColumnsShowFocus(true);
- connect(resultListView,SIGNAL(selectionChanged(QListViewItem*))
- , this, SLOT(showResult(QListViewItem*)));
+ connect(resultListView,TQT_SIGNAL(selectionChanged(TQListViewItem*))
+ , this, TQT_SLOT(showResult(TQListViewItem*)));
}
/*
@@ -490,18 +490,18 @@ void KBabelDictBox::registerModule( SearchEngine* e )
{
active = 0;
moduleList.append(e);
- connect(e, SIGNAL(started()),this,SIGNAL(searchStarted()));
- connect(e, SIGNAL(finished()),this,SIGNAL(searchStopped()));
- connect(e, SIGNAL(finished()),this
- ,SLOT(clearModuleResults()));
- connect(e, SIGNAL(progress(int)),this,SIGNAL(progressed(int)));
- connect(e, SIGNAL(progressStarts(const QString&)),this
- , SIGNAL(progressStarts(const QString&)));
- connect(e, SIGNAL(progressEnds()),this,SIGNAL(progressEnds()));
- connect(e, SIGNAL(resultFound(const SearchResult*)), this
- , SLOT(addResult(const SearchResult*)));
- connect(e, SIGNAL(hasError(const QString&)), this
- , SIGNAL(errorInModule(const QString&)));
+ connect(e, TQT_SIGNAL(started()),this,TQT_SIGNAL(searchStarted()));
+ connect(e, TQT_SIGNAL(finished()),this,TQT_SIGNAL(searchStopped()));
+ connect(e, TQT_SIGNAL(finished()),this
+ ,TQT_SLOT(clearModuleResults()));
+ connect(e, TQT_SIGNAL(progress(int)),this,TQT_SIGNAL(progressed(int)));
+ connect(e, TQT_SIGNAL(progressStarts(const TQString&)),this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(e, TQT_SIGNAL(progressEnds()),this,TQT_SIGNAL(progressEnds()));
+ connect(e, TQT_SIGNAL(resultFound(const SearchResult*)), this
+ , TQT_SLOT(addResult(const SearchResult*)));
+ connect(e, TQT_SIGNAL(hasError(const TQString&)), this
+ , TQT_SIGNAL(errorInModule(const TQString&)));
}
void KBabelDictBox::saveSettings(KConfigBase *config)
@@ -527,7 +527,7 @@ void KBabelDictBox::saveSettings(KConfigBase *config)
}
-void KBabelDictBox::saveSettings(const QString& moduleId, KConfigBase *config)
+void KBabelDictBox::saveSettings(const TQString& moduleId, KConfigBase *config)
{
SearchEngine *e;
@@ -545,11 +545,11 @@ void KBabelDictBox::readSettings(KConfigBase *config)
{
SearchEngine *e;
KConfigGroupSaver cs(config,"KBabelDict");
- QValueList<int> sizes=config->readIntListEntry("ResultSplitter");
+ TQValueList<int> sizes=config->readIntListEntry("ResultSplitter");
if(!sizes.isEmpty())
resultSplitter->setSizes(sizes);
- QString m = config->readEntry("ActiveModule");
+ TQString m = config->readEntry("ActiveModule");
if(!m.isEmpty())
{
setActiveModule(m);
@@ -562,7 +562,7 @@ void KBabelDictBox::readSettings(KConfigBase *config)
}
}
-void KBabelDictBox::readSettings(const QString& moduleId, KConfigBase *config)
+void KBabelDictBox::readSettings(const TQString& moduleId, KConfigBase *config)
{
SearchEngine *e;
@@ -626,7 +626,7 @@ void KBabelDictBox::setActiveModule(int a)
}
}
-void KBabelDictBox::setActiveModule(QString id)
+void KBabelDictBox::setActiveModule(TQString id)
{
SearchEngine *e;
@@ -647,7 +647,7 @@ void KBabelDictBox::setActiveModule(QString id)
/*
* public slot
*/
-void KBabelDictBox::startSearch(const QString text)
+void KBabelDictBox::startSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -661,8 +661,8 @@ void KBabelDictBox::startSearch(const QString text)
if(engine->isSearching())
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
searchText=text;
}
@@ -673,7 +673,7 @@ void KBabelDictBox::startSearch(const QString text)
/*
* public slot
*/
-void KBabelDictBox::startTranslationSearch(const QString text)
+void KBabelDictBox::startTranslationSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -687,8 +687,8 @@ void KBabelDictBox::startTranslationSearch(const QString text)
if(engine->isSearching())
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
searchText=text;
}
@@ -696,7 +696,7 @@ void KBabelDictBox::startTranslationSearch(const QString text)
}
}
-void KBabelDictBox::startDelayedSearch(const QString text)
+void KBabelDictBox::startDelayedSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -713,18 +713,18 @@ void KBabelDictBox::startDelayedSearch(const QString text)
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
}
else
{
- QTimer::singleShot(5,this,SLOT(startDelayedSearch()));
+ TQTimer::singleShot(5,this,TQT_SLOT(startDelayedSearch()));
}
}
}
-void KBabelDictBox::startDelayedTranslationSearch(const QString text)
+void KBabelDictBox::startDelayedTranslationSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -741,25 +741,25 @@ void KBabelDictBox::startDelayedTranslationSearch(const QString text)
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
}
else
{
- QTimer::singleShot(5,this,SLOT(startDelayedTranslationSearch()));
+ TQTimer::singleShot(5,this,TQT_SLOT(startDelayedTranslationSearch()));
}
}
}
-QString KBabelDictBox::translate(const QString text)
+TQString KBabelDictBox::translate(const TQString text)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -772,14 +772,14 @@ QString KBabelDictBox::translate(const QString text)
}
}
-QString KBabelDictBox::fuzzyTranslation(const QString text, int &score)
+TQString KBabelDictBox::fuzzyTranslation(const TQString text, int &score)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -792,14 +792,14 @@ QString KBabelDictBox::fuzzyTranslation(const QString text, int &score)
}
}
-QString KBabelDictBox::searchTranslation(const QString text, int &score)
+TQString KBabelDictBox::searchTranslation(const TQString text, int &score)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -824,8 +824,8 @@ void KBabelDictBox::startDelayedSearch()
}
else
{
- disconnect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ disconnect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
engine->startSearch(searchText);
@@ -844,8 +844,8 @@ void KBabelDictBox::startDelayedTranslationSearch()
}
else
{
- disconnect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ disconnect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
engine->startSearchInTranslation(searchText);
@@ -884,9 +884,9 @@ bool KBabelDictBox::isSearching()
}
-QStringList KBabelDictBox::moduleNames()
+TQStringList KBabelDictBox::moduleNames()
{
- QStringList list;
+ TQStringList list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -897,9 +897,9 @@ QStringList KBabelDictBox::moduleNames()
return list;
}
-QStringList KBabelDictBox::modules()
+TQStringList KBabelDictBox::modules()
{
- QStringList list;
+ TQStringList list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -910,9 +910,9 @@ QStringList KBabelDictBox::modules()
return list;
}
-QPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
+TQPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
{
- QPtrList<ModuleInfo> list;
+ TQPtrList<ModuleInfo> list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -929,9 +929,9 @@ QPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
}
-QPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(QWidget *parent)
+TQPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(TQWidget *parent)
{
- QPtrList<PrefWidget> list;
+ TQPtrList<PrefWidget> list;
list.setAutoDelete(false);
SearchEngine *e;
@@ -945,7 +945,7 @@ QPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(QWidget *parent)
}
-void KBabelDictBox::showResult(QListViewItem *item)
+void KBabelDictBox::showResult(TQListViewItem *item)
{
ResultListItem *resultItem = static_cast<ResultListItem*>(item);
@@ -979,14 +979,14 @@ void KBabelDictBox::showResult(QListViewItem *item)
else
{
// FIXME: what about plural forms?
- origView->setText(QStyleSheet::convertFromPlainText(result->found.first()));
+ origView->setText(TQStyleSheet::convertFromPlainText(result->found.first()));
translationView->setText(
- QStyleSheet::convertFromPlainText(result->translation));
+ TQStyleSheet::convertFromPlainText(result->translation));
}
if(result->descriptions.count() > 0)
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
TranslationInfo *info=it.current();
if(info)
{
@@ -1030,7 +1030,7 @@ void KBabelDictBox::showResult(QListViewItem *item)
moreButton->setEnabled((result->descriptions.count() > 1));
- currentLabel->setText(QString::number(currentResult+1));
+ currentLabel->setText(TQString::number(currentResult+1));
prevButton->setEnabled(currentResult > 0);
nextButton->setEnabled(currentResult+1 < total);
@@ -1040,7 +1040,7 @@ void KBabelDictBox::showResult(QListViewItem *item)
void KBabelDictBox::nextResult()
{
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
item=item->itemBelow();
@@ -1054,7 +1054,7 @@ void KBabelDictBox::nextResult()
void KBabelDictBox::prevResult()
{
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
item=item->itemAbove();
@@ -1077,7 +1077,7 @@ void KBabelDictBox::addResult(const SearchResult* result)
return;
}
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
int index=0;
if(item)
{
@@ -1086,7 +1086,7 @@ void KBabelDictBox::addResult(const SearchResult* result)
new ResultListItem(resultListView, *result,e->usesRichTextResults());
total++;
- totalResultsLabel->setText(QString::number(total));
+ totalResultsLabel->setText(TQString::number(total));
if(total==1)
{
@@ -1108,8 +1108,8 @@ void KBabelDictBox::clear()
dateLabel->setText("");
locationLabel->setText("");
translatorLabel->setText("");
- currentLabel->setText(QString::number(0));
- totalResultsLabel->setText(QString::number(0));
+ currentLabel->setText(TQString::number(0));
+ totalResultsLabel->setText(TQString::number(0));
origView->setText("");
translationView->setText("");
currentResult=0;
@@ -1150,13 +1150,13 @@ void KBabelDictBox::nextInfo()
TranslationInfo *info;
if(currentInfo == (int)result->descriptions.count())
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
info = it.current();
currentInfo = 0;
}
else
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
for(int i=0; i < currentInfo; i++)
{
++it;
@@ -1199,7 +1199,7 @@ void KBabelDictBox::nextInfo()
void KBabelDictBox::showListOnly()
{
int h=resultSplitter->height();
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes.append(1);
sizes.append(h-1);
resultSplitter->setSizes(sizes);
@@ -1208,7 +1208,7 @@ void KBabelDictBox::showListOnly()
void KBabelDictBox::showDetailsOnly()
{
int h=resultSplitter->height();
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes.append(h-1);
sizes.append(h);
resultSplitter->setSizes(sizes);
@@ -1234,7 +1234,7 @@ void KBabelDictBox::about()
if(aboutData)
{
- QString text = aboutData->programName() + " " +
+ TQString text = aboutData->programName() + " " +
aboutData->version() + "\n";
text += "\n"+aboutData->shortDescription()+"\n";
@@ -1258,7 +1258,7 @@ void KBabelDictBox::about()
.arg(aboutData->bugAddress()) +"\n";
}
- QLabel *label = new QLabel(text,0);
+ TQLabel *label = new TQLabel(text,0);
page->addWidget(label);
int authorCount = aboutData->authors().count();
@@ -1269,10 +1269,10 @@ void KBabelDictBox::about()
else
text=i18n("Authors:");
- label = new QLabel(text,0);
+ label = new TQLabel(text,0);
page->addWidget(label);
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for(it = aboutData->authors().begin();
it != aboutData->authors().end(); ++it)
{
@@ -1284,10 +1284,10 @@ void KBabelDictBox::about()
if(creditsCount)
{
text = i18n("Thanks to:");
- label = new QLabel(text,0);
+ label = new TQLabel(text,0);
page->addWidget(label);
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for(it = aboutData->credits().begin();
it != aboutData->credits().end(); ++it)
{
@@ -1299,14 +1299,14 @@ void KBabelDictBox::about()
}
else
{
- QString text = i18n("No information available.");
- QLabel *label = new QLabel(text,0);
+ TQString text = i18n("No information available.");
+ TQLabel *label = new TQLabel(text,0);
page->addWidget(label);
}
}
- aboutDlg->setInitialSize(QSize(400,1));
+ aboutDlg->setInitialSize(TQSize(400,1));
aboutDlg->exec();
delete aboutDlg;
@@ -1321,7 +1321,7 @@ void KBabelDictBox::aboutActiveModule()
aboutModule(engine->id());
}
-void KBabelDictBox::aboutModule(const QString& id)
+void KBabelDictBox::aboutModule(const TQString& id)
{
SearchEngine *e;
@@ -1360,12 +1360,12 @@ void KBabelDictBox::slotStopSearch()
stopSearch();
}
-void KBabelDictBox::slotStartSearch(const QString& text)
+void KBabelDictBox::slotStartSearch(const TQString& text)
{
startSearch(text);
}
-void KBabelDictBox::setEditedPackage(const QString& name)
+void KBabelDictBox::setEditedPackage(const TQString& name)
{
SearchEngine *e;
@@ -1376,7 +1376,7 @@ void KBabelDictBox::setEditedPackage(const QString& name)
}
-void KBabelDictBox::setEditedFile(const QString& path)
+void KBabelDictBox::setEditedFile(const TQString& path)
{
SearchEngine *e;
@@ -1386,8 +1386,8 @@ void KBabelDictBox::setEditedFile(const QString& path)
}
}
-void KBabelDictBox::setLanguage(const QString& languageCode,
- const QString& languageName)
+void KBabelDictBox::setLanguage(const TQString& languageCode,
+ const TQString& languageName)
{
SearchEngine *e;
@@ -1415,11 +1415,11 @@ void KBabelDictBox::copy()
}
}
-QString KBabelDictBox::translation()
+TQString KBabelDictBox::translation()
{
- QString trans;
+ TQString trans;
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
ResultListItem *r=static_cast<ResultListItem*>(item);
@@ -1439,7 +1439,7 @@ QString KBabelDictBox::translation()
return trans;
}
-void KBabelDictBox::setRMBMenu(QPopupMenu *popup)
+void KBabelDictBox::setRMBMenu(TQPopupMenu *popup)
{
if(popup)
{
@@ -1447,7 +1447,7 @@ void KBabelDictBox::setRMBMenu(QPopupMenu *popup)
popup->insertSeparator();
editFileIndex = popup->insertItem(i18n("Edit File")
- , this, SLOT(editFile()));
+ , this, TQT_SLOT(editFile()));
popup->setItemEnabled(editFileIndex,false);
KContextMenuManager::insert(origView,popup);
@@ -1474,9 +1474,9 @@ bool KBabelDictBox::hasSelectedText() const
return have;
}
-QString KBabelDictBox::selectedText() const
+TQString KBabelDictBox::selectedText() const
{
- QString text;
+ TQString text;
if(origView->hasSelectedText())
text=origView->selectedText();
else if(translationView->hasSelectedText())
@@ -1487,10 +1487,10 @@ QString KBabelDictBox::selectedText() const
-void KBabelDictBox::configure(const QString& id, bool modal)
+void KBabelDictBox::configure(const TQString& id, bool modal)
{
- QWidget* w = prefDialogs[id];
+ TQWidget* w = prefDialogs[id];
if(w)
{
KWin::setActiveWindow(w->winId());
@@ -1502,23 +1502,23 @@ void KBabelDictBox::configure(const QString& id, bool modal)
{
if(e->id() == id)
{
- QString caption = i18n("Configure Dictionary %1").arg(e->name());
+ TQString caption = i18n("Configure Dictionary %1").arg(e->name());
KDialogBase *dialog = new KDialogBase(this,"prefDialog"
, modal, caption
, KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel|
KDialogBase::Default);
- QWhatsThis::add(dialog,"");
+ TQWhatsThis::add(dialog,"");
PrefWidget *prefWidget = e->preferencesWidget(dialog);
dialog->setMainWidget(prefWidget);
- connect(dialog, SIGNAL(okClicked()),prefWidget,SLOT(apply()));
- connect(dialog, SIGNAL(applyClicked()),prefWidget,SLOT(apply()));
- connect(dialog, SIGNAL(defaultClicked()),prefWidget,SLOT(standard()));
- connect(dialog, SIGNAL(cancelClicked()),prefWidget,SLOT(cancel()));
+ connect(dialog, TQT_SIGNAL(okClicked()),prefWidget,TQT_SLOT(apply()));
+ connect(dialog, TQT_SIGNAL(applyClicked()),prefWidget,TQT_SLOT(apply()));
+ connect(dialog, TQT_SIGNAL(defaultClicked()),prefWidget,TQT_SLOT(standard()));
+ connect(dialog, TQT_SIGNAL(cancelClicked()),prefWidget,TQT_SLOT(cancel()));
- connect(dialog, SIGNAL(finished()),this,SLOT(destroyConfigDialog()));
+ connect(dialog, TQT_SIGNAL(finished()),this,TQT_SLOT(destroyConfigDialog()));
prefDialogs.insert(id,dialog);
@@ -1534,7 +1534,7 @@ void KBabelDictBox::configure(const QString& id, bool modal)
void KBabelDictBox::destroyConfigDialog()
{
- const QObject *obj = sender();
+ const TQObject *obj = sender();
if(obj && obj->inherits("KDialogBase"))
{
KDialogBase *dialog = (KDialogBase*)obj;
@@ -1542,7 +1542,7 @@ void KBabelDictBox::destroyConfigDialog()
{
dialog->delayedDestruct();
- QDictIterator<QWidget> it(prefDialogs);
+ TQDictIterator<TQWidget> it(prefDialogs);
while(it.current() != dialog)
{
++it;
@@ -1553,7 +1553,7 @@ void KBabelDictBox::destroyConfigDialog()
}
}
-void KBabelDictBox::edit(const QString& id)
+void KBabelDictBox::edit(const TQString& id)
{
SearchEngine *e;
@@ -1579,8 +1579,8 @@ void KBabelDictBox::edit()
engine->edit();
}
-void KBabelDictBox::setTextChanged(const QStringList& orig,
- const QString& translation, uint pluralForm, const QString& description)
+void KBabelDictBox::setTextChanged(const TQStringList& orig,
+ const TQString& translation, uint pluralForm, const TQString& description)
{
SearchEngine *e;
@@ -1591,7 +1591,7 @@ void KBabelDictBox::setTextChanged(const QStringList& orig,
}
-void KBabelDictBox::wheelEvent(QWheelEvent *we)
+void KBabelDictBox::wheelEvent(TQWheelEvent *we)
{
if(we->delta() > 0)
{
@@ -1605,18 +1605,18 @@ void KBabelDictBox::wheelEvent(QWheelEvent *we)
we->accept();
}
-bool KBabelDictBox::eventFilter(QObject *o, QEvent *e)
+bool KBabelDictBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(e->type() == QEvent::Wheel)
+ if(e->type() == TQEvent::Wheel)
{
- QWheelEvent *we = static_cast<QWheelEvent*>(e);
+ TQWheelEvent *we = static_cast<TQWheelEvent*>(e);
if(we)
{
wheelEvent(we);
return true;
}
}
- else if(e->type() == QEvent::Resize && o == resultListView)
+ else if(e->type() == TQEvent::Resize && o == resultListView)
{
if(resultListView->height() < 2)
{
@@ -1655,7 +1655,7 @@ void KBabelDictBox::editFile()
if(!result->descriptions.isEmpty())
{
TranslationInfo *info;
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
for(int i=0; i < currentInfo; i++)
{
++it;
@@ -1664,8 +1664,8 @@ void KBabelDictBox::editFile()
if(!info->filePath.isEmpty())
{
- QString url = info->filePath;
- QString msgid;
+ TQString url = info->filePath;
+ TQString msgid;
if( item->richText() )
{
@@ -1685,8 +1685,8 @@ void KBabelDictBox::editFile()
{
kdDebug(KBABELDICT) << "kbabel is not registered" << endl;
- QString error;
- QStringList argList;
+ TQString error;
+ TQStringList argList;
argList.append("--nosplash");
argList.append("--gotomsgid");
argList.append(msgid.local8Bit());
@@ -1702,11 +1702,11 @@ void KBabelDictBox::editFile()
}
else
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << url.utf8() << msgid.utf8();
if (!dcop->send("kbabel", "KBabelIFace"
- , "gotoFileEntry(QCString,QCString)",data))
+ , "gotoFileEntry(TQCString,TQCString)",data))
{
KMessageBox::sorry(this
,i18n("There was an error using DCOP."));
@@ -1717,7 +1717,7 @@ void KBabelDictBox::editFile()
}
}
-void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p)
+void KBabelDictBox::showContextMenu(KListView *,TQListViewItem *,const TQPoint& p)
{
if(rmbPopup)
{
@@ -1726,8 +1726,8 @@ void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p)
}
-bool KBabelDictBox::messagesForPackage(const QString& package
- , QValueList<DiffEntry>& resultList, QString& error)
+bool KBabelDictBox::messagesForPackage(const TQString& package
+ , TQValueList<DiffEntry>& resultList, TQString& error)
{
setActiveModule("dbsearchengine");
SearchEngine *engine = moduleList.at(active);
@@ -1740,7 +1740,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package
return false;
}
- QValueList<SearchResult> rList;
+ TQValueList<SearchResult> rList;
SearchFilter* filter = new SearchFilter();
filter->setLocation(package);
@@ -1749,7 +1749,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package
if(success)
{
- QValueList<SearchResult>::Iterator it;
+ TQValueList<SearchResult>::Iterator it;
for(it=rList.begin(); it != rList.end(); ++it)
{
// FIXME: what about plural forms?
diff --git a/kbabel/kbabeldict/kbabeldictbox.h b/kbabel/kbabeldict/kbabeldictbox.h
index 8168786e..2c3992f1 100644
--- a/kbabel/kbabeldict/kbabeldictbox.h
+++ b/kbabel/kbabeldict/kbabeldictbox.h
@@ -37,10 +37,10 @@
#include "searchengine.h"
#include "catalog.h"
-#include <qdict.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
class KListView;
class QLabel;
@@ -53,36 +53,36 @@ class QToolButton;
struct ModuleInfo
{
- QString id;
- QString name;
+ TQString id;
+ TQString name;
bool editable;
};
-class KDE_EXPORT KBabelDictBox : public QWidget, virtual public KBabelDictIFace
+class KDE_EXPORT KBabelDictBox : public TQWidget, virtual public KBabelDictIFace
{
Q_OBJECT
public:
- KBabelDictBox( QWidget* parent = 0, const char* name = 0
+ KBabelDictBox( TQWidget* parent = 0, const char* name = 0
, WFlags fl = 0 );
~KBabelDictBox();
/** @returns ids of available modules */
- virtual QStringList modules();
+ virtual TQStringList modules();
/** @returns (translated) names of available modules */
- QStringList moduleNames();
+ TQStringList moduleNames();
/**
* @returns a list with information about the available modules
* Take care about, that you have to delete the items by yourself.
*/
- QPtrList<ModuleInfo> moduleInfos();
+ TQPtrList<ModuleInfo> moduleInfos();
/** @returns preferencesWidgets of modules */
- QPtrList<PrefWidget> modPrefWidgets(QWidget* parent);
+ TQPtrList<PrefWidget> modPrefWidgets(TQWidget* parent);
int activeModule();
bool activeModuleEditable();
@@ -95,15 +95,15 @@ public:
void nextResult();
void prevResult();
- void startSearch(const QString);
- void startTranslationSearch(const QString);
- void startDelayedSearch(const QString);
- void startDelayedTranslationSearch(const QString);
- QString translate(const QString);
- QString searchTranslation(const QString, int& score);
- QString fuzzyTranslation(const QString, int& score);
+ void startSearch(const TQString);
+ void startTranslationSearch(const TQString);
+ void startDelayedSearch(const TQString);
+ void startDelayedTranslationSearch(const TQString);
+ TQString translate(const TQString);
+ TQString searchTranslation(const TQString, int& score);
+ TQString fuzzyTranslation(const TQString, int& score);
void stopSearch();
- void setActiveModule(QString name);
+ void setActiveModule(TQString name);
/**
* @returns true, if a search is active at the moment
@@ -120,7 +120,7 @@ public:
* Saves the settings of the given module
* in the given config object.
*/
- void saveSettings(const QString& moduleId, KConfigBase *config);
+ void saveSettings(const TQString& moduleId, KConfigBase *config);
/**
* Reads the settings including the settings of the different modules
@@ -132,20 +132,20 @@ public:
* Reads the settings of the given module
* from the given config object.
*/
- void readSettings(const QString& moduleId, KConfigBase *config);
+ void readSettings(const TQString& moduleId, KConfigBase *config);
/** @returns the translation of the current search result */
- QString translation();
+ TQString translation();
bool hasSelectedText() const;
- QString selectedText() const;
+ TQString selectedText() const;
- void setRMBMenu(QPopupMenu *popup);
+ void setRMBMenu(TQPopupMenu *popup);
- virtual bool eventFilter(QObject *, QEvent*);
+ virtual bool eventFilter(TQObject *, TQEvent*);
/**
@@ -153,37 +153,37 @@ public:
* from dbsearchengine. When dbsearchengine allows multiple access to
* the database this will get removed.
*/
- bool messagesForPackage(const QString& package
- , QValueList<KBabel::DiffEntry>& resultList, QString& error);
+ bool messagesForPackage(const TQString& package
+ , TQValueList<KBabel::DiffEntry>& resultList, TQString& error);
public slots:
virtual void setActiveModule(int);
- void slotStartSearch(const QString&);
+ void slotStartSearch(const TQString&);
void slotStopSearch();
void slotNextResult();
void slotPrevResult();
void about();
- void aboutModule(const QString& moduleID);
+ void aboutModule(const TQString& moduleID);
void aboutActiveModule();
/**
* sets the name of the package currently edited
*/
- void setEditedPackage(const QString& packageName);
+ void setEditedPackage(const TQString& packageName);
/**
* sets the filepath of the package currently edited
*/
- void setEditedFile(const QString& path);
+ void setEditedFile(const TQString& path);
/** sets the language code to use */
- void setLanguage(const QString& languageCode
- , const QString& languageName);
+ void setLanguage(const TQString& languageCode
+ , const TQString& languageName);
- void setTextChanged(const QStringList& orig, const QString& translation,
- uint pluralForm, const QString& description);
+ void setTextChanged(const TQStringList& orig, const TQString& translation,
+ uint pluralForm, const TQString& description);
/**
* if text is marked, copy this into the clipboard, otherwise
@@ -191,8 +191,8 @@ public slots:
*/
void copy();
- void configure(const QString& moduleID, bool modal=false);
- void edit(const QString& moduleID);
+ void configure(const TQString& moduleID, bool modal=false);
+ void edit(const TQString& moduleID);
void edit();
void clear();
@@ -202,11 +202,11 @@ signals:
void searchStarted();
void searchStopped();
void progressed(int);
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
void activeModuleChanged(int);
void activeModuleChanged(bool editable);
- void errorInModule(const QString& error);
+ void errorInModule(const TQString& error);
/**
* emitted when either the order
@@ -215,14 +215,14 @@ signals:
void modulesChanged();
protected slots:
- void showResult(QListViewItem*);
+ void showResult(TQListViewItem*);
void addResult(const SearchResult*);
void nextInfo();
void showDetailsOnly();
void showListOnly();
void clearModuleResults();
void editFile();
- void showContextMenu(KListView *, QListViewItem *, const QPoint&);
+ void showContextMenu(KListView *, TQListViewItem *, const TQPoint&);
/**
* This slots gets connected to a SearchEngine's searchStopped() signal,
@@ -239,7 +239,7 @@ protected slots:
void destroyConfigDialog();
protected:
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
private:
/**
@@ -247,36 +247,36 @@ private:
*/
void registerModule( SearchEngine* module);
- QPtrList<SearchEngine> moduleList;
+ TQPtrList<SearchEngine> moduleList;
int active;
int currentResult;
int currentInfo;
int total;
/** stores a string to be used with delayed search */
- QString searchText;
-
- QDict<QWidget> prefDialogs;
-
- QLabel *translatorLabel;
- QLabel *locationLabel;
- QLabel *totalResultsLabel;
- QLabel *currentLabel;
- QLabel *dateLabel;
- QPushButton *moreButton;
- QPushButton *nextButton;
- QPushButton *prevButton;
- QTextView *origView;
- QTextView *translationView;
- QSplitter *viewContainer;
+ TQString searchText;
+
+ TQDict<TQWidget> prefDialogs;
+
+ TQLabel *translatorLabel;
+ TQLabel *locationLabel;
+ TQLabel *totalResultsLabel;
+ TQLabel *currentLabel;
+ TQLabel *dateLabel;
+ TQPushButton *moreButton;
+ TQPushButton *nextButton;
+ TQPushButton *prevButton;
+ TQTextView *origView;
+ TQTextView *translationView;
+ TQSplitter *viewContainer;
KListView *resultListView;
- QSplitter *resultSplitter;
+ TQSplitter *resultSplitter;
- QToolButton *listButton;
- QToolButton *detailButton;
+ TQToolButton *listButton;
+ TQToolButton *detailButton;
int editFileIndex;
- QGuardedPtr<QPopupMenu> rmbPopup;
+ TQGuardedPtr<TQPopupMenu> rmbPopup;
};
#endif // KBABELDICTBOX_H
diff --git a/kbabel/kbabeldict/kbabeldictiface.h b/kbabel/kbabeldict/kbabeldictiface.h
index 0b98a565..d576d4c5 100644
--- a/kbabel/kbabeldict/kbabeldictiface.h
+++ b/kbabel/kbabeldict/kbabeldictiface.h
@@ -35,17 +35,17 @@
#define KBABELDICTINTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KBabelDictIFace : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual QStringList modules() = 0;
- virtual ASYNC setActiveModule(QString modulename) = 0;
+ virtual TQStringList modules() = 0;
+ virtual ASYNC setActiveModule(TQString modulename) = 0;
- virtual ASYNC startSearch(const QString searchstring) = 0;
+ virtual ASYNC startSearch(const TQString searchstring) = 0;
virtual ASYNC stopSearch() = 0;
virtual ASYNC nextResult()=0;
diff --git a/kbabel/kbabeldict/kbabeldictview.cpp b/kbabel/kbabeldict/kbabeldictview.cpp
index 26afd981..b5be8399 100644
--- a/kbabel/kbabeldict/kbabeldictview.cpp
+++ b/kbabel/kbabeldict/kbabeldictview.cpp
@@ -37,17 +37,17 @@
#include "searchengine.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qwidgetstack.h>
-#include <qsplitter.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqwidgetstack.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -64,37 +64,37 @@
* Constructs a KBabelDictView which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+KBabelDictView::KBabelDictView( TQWidget* parent, const char* name, WFlags fl )
+ : TQWidget( parent, name, fl )
{
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
mainLayout->setSpacing(KDialog::spacingHint());
mainLayout->setMargin(KDialog::marginHint());
- splitter = new QSplitter(this);
+ splitter = new TQSplitter(this);
mainLayout->addWidget(splitter);
- QWidget *w = new QWidget(splitter);
- QVBoxLayout *wLayout= new QVBoxLayout(w);
+ TQWidget *w = new TQWidget(splitter);
+ TQVBoxLayout *wLayout= new TQVBoxLayout(w);
wLayout->setSpacing(KDialog::spacingHint());
wLayout->setMargin(KDialog::marginHint());
- QHBoxLayout *hbox = new QHBoxLayout(wLayout);
- QLabel *label = new QLabel(i18n("Search in module:"), w);
+ TQHBoxLayout *hbox = new TQHBoxLayout(wLayout);
+ TQLabel *label = new TQLabel(i18n("Search in module:"), w);
hbox->addWidget(label);
moduleCombo = new KComboBox(w);
hbox->addWidget(moduleCombo);
- QWidget *temp = new QWidget(w);
+ TQWidget *temp = new TQWidget(w);
hbox->addWidget(temp);
hbox->setStretchFactor(temp,2);
- editButton = new QPushButton(i18n("&Edit"),w);
+ editButton = new TQPushButton(i18n("&Edit"),w);
editButton->setEnabled(false);
hbox->addWidget(editButton);
// added a button "clear search" here
- hbox = new QHBoxLayout(wLayout);
- QPushButton* clearButton = new QPushButton(w);
+ hbox = new TQHBoxLayout(wLayout);
+ TQPushButton* clearButton = new TQPushButton(w);
clearButton->setFlat(true);
clearButton->setPixmap(SmallIcon("locationbar_erase"));
hbox->addWidget(clearButton);
@@ -102,13 +102,13 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
textEdit->setFocus();
hbox->addWidget(textEdit);
- hbox = new QHBoxLayout(wLayout);
- startButton = new QPushButton(i18n("&Start Search"),w);
+ hbox = new TQHBoxLayout(wLayout);
+ startButton = new TQPushButton(i18n("&Start Search"),w);
hbox->addWidget(startButton);
- inTransButton = new QCheckBox(i18n("Sea&rch in translations"),w);
+ inTransButton = new TQCheckBox(i18n("Sea&rch in translations"),w);
hbox->addWidget(inTransButton);
hbox->addStretch(1);
- stopButton = new QPushButton(i18n("S&top"),w);
+ stopButton = new TQPushButton(i18n("S&top"),w);
stopButton->setEnabled(false);
hbox->addWidget(stopButton);
@@ -117,15 +117,15 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
dictBox = new KBabelDictBox(w,"kbabeldictbox");
wLayout->addWidget(dictBox);
- prefWidget = new QWidget(splitter);
- QVBoxLayout *tempLayout= new QVBoxLayout(prefWidget);
+ prefWidget = new TQWidget(splitter);
+ TQVBoxLayout *tempLayout= new TQVBoxLayout(prefWidget);
tempLayout->setSpacing(KDialog::spacingHint());
tempLayout->setMargin(KDialog::marginHint());
- label = new QLabel(i18n("Settings:"),prefWidget);
+ label = new TQLabel(i18n("Settings:"),prefWidget);
tempLayout->addWidget(label);
- prefStack = new QWidgetStack(prefWidget);
+ prefStack = new TQWidgetStack(prefWidget);
tempLayout->addWidget(prefStack);
tempLayout->addStretch(1);
@@ -133,10 +133,10 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
dictBox->readSettings(config);
dictBox->setAutoUpdateOptions(true);
- QStringList modules = dictBox->moduleNames();
+ TQStringList modules = dictBox->moduleNames();
moduleCombo->insertStringList(modules);
- QPtrList<PrefWidget> prefs = dictBox->modPrefWidgets(prefStack);
+ TQPtrList<PrefWidget> prefs = dictBox->modPrefWidgets(prefStack);
prefs.setAutoDelete(false);
PrefWidget *p;
@@ -152,31 +152,31 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
moduleCombo->setCurrentItem(active);
- QHBox *h = new QHBox(this);
+ TQHBox *h = new TQHBox(this);
h->setSpacing(KDialog::spacingHint());
mainLayout->addWidget(h);
- progressLabel = new QLabel(h);
+ progressLabel = new TQLabel(h);
progressBar = new KProgress(h);
- connect(textEdit,SIGNAL(returnPressed()),startButton,SLOT(animateClick()));
- connect(startButton,SIGNAL(clicked()),this, SLOT(startSearch()));
- connect(stopButton, SIGNAL(clicked()), dictBox,SLOT(slotStopSearch()));
- connect(editButton, SIGNAL(clicked()), dictBox, SLOT(edit()));
- connect(dictBox, SIGNAL(searchStarted()), this, SLOT(searchStarted()));
- connect(dictBox, SIGNAL(searchStopped()), this, SLOT(searchStopped()));
- connect(dictBox, SIGNAL(progressed(int)), progressBar, SLOT(setProgress(int)));
- connect(dictBox, SIGNAL(activeModuleChanged(bool))
- , editButton, SLOT(setEnabled(bool)));
+ connect(textEdit,TQT_SIGNAL(returnPressed()),startButton,TQT_SLOT(animateClick()));
+ connect(startButton,TQT_SIGNAL(clicked()),this, TQT_SLOT(startSearch()));
+ connect(stopButton, TQT_SIGNAL(clicked()), dictBox,TQT_SLOT(slotStopSearch()));
+ connect(editButton, TQT_SIGNAL(clicked()), dictBox, TQT_SLOT(edit()));
+ connect(dictBox, TQT_SIGNAL(searchStarted()), this, TQT_SLOT(searchStarted()));
+ connect(dictBox, TQT_SIGNAL(searchStopped()), this, TQT_SLOT(searchStopped()));
+ connect(dictBox, TQT_SIGNAL(progressed(int)), progressBar, TQT_SLOT(setProgress(int)));
+ connect(dictBox, TQT_SIGNAL(activeModuleChanged(bool))
+ , editButton, TQT_SLOT(setEnabled(bool)));
- connect(dictBox, SIGNAL(progressStarts(const QString&))
- , this, SLOT(progressStarted(const QString&)));
- connect(dictBox, SIGNAL(progressEnds()), this, SLOT(progressStopped()));
+ connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&))
+ , this, TQT_SLOT(progressStarted(const TQString&)));
+ connect(dictBox, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(progressStopped()));
- connect(moduleCombo, SIGNAL(activated(int)),
- dictBox, SLOT(setActiveModule(int)));
- connect(dictBox, SIGNAL(activeModuleChanged(int))
- , this, SLOT(switchModule(int)));
- connect(clearButton, SIGNAL(clicked()), this, SLOT(slotClearSearch()));
+ connect(moduleCombo, TQT_SIGNAL(activated(int)),
+ dictBox, TQT_SLOT(setActiveModule(int)));
+ connect(dictBox, TQT_SIGNAL(activeModuleChanged(int))
+ , this, TQT_SLOT(switchModule(int)));
+ connect(clearButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearSearch()));
}
/*
@@ -194,7 +194,7 @@ KBabelDictView::~KBabelDictView()
*/
void KBabelDictView::startSearch()
{
- QString text = textEdit->text();
+ TQString text = textEdit->text();
if(!text.isEmpty())
{
@@ -219,7 +219,7 @@ void KBabelDictView::progressStopped()
stopButton->setEnabled(false);
}
-void KBabelDictView::progressStarted(const QString& msg)
+void KBabelDictView::progressStarted(const TQString& msg)
{
progressLabel->setText(msg);
startButton->setEnabled(false);
diff --git a/kbabel/kbabeldict/kbabeldictview.h b/kbabel/kbabeldict/kbabeldictview.h
index 510936c4..838d3ba3 100644
--- a/kbabel/kbabeldict/kbabeldictview.h
+++ b/kbabel/kbabeldict/kbabeldictview.h
@@ -35,7 +35,7 @@
#ifndef KBABELDICTVIEW_H
#define KBABELDICTVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -48,12 +48,12 @@ class QWidgetStack;
class KBabelDictBox;
-class KBabelDictView : public QWidget
+class KBabelDictView : public TQWidget
{
Q_OBJECT
public:
- KBabelDictView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ KBabelDictView( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KBabelDictView();
bool prefVisible();
@@ -69,7 +69,7 @@ private slots:
void searchStarted();
void switchModule(int);
void progressStopped();
- void progressStarted(const QString&);
+ void progressStarted(const TQString&);
void slotClearSearch();
private:
@@ -77,16 +77,16 @@ private:
KComboBox *moduleCombo;
KLineEdit *textEdit;
- QCheckBox *inTransButton;
- QPushButton *startButton;
- QPushButton *stopButton;
- QPushButton *editButton;
- QWidgetStack *prefStack;
+ TQCheckBox *inTransButton;
+ TQPushButton *startButton;
+ TQPushButton *stopButton;
+ TQPushButton *editButton;
+ TQWidgetStack *prefStack;
KProgress *progressBar;
- QLabel *progressLabel;
- QSplitter *splitter;
+ TQLabel *progressLabel;
+ TQSplitter *splitter;
- QWidget *prefWidget;
+ TQWidget *prefWidget;
};
#endif // KBABELDICTVIEW_H
diff --git a/kbabel/kbabeldict/kbabelsplash.cpp b/kbabel/kbabeldict/kbabelsplash.cpp
index 16ac2352..7b62f31e 100644
--- a/kbabel/kbabeldict/kbabelsplash.cpp
+++ b/kbabel/kbabeldict/kbabelsplash.cpp
@@ -28,36 +28,36 @@
#include "kbabelsplash.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
KBabelSplash* KBabelSplash::instance = 0;
-KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
- : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
+KBabelSplash::KBabelSplash( TQWidget* parent, const char* name )
+ : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
{
setMargin( 0 );
setSpacing( 0 );
- QLabel* picLabel = new QLabel( this );
- QPixmap pixmap;
+ TQLabel* picLabel = new TQLabel( this );
+ TQPixmap pixmap;
if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) )
picLabel->setPixmap( pixmap );
- picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
// Set geometry, with support for Xinerama systems
- QRect r;
+ TQRect r;
r.setSize(sizeHint());
- int ps = QApplication::desktop()->primaryScreen();
- r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() );
+ int ps = TQApplication::desktop()->primaryScreen();
+ r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() );
setGeometry(r);
if( instance ) delete instance;
@@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
}
-void KBabelSplash::mousePressEvent( QMouseEvent* )
+void KBabelSplash::mousePressEvent( TQMouseEvent* )
{
close();
}
diff --git a/kbabel/kbabeldict/kbabelsplash.h b/kbabel/kbabeldict/kbabelsplash.h
index c10b4fec..c381d11b 100644
--- a/kbabel/kbabeldict/kbabelsplash.h
+++ b/kbabel/kbabeldict/kbabelsplash.h
@@ -30,7 +30,7 @@
#ifndef KBABELSPLASH_H
#define KBABELSPLASH_H
-#include <qvbox.h>
+#include <tqvbox.h>
class QLabel;
class QMouseEvent;
@@ -43,13 +43,13 @@ class KBabelSplash : public QVBox
Q_OBJECT
public:
- KBabelSplash( QWidget* parent = 0, const char* name = 0 );
+ KBabelSplash( TQWidget* parent = 0, const char* name = 0 );
~KBabelSplash() { instance = 0; }
static KBabelSplash* instance;
protected:
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
};
#endif
diff --git a/kbabel/kbabeldict/main.cpp b/kbabel/kbabeldict/main.cpp
index be6ca67e..c327196b 100644
--- a/kbabel/kbabeldict/main.cpp
+++ b/kbabel/kbabeldict/main.cpp
@@ -41,7 +41,7 @@
#include <kapplication.h>
#include <kwin.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kbabeldict.h"
#include "kbabelsplash.h"
@@ -63,8 +63,8 @@ KBabelDictApplication::KBabelDictApplication()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QTimer timer;
- QWidget *splash=0;
+ TQTimer timer;
+ TQWidget *splash=0;
bool showSplash=args->isSet("splash");
if(showSplash)
{
@@ -91,8 +91,8 @@ KBabelDictApplication::KBabelDictApplication()
KApplication::restoreOverrideCursor();
}
- QObject::connect( topLevel, SIGNAL( destroyed() ),
- this, SLOT( quit() ) );
+ TQObject::connect( topLevel, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( quit() ) );
}
KBabelDictApplication::~KBabelDictApplication()
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
index ac55335d..5c5c6a6d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
@@ -28,10 +28,10 @@
* your version. *
*/
-#include <qtextedit.h>
-#include <qprogressdialog.h>
+#include <tqtextedit.h>
+#include <tqprogressdialog.h>
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kdebug.h>
@@ -52,17 +52,17 @@
#include <sys/time.h>
#include "preferenceswidget.h"
#include "dbse_factory.h"
-#include <qprogressbar.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kconfig.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qmemarray.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqmemarray.h>
#include "database.h"
@@ -72,7 +72,7 @@
using namespace KBabel;
-KDBSearchEngine::KDBSearchEngine (QObject * parent, const char *name):
+KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name):
SearchEngine (parent, name)
{
edited = "unknown";
@@ -82,8 +82,8 @@ SearchEngine (parent, name)
dbOpened = false;
dbname = "";
lasterror = i18n ("No error");
- connect (this, SIGNAL (hasError (const QString &)),
- SLOT (setLastError (const QString &)));
+ connect (this, TQT_SIGNAL (hasError (const TQString &)),
+ TQT_SLOT (setLastError (const TQString &)));
IAmReady = true; // I don't know if it is a good idea, no DB loaded!!!
@@ -104,7 +104,7 @@ KDBSearchEngine::~KDBSearchEngine ()
bool
-KDBSearchEngine::loadDatabase (QString database, bool noask = false)
+KDBSearchEngine::loadDatabase (TQString database, bool noask = false)
{
bool ret = true;
bool asked = false;
@@ -116,7 +116,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
dm = 0;
}
- QDir dir (database);
+ TQDir dir (database);
if (!dir.exists ())
{
if (asked
@@ -124,19 +124,19 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
i18n
("Database folder does not exist:\n%1\n"
"Do you want to create it now?").
- arg (database), QString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
+ arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
KMessageBox::Yes)
{
asked = true;
- QStringList dirList;
+ TQStringList dirList;
while (!dir.exists () && !dir.dirName ().isEmpty ())
{
dirList.prepend (dir.dirName ());
dir.setPath (dir.path () + "/..");
}
- for (QStringList::Iterator it = dirList.begin ();
+ for (TQStringList::Iterator it = dirList.begin ();
it != dirList.end (); ++it)
{
if (!dir.mkdir (*it))
@@ -161,10 +161,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (ret)
{
// test, if there are both of ,old and standard databases
- QString transFile = database + "/translations." + lang + ".db";
+ TQString transFile = database + "/translations." + lang + ".db";
- bool oldstuff = QFile::exists (transFile + ",old");
- bool newstuff = QFile::exists (transFile);
+ bool oldstuff = TQFile::exists (transFile + ",old");
+ bool newstuff = TQFile::exists (transFile);
if (oldstuff && newstuff)
{
@@ -188,11 +188,11 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KMessageBox::Yes)
{
// remove the new files
- QFile::remove (transFile);
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile);
+ TQFile::remove (database + "/wordsindex." + lang +
".db");
- QFile::remove (database + "/keysindex." + lang + ".db");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/keysindex." + lang + ".db");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db");
// rename the old files
@@ -216,12 +216,12 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KURL (database + "/catalogsinfo." + lang +
".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang +
".db,old");
- QFile::remove (database + "/keysindex." + lang +
+ TQFile::remove (database + "/keysindex." + lang +
".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
}
@@ -241,10 +241,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
(database + "/catalogsinfo." + lang + ".db,old"),
KURL (database + "/catalogsinfo." + lang + ".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang + ".db,old");
- QFile::remove (database + "/keysindex." + lang + ".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang + ".db,old");
+ TQFile::remove (database + "/keysindex." + lang + ".db,old");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
@@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (asked
|| KMessageBox::questionYesNo (0,
i18n
- ("Database files not found.\nDo you want to create them now?"), QString::null, i18n("Create"), i18n("Do Not Create"))
+ ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create"))
== KMessageBox::Yes)
{
//fprintf(stderr,"SI\n");
@@ -312,7 +312,7 @@ KDBSearchEngine::setCaseSensitive (bool sensitive)
*/
void
-KDBSearchEngine::setRemoveCharString (QString chartoremove)
+KDBSearchEngine::setRemoveCharString (TQString chartoremove)
{
remchar = chartoremove;
}
@@ -336,12 +336,12 @@ KDBSearchEngine::isSearching () const
*/
int
-KDBSearchEngine::addSearchString (QString searchString, int rule)
+KDBSearchEngine::addSearchString (TQString searchString, int rule)
{
if (searching || scanInProgress)
return -1;
SearchEntry e;
- e.string = QString (searchString);
+ e.string = TQString (searchString);
e.rules = rule;
searchStringList.append (e);
return searchStringList.count ();
@@ -354,7 +354,7 @@ KDBSearchEngine::addSearchString (QString searchString, int rule)
*/
bool
-KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
+KDBSearchEngine::startSearch (const TQString & str, uint pluralForm,
const SearchFilter * filter)
{
@@ -376,7 +376,7 @@ KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
}
bool
-KDBSearchEngine::startSearchInTranslation (QString s)
+KDBSearchEngine::startSearchInTranslation (TQString s)
{
if (autoUpdate)
@@ -418,8 +418,8 @@ KDBSearchEngine::openDb (bool noask = false)
bool
KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
- QValueList < SearchResult > &resultList,
- QString & error)
+ TQValueList < SearchResult > &resultList,
+ TQString & error)
{
int count = 0;
@@ -452,7 +452,7 @@ KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
return false;
}
- QString package = filter->location ();
+ TQString package = filter->location ();
int step = (totalRecord / 30) + 1;
int ntra, nref;
@@ -544,17 +544,17 @@ KDBSearchEngine::repeat ()
kdDebug (0) << "No kdelibs.po found!" << endl;
- QProgressDialog *pd =
- new QProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
+ TQProgressDialog *pd =
+ new TQProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
100);
- connect (this, SIGNAL (progress (int)), pd, SLOT (setProgress (int)));
- connect (this, SIGNAL (finished ()), pd, SLOT (close ()));
- connect (pd, SIGNAL (cancelled ()), this, SLOT (stopSearch ()));
+ connect (this, TQT_SIGNAL (progress (int)), pd, TQT_SLOT (setProgress (int)));
+ connect (this, TQT_SIGNAL (finished ()), pd, TQT_SLOT (close ()));
+ connect (pd, TQT_SIGNAL (cancelled ()), this, TQT_SLOT (stopSearch ()));
- QString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
- QString id;
+ TQString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
+ TQString id;
int min;
bool ok = false;
@@ -571,7 +571,7 @@ KDBSearchEngine::repeat ()
progressStarts (i18n ("Searching repeated string"));
- static QTextEdit *mle = new QTextEdit ();
+ static TQTextEdit *mle = new TQTextEdit ();
mle->clear ();
bool inlibs;
@@ -671,10 +671,10 @@ KDBSearchEngine::startSearchNow (int searchmode)
intra = searchmode & MD_IN_TRANSLATION;
- QString msgIdFound;
- QString msgId;
- QString msgStr;
- //QString msgIdRequested;
+ TQString msgIdFound;
+ TQString msgId;
+ TQString msgStr;
+ //TQString msgIdRequested;
SearchResult *aresult;
TranslationInfo *adescription;
SearchList searchList;
@@ -682,13 +682,13 @@ KDBSearchEngine::startSearchNow (int searchmode)
len = remchar.length ();
int n, m; //,word;
- QString *id;
+ TQString *id;
- QString mainRequest = searchStringList[0].string;
+ TQString mainRequest = searchStringList[0].string;
SearchList::Iterator it, it1;
- QString *idMod;
+ TQString *idMod;
bool foundSomething = false;
searchList = searchStringList; //Create a copy and modify it
@@ -705,7 +705,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
if (comm)
- idMod->replace (QRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
+ idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@@ -728,7 +728,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Now we can browse the whole db or the "good keys"
- QValueList < KeyAndScore > goodkeys;
+ TQValueList < KeyAndScore > goodkeys;
int totalprogress;
bool gk = (searchmode == MD_GOOD_KEYS) || allkey;
@@ -807,7 +807,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
- msgId.replace (QRegExp ("\\_\\:.*\\\\n"), "");
+ msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@@ -845,7 +845,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
msgId.
- replace (QRegExp ("\\_\\:.*\\\\n"),
+ replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@@ -878,7 +878,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
if (!foundExact && (rules & RegExp))
{
- QRegExp reg (*idMod);
+ TQRegExp reg (*idMod);
regexp = (reg.search (msgId) != -1);
}
else
@@ -996,7 +996,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
*/
bool
-KDBSearchEngine::startSingleSearch (QString searchString,
+KDBSearchEngine::startSingleSearch (TQString searchString,
unsigned int pattern1Limit,
unsigned int /*pattern2Limit */ ,
bool inTranslation)
@@ -1013,7 +1013,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
- QRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
+ TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
while ((in = reg.search (searchString, in + len)) != -1)
{
nw++;
@@ -1033,7 +1033,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
{
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
- QString regToAdd = searchString;
+ TQString regToAdd = searchString;
regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
@@ -1055,7 +1055,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
Start a search for a list of string
*/
-//bool KDBSearchEngine::startListSearch(QPtrList<QString> searchStrList)
+//bool KDBSearchEngine::startListSearch(TQPtrList<TQString> searchStrList)
//{
// searchStringList=searchStrList;
// return startSearchNow();
@@ -1067,7 +1067,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
void
-KDBSearchEngine::setLanguageCode (const QString & ll)
+KDBSearchEngine::setLanguageCode (const TQString & ll)
{
if (ll == lang)
return;
@@ -1079,8 +1079,8 @@ KDBSearchEngine::setLanguageCode (const QString & ll)
}
void
-KDBSearchEngine::setLanguage (const QString & languageCode,
- const QString & /*languageName */ )
+KDBSearchEngine::setLanguage (const TQString & languageCode,
+ const TQString & /*languageName */ )
{
setLanguageCode (languageCode);
}
@@ -1147,17 +1147,17 @@ KDBSearchEngine::saveSettings (KConfigBase * config)
void
KDBSearchEngine::readSettings (KConfigBase * config)
{
- QString newName;
+ TQString newName;
KConfigGroupSaver cgs (config, "KDBSearchEngine");
- QString defaultLang;
- QString oldLang = lang;
+ TQString defaultLang;
+ TQString oldLang = lang;
Defaults::Identity def;
defaultLang = def.languageCode ();
lang = config->readEntry ("Language", defaultLang);
- QString defaultDir;
+ TQString defaultDir;
KStandardDirs *dirs = KGlobal::dirs ();
if (dirs)
{
@@ -1203,20 +1203,20 @@ KDBSearchEngine::readSettings (KConfigBase * config)
}
PrefWidget *
-KDBSearchEngine::preferencesWidget (QWidget * parent)
+KDBSearchEngine::preferencesWidget (TQWidget * parent)
{
pw = new PreferencesWidget (parent);
setSettings ();
- connect (pw, SIGNAL (restoreNow ()), this, SLOT (setSettings ()));
- connect (pw, SIGNAL (applyNow ()), this, SLOT (updateSettings ()));
- connect (pw, SIGNAL (destroyed ()), this, SLOT (prefDestr ()));
- connect (pw->dbpw->scanPB_2, SIGNAL (clicked ()), this, SLOT (scan ()));
- connect (pw->dbpw->scanrecPB, SIGNAL (clicked ()), this,
- SLOT (scanRecur ()));
- connect (pw->dbpw->scanFilePB, SIGNAL (clicked ()), this,
- SLOT (scanFile ()));
- connect (pw->dbpw->repeatPB, SIGNAL (clicked ()), this, SLOT (repeat ()));
+ connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ()));
+ connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ()));
+ connect (pw, TQT_SIGNAL (destroyed ()), this, TQT_SLOT (prefDestr ()));
+ connect (pw->dbpw->scanPB_2, TQT_SIGNAL (clicked ()), this, TQT_SLOT (scan ()));
+ connect (pw->dbpw->scanrecPB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanRecur ()));
+ connect (pw->dbpw->scanFilePB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanFile ()));
+ connect (pw->dbpw->repeatPB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (repeat ()));
return pw;
@@ -1233,7 +1233,7 @@ KDBSearchEngine::scanRecur ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
i18n
@@ -1246,32 +1246,32 @@ KDBSearchEngine::scanRecur ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); //Kbabel progress bar
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); //Kbabel progress bar
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
sca->scanPattern (cvsdir, "*.po", true);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1292,7 +1292,7 @@ KDBSearchEngine::scan ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
@@ -1304,32 +1304,32 @@ KDBSearchEngine::scan ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanPattern (cvsdir, "*.po", false);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1350,7 +1350,7 @@ KDBSearchEngine::scanFile ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
pw->dbpw->totalPB->setProgress (0);
cvsdir =
@@ -1363,31 +1363,31 @@ KDBSearchEngine::scanFile ()
}
if (pw)
{
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (fileProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning file %1").arg (directory (cvsdir, 0)));
- connect (sca, SIGNAL (fileFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (fileFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanFile (cvsdir);
- sca->disconnect (SIGNAL (fileProgress (int)), this,
- SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- sca->disconnect (SIGNAL (fileFinished ()), this,
- SIGNAL (progressEnds ()));
+ sca->disconnect (TQT_SIGNAL (fileProgress (int)), this,
+ TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ sca->disconnect (TQT_SIGNAL (fileFinished ()), this,
+ TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1415,7 +1415,7 @@ KDBSearchEngine::name () const
QString
KDBSearchEngine::id () const
{
- return QString ("KDBSearchEngine");
+ return TQString ("KDBSearchEngine");
}
QString
@@ -1488,7 +1488,7 @@ KDBSearchEngine::updateSettings ()
if (pw == 0)
return;
- QString newName = pw->dbpw->dirInput->url ();
+ TQString newName = pw->dbpw->dirInput->url ();
if (newName != dbname)
{
@@ -1547,16 +1547,16 @@ KDBSearchEngine::updateSettings ()
}
void
-KDBSearchEngine::setLastError (const QString & er)
+KDBSearchEngine::setLastError (const TQString & er)
{
lasterror = er;
}
QString
-KDBSearchEngine::translate (const QString & text, const uint pluralForm)
+KDBSearchEngine::translate (const TQString & text, const uint pluralForm)
{
if (!openDb ())
- return QString::null;
+ return TQString::null;
/*
if(!dbOpened)
@@ -1566,7 +1566,7 @@ if(!dbOpened)
{
//emit anerror
hasError(i18n("Database not opened"));
- return QString::null;
+ return TQString::null;
}
}
*/
@@ -1574,7 +1574,7 @@ if(!dbOpened)
DataBaseItem dbit = dm->getItem (text);
if (dbit.isNull ())
- return QString::null;
+ return TQString::null;
if (dbit.numTra == 1)
return dbit.translations[0].translation;
@@ -1592,34 +1592,34 @@ if(!dbOpened)
}
-QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
+TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase,
int threshold,
int thresholdorig,
uint32 max)
{
- QValueList < QString > wordlist;
+ TQValueList < TQString > wordlist;
if (!openDb ())
{
- QValueList < KeyAndScore > a;
+ TQValueList < KeyAndScore > a;
return a;
}
progressStarts (i18n ("Searching words"));
- QValueList < QString >::Iterator wlit;
+ TQValueList < TQString >::Iterator wlit;
wordlist = dm->wordsIn (phrase);
int
nw = wordlist.count ();
-//QMemArray<WordItem> wi(nw);
- QMemArray < uint32 > numofloc (nw), currentloc (nw);
- QMemArray < int >
+//TQMemArray<WordItem> wi(nw);
+ TQMemArray < uint32 > numofloc (nw), currentloc (nw);
+ TQMemArray < int >
score (nw);
- QMemArray < uint32 * >loc (nw), locorig (nw);
- QValueList < uint32 > resloc;
- QValueList < int >
+ TQMemArray < uint32 * >loc (nw), locorig (nw);
+ TQValueList < uint32 > resloc;
+ TQValueList < int >
resfound;
- QValueList < KeyAndScore > keylist;
+ TQValueList < KeyAndScore > keylist;
//wi.resize(wordlist.count());
int
totalprogress = 0;
@@ -1837,7 +1837,7 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
KeyAndScore
key (strkey, sc);
-// kdDebug(0) << (QString) key << " [" << key.score << "]" << endl;
+// kdDebug(0) << (TQString) key << " [" << key.score << "]" << endl;
keylist.append (key);
}
@@ -1852,12 +1852,12 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
}
void
-KDBSearchEngine::stringChanged (const QStringList & o,
- const QString & translated, const uint,
- const QString &)
+KDBSearchEngine::stringChanged (const TQStringList & o,
+ const TQString & translated, const uint,
+ const TQString &)
{
- QString orig = o.first (); // FIXME: plural forms
+ TQString orig = o.first (); // FIXME: plural forms
// skip empty originals or translated texts
if (orig.isEmpty () || translated.isEmpty ())
@@ -1879,19 +1879,19 @@ KDBSearchEngine::stringChanged (const QStringList & o,
}
void
-KDBSearchEngine::setEditedFile (const QString & file)
+KDBSearchEngine::setEditedFile (const TQString & file)
{
edited = file; //kdDebug(0) << edited << endl;
}
-KeyAndScore::KeyAndScore (const QString & a, int sc):
-QString (a)
+KeyAndScore::KeyAndScore (const TQString & a, int sc):
+TQString (a)
{
score = sc;
}
-KeyAndScore::KeyAndScore ():QString ()
+KeyAndScore::KeyAndScore ():TQString ()
{
score = 0;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
index 058444db..d948bbd4 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
@@ -42,11 +42,11 @@
#ifndef _KDBSEARCH_ENGINE_
#define _KDBSEARCH_ENGINE_
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qmemarray.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
+#include <tqvaluelist.h>
#include "database.h"
@@ -63,7 +63,7 @@
class SearchEntry
{
public:
- QString string;
+ TQString string;
int rules;
};
@@ -71,22 +71,22 @@ class KeyAndScore : public QString
{
public:
KeyAndScore();
- KeyAndScore(const QString &a,int sc);
+ KeyAndScore(const TQString &a,int sc);
int score;
};
-typedef QValueList<SearchEntry> SearchList;
+typedef TQValueList<SearchEntry> SearchList;
/* USE searchengine.h structure
class CatalogDescription
{
public:
char language[6]; // How many character chinese language needs?
- // QString is better ?
- QString filename;
- QString dateOfScan; //When you add this to database (last time)
- QString authorOfScan;
- QString fileHeader; //msgid ""
+ // TQString is better ?
+ TQString filename;
+ TQString dateOfScan; //When you add this to database (last time)
+ TQString authorOfScan;
+ TQString fileHeader; //msgid ""
};
*/
@@ -98,7 +98,7 @@ class KDBSearchEngine : public SearchEngine
public:
- KDBSearchEngine(QObject *parent=0,const char *name=0);
+ KDBSearchEngine(TQObject *parent=0,const char *name=0);
~KDBSearchEngine();
enum Rules {Equal = 1, Contains = 2, Contained = 4, RegExp = 8};
enum FormatRules { Dots = 1, Ampersand = 2, FirstWordUpper = 4, //Not yet used
@@ -108,7 +108,7 @@ public:
Set the directory where db file are located
*/
- void setDBName(QString filename);
+ void setDBName(TQString filename);
/*
Set if the research have to consider multiple spaces as a single one.
@@ -136,7 +136,7 @@ public:
*/
- void setRemoveCharString(QString chartoremove);
+ void setRemoveCharString(TQString chartoremove);
/*
Enable an output filter that format Uppercase/lowercase
@@ -179,13 +179,13 @@ public:
virtual bool messagesForFilter(const SearchFilter* filter
- , QValueList<SearchResult>& resultList, QString& error);
+ , TQValueList<SearchResult>& resultList, TQString& error);
- virtual void setLanguageCode(const QString& lang);
- virtual void setLanguage(const QString& languageCode, const QString& languageName);
+ virtual void setLanguageCode(const TQString& lang);
+ virtual void setLanguage(const TQString& languageCode, const TQString& languageName);
- virtual void setEditedFile(const QString& file);
+ virtual void setEditedFile(const TQString& file);
virtual bool isReady() const ;
virtual bool isSearching() const;
@@ -193,20 +193,20 @@ public:
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
- virtual QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
- virtual void stringChanged( const QStringList& orig, const QString& translated
- , const uint translationPluralForm, const QString& description);
+ virtual void stringChanged( const TQStringList& orig, const TQString& translated
+ , const uint translationPluralForm, const TQString& description);
public slots:
@@ -221,7 +221,7 @@ public slots:
progress)
*/
- int addSearchString(QString searchString, int rule=Equal);
+ int addSearchString(TQString searchString, int rule=Equal);
/*
Start the research in the database of all the string in the list
@@ -244,14 +244,14 @@ public slots:
*/
- bool startSingleSearch(QString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
+ bool startSingleSearch(TQString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
bool inTranslation=false);
/*
Start a search for a list of string
*/
-// bool startListSearch(QPtrList<QString> searchStrList);
+// bool startListSearch(TQPtrList<TQString> searchStrList);
/*
* Return a list of key in database that contains some
@@ -263,7 +263,7 @@ public slots:
* max is the maximum number of results
*/
-QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
+TQValueList<KeyAndScore> searchWords(TQString phrase,int threshold,
int thresholdorig ,uint32 max);
@@ -272,8 +272,8 @@ QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
*/
virtual void stopSearch();
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
- virtual bool startSearchInTranslation(QString s);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearchInTranslation(TQString s);
void clearList();
signals:
@@ -282,13 +282,13 @@ private slots:
void updateSettings(); //Use widget settings
void setSettings(); //Fill widget with actual settings
void prefDestr();
- void setLastError(const QString&);
+ void setLastError(const TQString&);
void repeat();
private:
/*
Reload database info (and keep the dbase opened).
*/
- bool loadDatabase(QString database,bool);
+ bool loadDatabase(TQString database,bool);
bool openDb(bool);
@@ -312,22 +312,22 @@ private:
bool norm,sens,comm;
int numofresult;
char * filename;
- QString remchar;
- QString regaddchar;
- QString dbname;
+ TQString remchar;
+ TQString regaddchar;
+ TQString dbname;
bool dbOpened;
// GDBM_FILE db;
DataBaseManager * dm;
// datum key, value;
-// QMemArray<CatalogDescription *> catinfo;
+// TQMemArray<CatalogDescription *> catinfo;
SearchList searchStringList;
int totalRecord;
- QString lasterror;
- QString lang;
+ TQString lasterror;
+ TQString lang;
bool scanInProgress;
- QString edited;
+ TQString edited;
bool autoup;
- QString autoauthor;
+ TQString autoauthor;
};
#endif
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
index 003a3a95..0847d594 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
@@ -36,12 +36,12 @@
#include "database.h"
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kio/netaccess.h>
-WordItem::WordItem (char *data, QString w)
+WordItem::WordItem (char *data, TQString w)
{
word = w;
@@ -58,7 +58,7 @@ WordItem::WordItem (char *data, QString w)
}
-WordItem::WordItem (QString w)
+WordItem::WordItem (TQString w)
{
locations = NULL;
count = 0;
@@ -100,7 +100,7 @@ InfoItem::InfoItem ()
language = "No language";
}
-InfoItem::InfoItem (const char *rawData, QString lang)
+InfoItem::InfoItem (const char *rawData, TQString lang)
{
const char *rd;
rd = rawData;
@@ -110,16 +110,16 @@ InfoItem::InfoItem (const char *rawData, QString lang)
charset = "Utf8";
- catalogName = QString::fromUtf8 (rd);
+ catalogName = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
- lastTranslator = QString::fromUtf8 (rd);
+ lastTranslator = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
secs = *(unsigned int *) rd;
revisionDate.setTime_t (secs);
rd += 4;
- lastFullPath = QString::fromUtf8 (rd);
+ lastFullPath = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
@@ -139,8 +139,8 @@ InfoItem::rawData (char *rawData)
rd += strlen (rd) + 1;
- //QDate Time problem!!!!!!!!!!!
- QDateTime zeroDate;
+ //TQDate Time problem!!!!!!!!!!!
+ TQDateTime zeroDate;
zeroDate.setTime_t (0);
*(unsigned int *) rd = -revisionDate.secsTo (zeroDate);
rd += 4;
@@ -168,7 +168,7 @@ InfoItem::size ()
// this is a quick hack to copy a local file
int
-copy_hack (QFile & input, QFile & output)
+copy_hack (TQFile & input, TQFile & output)
{
if (!input.isOpen ())
{
@@ -204,7 +204,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
{
char *data = _data;
- key = QString::fromUtf8 (_key);
+ key = TQString::fromUtf8 (_key);
unsigned int i, r;
numTra = *(uint32 *) data;
@@ -228,7 +228,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
tr.infoRef.append (ref);
}
- tr.translation = QString::fromUtf8 ((const char *) data);
+ tr.translation = TQString::fromUtf8 ((const char *) data);
translations.append (tr);
data += strlen (data) + 1;
@@ -293,11 +293,11 @@ DataBaseItem::toRawData (char *_data)
}
-DataBaseManager::DataBaseManager (QString directory, QString lang,
- QObject * parent, const char *name):
-QObject (parent, name)
+DataBaseManager::DataBaseManager (TQString directory, TQString lang,
+ TQObject * parent, const char *name):
+TQObject (parent, name)
{
- QString filename;
+ TQString filename;
language = lang;
iAmOk = true;
@@ -312,22 +312,22 @@ void
DataBaseManager::openDataBase ()
{
kdDebug () << "Opendatabase" << endl;
- QString directory;
+ TQString directory;
directory = basedir;
- QString ll = "." + language;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
- QString transfilename = "%1/translations%2.db";
+ TQString transfilename = "%1/translations%2.db";
transfilename = transfilename.arg (directory).arg (ll);
- QString infofilename = "%1/catalogsinfo%2.db";
+ TQString infofilename = "%1/catalogsinfo%2.db";
infofilename = infofilename.arg (directory).arg (ll);
- QString wordsfilename = "%1/wordsindex%2.db";
+ TQString wordsfilename = "%1/wordsindex%2.db";
wordsfilename = wordsfilename.arg (directory).arg (ll);
- QString keysfilename = "%1/keysindex%2.db";
+ TQString keysfilename = "%1/keysindex%2.db";
keysfilename = keysfilename.arg (directory).arg (ll);
cursor = 0;
@@ -354,7 +354,7 @@ DataBaseManager::openDataBase ()
KTempFile transFile, infoFile, keysFile, wordsFile;
// do the upgrade on the translation file
- QFile transfilenameFile (transfilename);
+ TQFile transfilenameFile (transfilename);
if ((ret = copy_hack (transfilenameFile, *transFile.file ())) == 0)
{
@@ -373,7 +373,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the info file
- QFile infofilenameFile (infofilename);
+ TQFile infofilenameFile (infofilename);
if ((ret = copy_hack (infofilenameFile, *infoFile.file ())) == 0)
{
ret =
@@ -394,7 +394,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the words file
- QFile wordfilenameFile (wordsfilename);
+ TQFile wordfilenameFile (wordsfilename);
if ((ret = copy_hack (wordfilenameFile, *wordsFile.file ())) == 0)
{
ret =
@@ -415,7 +415,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the keys file
- QFile keysfilenameFile (keysfilename);
+ TQFile keysfilenameFile (keysfilename);
if ((ret = copy_hack (keysfilenameFile, *keysFile.file ())) == 0)
{
ret =
@@ -620,11 +620,11 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
{
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
@@ -641,7 +641,7 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
}
DataBaseItem
-DataBaseManager::getItem (QString key)
+DataBaseManager::getItem (TQString key)
{
if (!iAmOk)
return DataBaseItem ();
@@ -702,7 +702,7 @@ DataBaseManager::cursorGet (uint32 flags)
}
else
{
- kdDebug (KBABEL_SEARCH) << QString ("...cursor getting...%1").
+ kdDebug (KBABEL_SEARCH) << TQString ("...cursor getting...%1").
arg (ret) << endl;
return DataBaseItem ();
@@ -770,11 +770,11 @@ DataBaseManager::current ()
}
int
-DataBaseManager::createDataBase (QString directory,
- QString language, int mode)
+DataBaseManager::createDataBase (TQString directory,
+ TQString language, int mode)
{
- QString filename;
- QString ll = "." + language;
+ TQString filename;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
filename = "%1/translations%2.db";
@@ -782,7 +782,7 @@ DataBaseManager::createDataBase (QString directory,
rename (filename.local8Bit (), filename.local8Bit () + ",old");
-//kdDebug(0) << QString("Creating %1").arg(filename) << endl;
+//kdDebug(0) << TQString("Creating %1").arg(filename) << endl;
iAmOk = true;
@@ -860,7 +860,7 @@ DataBaseManager::createDataBase (QString directory,
if (iAmOk)
loadInfo ();
else
- kdDebug (KBABEL_SEARCH) << QString ("I am NOT ok : %1").
+ kdDebug (KBABEL_SEARCH) << TQString ("I am NOT ok : %1").
arg (ret) << endl;
//THIS IS WRONG, rewrite the error handling.
@@ -889,7 +889,7 @@ DataBaseManager::getCatalogInfo (int n)
return InfoItem ();
}
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
InfoItem it ((char *) data.data, language);
//free(data.data); // Read docu for this!!!!
@@ -936,10 +936,10 @@ DataBaseManager::addCatalogInfo (InfoItem * catInfo, int cat = -1)
}
int
-DataBaseManager::searchCatalogInfo (QString location)
+DataBaseManager::searchCatalogInfo (TQString location)
{
int n = 0;
- QValueList < InfoItem >::Iterator it;
+ TQValueList < InfoItem >::Iterator it;
for (it = info.begin (); it != info.end (); ++it)
{
n++;
@@ -998,11 +998,11 @@ DataBaseManager::loadInfo ()
}
-QValueList < QString > DataBaseManager::wordsIn (QString string)
+TQValueList < TQString > DataBaseManager::wordsIn (TQString string)
{
QString
a;
- QValueList < QString > words;
+ TQValueList < TQString > words;
int
i,
l;
@@ -1036,10 +1036,10 @@ QValueList < QString > DataBaseManager::wordsIn (QString string)
WordItem
-DataBaseManager::getWordLocations (QString word)
+DataBaseManager::getWordLocations (TQString word)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
DBT data;
@@ -1080,10 +1080,10 @@ DataBaseManager::getWordLocations (QString word)
bool
-DataBaseManager::addLocation (QString word, unsigned int location)
+DataBaseManager::addLocation (TQString word, unsigned int location)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
@@ -1289,7 +1289,7 @@ DataBaseManager::addLocation (QString word, unsigned int location)
bool
-DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
+DataBaseManager::removeLocation (TQString /*word */ , int /*location */ )
{
//#warning TODO: REMOVE LOCATION
@@ -1298,7 +1298,7 @@ DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
}
uint32
-DataBaseManager::appendKey (QString _key)
+DataBaseManager::appendKey (TQString _key)
{
DBT key;
@@ -1324,7 +1324,7 @@ DataBaseManager::appendKey (QString _key)
else
ret = *(uint32 *) key.data;
-//kdDebug(0) << QString("Append result %1,err = %1").arg(ret).arg(err) << endl;
+//kdDebug(0) << TQString("Append result %1,err = %1").arg(ret).arg(err) << endl;
free (data.data);
@@ -1349,16 +1349,16 @@ DataBaseManager::getKey (uint32 n)
//Check for errors
int ret = indexDb->get (indexDb, 0, &key, &data, 0); //DB_SET_RECNO);
if (ret)
- return QString::null;
+ return TQString::null;
- return QString::fromUtf8 ((char *) data.data);
+ return TQString::fromUtf8 ((char *) data.data);
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
}
int
-DataBaseManager::catalogRef (QString location, QString author, QString path)
+DataBaseManager::catalogRef (TQString location, TQString author, TQString path)
{
InfoItem cinfo;
int cat, catnum;
@@ -1397,19 +1397,19 @@ DataBaseManager::catalogRef (QString location, QString author, QString path)
}
int
-DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
+DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog,
bool ow)
{
int catnum = catalog;
int count = 0;
- QString msgid = key;
+ TQString msgid = key;
DataBaseItem dbit = getItem (msgid);
if (dbit.numTra == 0) //Not found
{
dbit.numTra += 1;
- // use local variable, dbit.translations is QValueList and
+ // use local variable, dbit.translations is TQValueList and
// will create own copy
TranslationItem tra;
tra.numRef = 1;
@@ -1423,16 +1423,16 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
int aa = putItem (&dbit);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
else
{
// key exists
- QString msgstr = tran;
+ TQString msgstr = tran;
bool found_catalog_info = false, foundTr = false, isThisOne = false;
- QValueList < TranslationItem >::Iterator ittr;
+ TQValueList < TranslationItem >::Iterator ittr;
bool rem = false;
// check all translations in the list
@@ -1493,7 +1493,7 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
//Check ret value
int aa = putItem (&dbit, true);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
return count;
@@ -1513,11 +1513,11 @@ DataBaseManager::rebuildIndexes ()
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.h b/kbabel/kbabeldict/modules/dbsearchengine/database.h
index bf4767df..3e68e01d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.h
@@ -52,29 +52,29 @@
#define uint32 u_int32_t
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qcstring.h> //bytearray
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqcstring.h> //bytearray
class WordItem // Returned by getWordLocations
{
public:
- WordItem(char *data,QString w);
- WordItem(QString w);
+ WordItem(char *data,TQString w);
+ WordItem(TQString w);
//WordItem(const WordItem &wi);
//WordItem& operator=(const WordItem & wi );
//The word (key in database)
- QString word;
+ TQString word;
//Sorted locations
- //QByteArray locations; //too many problems with this..
+ //TQByteArray locations; //too many problems with this..
//NOTE:
- //This is allocated only if you call WordItem(char *data,QString w);
+ //This is allocated only if you call WordItem(char *data,TQString w);
//YOU MUST FREE IT when you do not need it anymore
//No destructor will do it !!!
@@ -97,15 +97,15 @@ class InfoItem
InfoItem();
// Create an info item from raw data
- InfoItem(const char *rawData,QString lang);
+ InfoItem(const char *rawData,TQString lang);
- QString catalogName;
- QString lastFullPath;
+ TQString catalogName;
+ TQString lastFullPath;
- QString lastTranslator;
- QDateTime revisionDate;
- QString charset;
- QString language;
+ TQString lastTranslator;
+ TQDateTime revisionDate;
+ TQString charset;
+ TQString language;
int size();
@@ -116,8 +116,8 @@ class InfoItem
class TranslationItem
{
public:
- QString translation;
- QValueList<int> infoRef;
+ TQString translation;
+ TQValueList<int> infoRef;
uint32 numRef;
};
@@ -149,8 +149,8 @@ class DataBaseItem
void toRawData(char *_data);
void toRawKey(char *_key);
- QString key;
- QValueList<TranslationItem> translations;
+ TQString key;
+ TQValueList<TranslationItem> translations;
uint32 numTra;
uint32 location;
};
@@ -175,13 +175,13 @@ class DataBaseManager : public QObject
*/
- DataBaseManager(QString directory,QString lang,QObject *parent=0,const char *name=0);
+ DataBaseManager(TQString directory,TQString lang,TQObject *parent=0,const char *name=0);
~DataBaseManager();
/*
Create a new databse structure.
*/
- int createDataBase(QString directory,QString language,int mode=0664);
+ int createDataBase(TQString directory,TQString language,int mode=0664);
@@ -198,7 +198,7 @@ class DataBaseManager : public QObject
int putItem(DataBaseItem *item,bool ow=false);
- DataBaseItem getItem(QString key);
+ DataBaseItem getItem(TQString key);
/*
@return the first entry in the database.
@@ -226,7 +226,7 @@ class DataBaseManager : public QObject
* overwritten if you provide a new translation
*/
- int putNewTranslation(QString key,QString tran,int catalog,bool ow=true);
+ int putNewTranslation(TQString key,TQString tran,int catalog,bool ow=true);
/*
@return info about catalog n
@@ -246,14 +246,14 @@ class DataBaseManager : public QObject
@return its refnum.
*/
- int searchCatalogInfo(QString location);
+ int searchCatalogInfo(TQString location);
/* Get a catalog info for location,
* if it doesn't exist it will create one.
* @return the refnum
*/
- int catalogRef(QString location,QString author,QString path);
+ int catalogRef(TQString location,TQString author,TQString path);
/*
Put at refnum the catInfo
@@ -265,17 +265,17 @@ class DataBaseManager : public QObject
/*
Get word info
*/
- WordItem getWordLocations(QString word);
+ WordItem getWordLocations(TQString word);
/*
Add a location for word
*/
- bool addLocation(QString word, unsigned int location);
+ bool addLocation(TQString word, unsigned int location);
/*
Remove location for word
*/
- bool removeLocation(QString word, int location);
+ bool removeLocation(TQString word, int location);
/*
@@ -283,9 +283,9 @@ class DataBaseManager : public QObject
*/
void rebuildIndexes();
- uint32 appendKey(class QString);
+ uint32 appendKey(class TQString);
- QString getKey(uint32 n);
+ TQString getKey(uint32 n);
/*
Load the catalogs info.
@@ -302,7 +302,7 @@ class DataBaseManager : public QObject
void openDataBase();
void closeDataBase();
- static QValueList<QString> wordsIn(QString string);
+ static TQValueList<TQString> wordsIn(TQString string);
signals:
@@ -312,9 +312,9 @@ class DataBaseManager : public QObject
protected:
DataBaseItem cursorGet(uint32 flags);
- QString language;
- QString basedir;
- QValueList<InfoItem> info;
+ TQString language;
+ TQString basedir;
+ TQValueList<InfoItem> info;
DB *db,*infoDb,*wordDb,*indexDb;
DBC *cursor;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
index 87b39e61..0ee1ba4b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
@@ -30,8 +30,8 @@
*/
#include "dbscan.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -39,14 +39,14 @@
using namespace KBabel;
PoScanner::PoScanner(DataBaseManager *dbm,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
dm=dbm;
removeOldCatalogTranslation=false; //Check if this flag do something.
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
@@ -57,17 +57,17 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -110,7 +110,7 @@ return true;
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
@@ -120,8 +120,8 @@ InfoItem cinfo;
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -136,10 +136,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("unknown");
+else author=TQString("unknown");
int catnum=dm->catalogRef(location,author,fileName);
@@ -149,7 +149,7 @@ tot=catalog->numberOfEntries();
bool fuzzy;
bool untra;
-//kdDebug(0) << QString("Tot: %1").arg(tot) << endl;
+//kdDebug(0) << TQString("Tot: %1").arg(tot) << endl;
for (i=0;i<tot;i++) //Skip header = ????
{
@@ -169,7 +169,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
kdWarning() << "Translation database does not support plural forms" << endl;
msgstr=catalog->msgstr(i).first();
@@ -181,7 +181,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
index c151509e..2390c3d1 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
@@ -47,17 +47,17 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseManager *dbm,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseManager *dbm,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -71,7 +71,7 @@ signals:
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
index 37332167..86975874 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
@@ -21,7 +21,7 @@ KInstance *DbSeFactory::s_instance = 0;
KAboutData *DbSeFactory::s_about = 0;
-DbSeFactory::DbSeFactory( QObject *parent, const char *name)
+DbSeFactory::DbSeFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -42,10 +42,10 @@ DbSeFactory::~DbSeFactory()
}
-QObject *DbSeFactory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSeFactory::createObject( TQObject *parent, const char *name,
+ const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
index 6a9f9f3d..7ae4f20b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
@@ -9,12 +9,12 @@ class DbSeFactory : public KLibFactory
{
Q_OBJECT
public:
- DbSeFactory( QObject *parent=0, const char *name=0);
+ DbSeFactory( TQObject *parent=0, const char *name=0);
~DbSeFactory();
- 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();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
index 3bb65934..562f0835 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
@@ -1,33 +1,33 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include "dbseprefwidget.h"
#include "preferenceswidget.h"
-PreferencesWidget::PreferencesWidget(QWidget *parent, const char* name)
+PreferencesWidget::PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE database search engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE database search engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePref(this);
dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly);
layout->addWidget(dbpw);
- resize(QSize(200,200).expandedTo(minimumSizeHint()));
+ resize(TQSize(200,200).expandedTo(minimumSizeHint()));
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -84,7 +84,7 @@ dbpw->ignoreLE->setText("&.:");
dbpw->autoAddCB_2->setChecked(true);
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -97,7 +97,7 @@ QString defaultDir;
dbpw->dirInput->setURL(defaultDir);
}
-void PreferencesWidget::setName(QString n)
+void PreferencesWidget::setName(TQString n)
{
dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n));
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
index 599408cd..5cd1fed8 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
@@ -9,7 +9,7 @@ class PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- PreferencesWidget(QWidget *parent=0, const char* name=0);
+ PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~PreferencesWidget();
virtual void apply();
@@ -17,7 +17,7 @@ public:
virtual void standard();
DBSearchEnginePref *dbpw;
public slots:
- void setName(QString);
+ void setName(TQString);
void setEntries(int);
signals:
void applyNow();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
index 5bf088b8..41f4319d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
@@ -35,19 +35,19 @@
#include "dbscan.h"
#include <klineedit.h>
#include <kapplication.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <knuminput.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdebug.h>
#define i18n (const char *)
-KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
+KDBSearchEngine2::KDBSearchEngine2(TQObject *parent,const char*name)
: SearchEngine(parent,name)
{
pw=0;
@@ -55,7 +55,7 @@ KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
di=0; //Database Interface is not yet initialized
- connect(this,SIGNAL(hasError(QString)),SLOT(setLastError(QString)));
+ connect(this,TQT_SIGNAL(hasError(TQString)),TQT_SLOT(setLastError(TQString)));
searching=false; // i'm not searching
iAmReady=true; //there are no reason to say I'm not ready.
@@ -69,11 +69,11 @@ KDBSearchEngine2::~KDBSearchEngine2()
delete di; //delete database interface
}
-bool KDBSearchEngine2::startSearch(QString str)
+bool KDBSearchEngine2::startSearch(TQString str)
{
kdDebug(0) << "Start a new search. Looking for: " << str << endl;
- static QString queryString;
+ static TQString queryString;
queryString=str; //set the latest query string (note: it is static)
@@ -92,7 +92,7 @@ bool KDBSearchEngine2::startSearch(QString str)
searching=true; //really start searching
- QString searchingString;
+ TQString searchingString;
do //Search loop, it stops only when finished and latest searched string is the actual query string.
{
@@ -134,8 +134,8 @@ bool KDBSearchEngine2::startSearch(QString str)
strategy.addAlgorithm(&wbyw);
- connect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
- strategy.exec(searchingString); disconnect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
+ strategy.exec(searchingString); disconnect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
kdDebug(0) << "End of search for " << searchingString << endl;
@@ -158,7 +158,7 @@ bool KDBSearchEngine2::startSearch(QString str)
-bool KDBSearchEngine2::startSearchInTranslation(QString str)
+bool KDBSearchEngine2::startSearchInTranslation(TQString str)
{
if(autoupdate)
{
@@ -172,20 +172,20 @@ bool KDBSearchEngine2::startSearchInTranslation(QString str)
-bool KDBSearchEngine2::messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error)
+bool KDBSearchEngine2::messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error)
{
//FIXME implement this (needs filters)
return true;
}
-void KDBSearchEngine2::setLastError(QString er)
+void KDBSearchEngine2::setLastError(TQString er)
{
lasterror=er;
}
-QString KDBSearchEngine2::translate(const QString text)
+TQString KDBSearchEngine2::translate(const TQString text)
{
ExactSearchAlgorithm exact(di,&settings);
@@ -212,14 +212,14 @@ void KDBSearchEngine2::receiveResult(QueryResult r)
/* A SEARCH RESULT CONTAINS (see searchengine.h)
- QString requested;
- QString found;
- QString translation;
- QString plainTranslation;
- QString plainFound;
- QString plainRequested;
+ TQString requested;
+ TQString found;
+ TQString translation;
+ TQString plainTranslation;
+ TQString plainFound;
+ TQString plainRequested;
int score;
- QPtrList<TranslationInfo> descriptions;
+ TQPtrList<TranslationInfo> descriptions;
*/
@@ -230,7 +230,7 @@ bool KDBSearchEngine2::init()
else
{
di = new DataBaseInterface(dbDirectory,&settings);
- connect(di,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(di,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
//FIXME: what wbout ready()
if(!di->mainOk()) return false; //check if the main DB is OK.
@@ -243,8 +243,8 @@ const KAboutData *KDBSearchEngine2::about() const
return DbSe2Factory::instance()->aboutData();
}
-void KDBSearchEngine2::stringChanged( QString orig, QString translated
- , QString description)
+void KDBSearchEngine2::stringChanged( TQString orig, TQString translated
+ , TQString description)
{
if(!init()) return;
@@ -255,22 +255,22 @@ void KDBSearchEngine2::stringChanged( QString orig, QString translated
}
-PrefWidget * KDBSearchEngine2::preferencesWidget(QWidget *parent)
+PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *parent)
{
pw = new KDB2PreferencesWidget(parent);
kdDebug(0) << "new KDB2 preferences widget" << endl;
setSettings();
- connect(pw,SIGNAL(restoreNow()),this,SLOT(setSettings()));
- connect(pw,SIGNAL(applyNow()),this,SLOT(updateSettings()));
- connect(pw,SIGNAL(destroyed()),this,SLOT(prefDestr()));
+ connect(pw,TQT_SIGNAL(restoreNow()),this,TQT_SLOT(setSettings()));
+ connect(pw,TQT_SIGNAL(applyNow()),this,TQT_SLOT(updateSettings()));
+ connect(pw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(prefDestr()));
- connect(pw->dbpw->scanAll,SIGNAL(clicked()),this,SLOT(scanAllPressed()));
- connect(pw->dbpw->scanSource,SIGNAL(clicked()),this,SLOT(scanNowPressed()));
- connect(pw->dbpw->addSource,SIGNAL(clicked()),this,SLOT(addSource()));
- connect(pw->dbpw->editSource,SIGNAL(clicked()),this,SLOT(editSource()));
- connect(pw->dbpw->removeSource,SIGNAL(clicked()),this,SLOT(removeSource()));
+ connect(pw->dbpw->scanAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanAllPressed()));
+ connect(pw->dbpw->scanSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanNowPressed()));
+ connect(pw->dbpw->addSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(addSource()));
+ connect(pw->dbpw->editSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(editSource()));
+ connect(pw->dbpw->removeSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeSource()));
return pw;
@@ -309,10 +309,10 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
uint sourceNumber=0;
config->writeEntry("NumberOfDBImportSources",sources.count());
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
sourceNumber++;
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
config->writeEntry("Name",sourceIt.key());
sourceIt.data().writeConfig(config);
}
@@ -321,7 +321,7 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
void KDBSearchEngine2::readSettings(KConfigBase *config)
{
- /*QString defaultDir;
+ /*TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -361,8 +361,8 @@ void KDBSearchEngine2::readSettings(KConfigBase *config)
kdDebug(0) << "Found "<< numberOfSources << " sources" << endl;
for(uint sourceNumber=1;sourceNumber<=numberOfSources;sourceNumber++)
{
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
- QString name=config->readEntry("Name");
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
+ TQString name=config->readEntry("Name");
sources[name].readConfig(config);
}
if(pw)
@@ -401,7 +401,7 @@ void KDBSearchEngine2::setSettings()
//pw->dbpw->useFilters->setChecked(false);
//pw->dbpw->dateToday->setChecked(false);
pw->dbpw->sourceList->clear();
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
pw->dbpw->sourceList->insertItem(sourceIt.key());
}
@@ -413,7 +413,7 @@ void KDBSearchEngine2::updateSettings()
{
if(!pw) return;
- QString newdb = pw->dbpw->dbDirectory->url();
+ TQString newdb = pw->dbpw->dbDirectory->url();
if(newdb !=dbDirectory)
{
kdDebug(0) << "Recreate DB-Interface cause dbdir is changed" << endl;
@@ -469,19 +469,19 @@ pw->dbpw->sourceList->
}
-/*void KDBSearchEngine2::scanSource(QString sourceName)
+/*void KDBSearchEngine2::scanSource(TQString sourceName)
{
//FIXME: an error here would be nice
if(!init()) return;
- for(QValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
+ for(TQValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
{
if((*sourceIt).getName()==sourceName)
{
- QValueList<KURL> urls=(*sourceIt).urls();
+ TQValueList<KURL> urls=(*sourceIt).urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
ps.scanFile(*urlIt);
//We suppose name are unique so no need for further scrolling
@@ -496,14 +496,14 @@ void KDBSearchEngine2::scanNowPressed()
kdDebug(0) << "We should not be here, scanNow called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(!init()) return;
if(sources.contains(sourceName))
{
- QValueList<KURL> urls=sources[sourceName].urls();
+ TQValueList<KURL> urls=sources[sourceName].urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
@@ -520,10 +520,10 @@ void KDBSearchEngine2::scanAllPressed()
PoScanner ps(di);
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
- QValueList<KURL> urls=(*sourceIt).urls();
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ TQValueList<KURL> urls=(*sourceIt).urls();
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
}
@@ -535,18 +535,18 @@ void KDBSearchEngine2::editSource()
kdDebug(0) << "We should not be here, editSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(sources.contains(sourceName))
{
bool nameIsNew;
- QString newName;
+ TQString newName;
SourceDialog sd;
do{
sources[sourceName].setDialogValues(&sd);
sd.sourceName->setText(sourceName);
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
sources[sourceName].getDialogValues(&sd);
newName= sd.sourceName->text();
@@ -586,7 +586,7 @@ void KDBSearchEngine2::removeSource()
kdDebug(0) << "We should not be here, delteSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
sources.remove(sourceName);
pw->dbpw->sourceList->removeItem(pw->dbpw->sourceList->currentItem());
@@ -595,11 +595,11 @@ void KDBSearchEngine2::removeSource()
void KDBSearchEngine2::addSource()
{
- QString newName;
+ TQString newName;
SourceDialog sd;
bool nameIsNew;
do{
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
newName= sd.sourceName->text();
nameIsNew=!sources.contains(newName);
@@ -625,7 +625,7 @@ void KDBSearchEngine2::addSource()
}
-QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::searchTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
@@ -644,7 +644,7 @@ QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
}
-QString KDBSearchEngine2::fuzzyTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::fuzzyTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
index 0db19c6c..fb9cff70 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
@@ -9,7 +9,7 @@ Andrea Rizzi
#define DBSEARCH_ENGINE2_H
#include <searchengine.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include "database.h"
#include "dbse2_factory.h"
@@ -25,7 +25,7 @@ class KDBSearchEngine2 : public SearchEngine
public:
- KDBSearchEngine2(QObject *parent=0, const char *name=0);
+ KDBSearchEngine2(TQObject *parent=0, const char *name=0);
virtual ~KDBSearchEngine2();
//init if needed.
@@ -46,10 +46,10 @@ class KDBSearchEngine2 : public SearchEngine
void readSettings(KConfigBase *config);
- QString translate(const QString text);
+ TQString translate(const TQString text);
- QString fuzzyTranslation(const QString text, int &score);
- QString searchTranslation(const QString, int &score );
+ TQString fuzzyTranslation(const TQString text, int &score);
+ TQString searchTranslation(const TQString, int &score );
/**
* Finds all messages belonging to package package. If nothing is found,
@@ -60,8 +60,8 @@ class KDBSearchEngine2 : public SearchEngine
*
* @return true, if successfull
*/
- bool messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error);
+ bool messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error);
/**
* @returns true, if the searchresults are given as rich text
@@ -79,19 +79,19 @@ class KDBSearchEngine2 : public SearchEngine
* a tabbed widget.
* @param parent the parent of the returned widget
*/
- virtual PrefWidget* preferencesWidget(QWidget *parent);
+ virtual PrefWidget* preferencesWidget(TQWidget *parent);
/** @returns information about this SearchEngine */
virtual const KAboutData *about() const;
/** @returns the i18n name of this search engine */
- QString name() const {return i18n("DB SearchEngine II");}
+ TQString name() const {return i18n("DB SearchEngine II");}
/** @returns a untranslated name of this engine */
- QString id() const {return "dbse2";}
+ TQString id() const {return "dbse2";}
/** @returns the last error message */
- QString lastError() {return lasterror;}
+ TQString lastError() {return lasterror;}
/**
@@ -114,14 +114,14 @@ class KDBSearchEngine2 : public SearchEngine
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearch(QString s);
+ bool startSearch(TQString s);
/**
* starts a search for string s in the translated text
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearchInTranslation(QString s);
+ bool startSearchInTranslation(TQString s);
/** stops a search */
@@ -133,22 +133,22 @@ class KDBSearchEngine2 : public SearchEngine
* on the edited file. The default implementation does nothing.
* @param file The edited file with path
*/
- // virtual void setEditedFile(QString file);
+ // virtual void setEditedFile(TQString file);
/**
* This method allows a search engine to use different settings depending
* on the edited package. The default implementation does nothing.
* @param package The name of the package, that is currently translated.
*/
- // virtual void setEditedPackage(QString package);
+ // virtual void setEditedPackage(TQString package);
/**
* This method allows a search engine to use different settings depending
* on the language code. The default implementation does nothing.
* @param lang The current language code (e.g. de).
*/
- // virtual void setLanguageCode(QString lang);
- // virtual void setLanguage(QString languageCode, QString languageName);
+ // virtual void setLanguageCode(TQString lang);
+ // virtual void setLanguage(TQString languageCode, TQString languageName);
@@ -160,15 +160,15 @@ class KDBSearchEngine2 : public SearchEngine
* @param translation the translated string
*/
- void stringChanged( QString orig, QString translated
- , QString description);
+ void stringChanged( TQString orig, TQString translated
+ , TQString description);
//void scan();
- void setLastError(QString er);
+ void setLastError(TQString er);
//Slots for preference dialog
- // void scanSource(QString sourceName);
+ // void scanSource(TQString sourceName);
void scanNowPressed();
void scanAllPressed();
void editSource();
@@ -181,7 +181,7 @@ class KDBSearchEngine2 : public SearchEngine
bool searching;
bool iAmReady;
bool autoupdate;
- QString lasterror;
+ TQString lasterror;
KDB2PreferencesWidget *pw;
//PrefWidg -> DBSE
@@ -190,11 +190,11 @@ class KDBSearchEngine2 : public SearchEngine
void setSettings();
DBSESettings settings;
- QString dbDirectory;
+ TQString dbDirectory;
bool autoAdd,useSentence,useGlossary,useExact;
bool useDivide,useAlpha,useWordByWord,useDynamic;
uint numberOfResult;
- QMap<QString,MessagesSource> sources;
+ TQMap<TQString,MessagesSource> sources;
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
index 0ca040e8..466b68e5 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
@@ -10,20 +10,20 @@
//
//
#include "algorithms.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
//FIXME: remove
#define i18n (const char*)
-DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e=di->get(query,0);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
emit newResult(QueryResult(*it,e.first.getString(),settings->scoreExact));
@@ -35,19 +35,19 @@ DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
}
-DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
// ExactSearchAlgorithm exact(query,settings);
uint countResults=0;
- for(QValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
+ for(TQValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
{
- connect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ connect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
kdDebug(0) << "Algo pointer" << (*algoit) << endl;
res+=(*algoit)->exec(query);
countResults=res.count();
kdDebug(0) << "Count = " << countResults << endl;
- disconnect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ disconnect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
}
return res;
}
@@ -57,7 +57,7 @@ void GenericSearchAlgorithm::addAlgorithm( AbstractSearchAlgorithm * algo )
algoChain.append(algo);
}
-DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DBItemMultiIndex::IndexList il=di->getAlpha(query);
@@ -65,8 +65,8 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
for(DBItemMultiIndex::IndexList::iterator it=il.begin();it!=il.end()&&!di->stopNow();++it)
{
DataBaseInterface::MainEntry e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreAlpha);
emit newResult(r);
@@ -78,17 +78,17 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
return res;
}
-DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e = di->getSentence(query);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
kdDebug(0) << "Count in sentence archive " << trs.count()<< endl;
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreSentence);
emit newResult(r);
@@ -100,31 +100,31 @@ DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QStrin
return res;
}
-DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString & query )
{
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> chunks=factory->chunks();
+ TQPtrList<AbstractChunk> chunks=factory->chunks();
kdDebug(0) << "Number of chunks " << chunks.count() << endl;
chunks.setAutoDelete(true); //I should delete the chunks myself
- QStringList querySeparators=factory->separators();
+ TQStringList querySeparators=factory->separators();
//This prevents recursive loop.
if (chunks.count()<=1) return res;
- QStringList translations,tmpTranslations;
+ TQStringList translations,tmpTranslations;
translations.push_back(""); //FIXME this is needed to start , but is not good
int finalscore=0;
int i=0;
- QMap<QString,bool> translationUsed;
+ TQMap<TQString,bool> translationUsed;
//Loop on all chunk
for(AbstractChunk *it=chunks.first();it && !di->stopNow(); it=chunks.next())
{
kdDebug(0) << "Process next chunk" << endl;
int chunkscore=0;
- QValueList<QueryResult> r=it->translations();
+ TQValueList<QueryResult> r=it->translations();
kdDebug(0) << "Number of results for this chunk " << r.count() << endl;
if(r.count()<1) {
@@ -144,14 +144,14 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
translationUsed.clear();
for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1)
{
- QString chunkTranslation= (*it1).result();
+ TQString chunkTranslation= (*it1).result();
if(!translationUsed.contains(chunkTranslation))
{
translationUsed[chunkTranslation]=true;
kdDebug(0) << "a translation is: " << chunkTranslation << endl;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString prevTranslation=*it2;
+ TQString prevTranslation=*it2;
tmpTranslations.push_back(prevTranslation+chunkTranslation+querySeparators[i]);
kdDebug(0) << "..appending it to " << prevTranslation << endl;
}
@@ -176,9 +176,9 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
if (finalscore<50) return res;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString theTranslation=*it2;
+ TQString theTranslation=*it2;
QueryResult qr(di->format(theTranslation,query),i18n("CHUNK BY CHUNK"),finalscore);
qr.setRichOriginal(i18n("<h3>Chunk by chunk</h3>CHANGE THIS TEXT!!!!This translation is"
"obtained translating the sentences and using a"
@@ -211,22 +211,22 @@ FuzzyChunkSearchAlgorithm::FuzzyChunkSearchAlgorithm( DataBaseInterface * dbi, D
}
-DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString & query )
{
//FIXME: this code is shit too
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> querychunks = factory->chunks();
+ TQPtrList<AbstractChunk> querychunks = factory->chunks();
querychunks.setAutoDelete(true);
- typedef QMap<QString,QValueList<unsigned int> > ResultMap;
+ typedef TQMap<TQString,TQValueList<unsigned int> > ResultMap;
ResultMap rmap; //result of words index query
unsigned int notfound=0,frequent=0,nchunks = querychunks.count();
//Get index list for each word
for(AbstractChunk *it=querychunks.first(); it &&!di->stopNow() ; it=querychunks.next() )
{
- QValueList<uint> locations = (*it).locationReferences();
+ TQValueList<uint> locations = (*it).locationReferences();
if(locations.count()>0)
{
@@ -246,10 +246,10 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
//Now we have a map (rmap) "word in query->list of occurency"
- QValueList<unsigned int>::iterator countpos[nchunks+1];
+ TQValueList<unsigned int>::iterator countpos[nchunks+1];
- QValueList<unsigned int> il;
+ TQValueList<unsigned int> il;
for(int i = 0;i<=nchunks&&!di->stopNow();i++)
countpos[i]=il.end();
@@ -310,12 +310,12 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
int bestscore=0;
for(unsigned int wf=nchunks;wf>0;wf-- ){
- for(QValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
+ for(TQValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
{ //loop on entries with same number of word found
DataBaseInterface::MainEntry e;
e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
{
unsigned int cinr=factory->chunks(*it).count(); //chunk in result
//compute a score, lets kbabel sort now, it should be fast...
@@ -326,11 +326,11 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
// kdDebug(0) << "s: "<<score << " wf: "<<wf<<" nwords: "<<nwords<<" winr: "<<winr
// <<" 90*wf/nwords: "<<90*wf/nwords << " -:" << 90*(((nwords-winr)>0)?(nwords-winr):(winr-nwords))/(nwords*10)<< endl;
// FIXME: format better the richtext
- QString ori=e.first.getString();
- QString re=di->format(di->simple(*it,true),query);
+ TQString ori=e.first.getString();
+ TQString re=di->format(di->simple(*it,true),query);
QueryResult r(re,ori,score);
- for(QPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
- ori=ori.replace(QRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
+ for(TQPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
+ ori=ori.replace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
}
r.setRichOriginal(ori);
if(!di->stopNow())
@@ -344,16 +344,16 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
}
-DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const TQString & query )
{
//FIXME, this code is shit.
DataBaseInterface::ResultList res;
if(di->words(query).count()>1) return res;
- QMap<QString,float> corRes = di->correlation(query,0,false);
+ TQMap<TQString,float> corRes = di->correlation(query,0,false);
float max=0,max1=0,max2=0;
- QString best,best1,best2;
+ TQString best,best1,best2;
- for(QMap<QString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
+ for(TQMap<TQString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
{
if(it.data()>max)
{
@@ -414,7 +414,7 @@ SingleWordSearchAlgorithm::SingleWordSearchAlgorithm( DataBaseInterface * dbi, D
addAlgorithm(&corr);
}
-DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const TQString & query )
{
if(di->words(query).count()>1)
return ResultList();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
index 5f9ee682..aa049f85 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
@@ -14,14 +14,14 @@
#include "database.h"
#include "chunk.h"
-#include <qobject.h>
+#include <tqobject.h>
class AbstractSearchAlgorithm : public QObject
{
Q_OBJECT
public:
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
AbstractSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets)
{
@@ -31,7 +31,7 @@ class AbstractSearchAlgorithm : public QObject
/**
* this contains the algo and return some results.
*/
- virtual DataBaseInterface::ResultList exec(const QString& query)=0;
+ virtual DataBaseInterface::ResultList exec(const TQString& query)=0;
signals:
void newResult(QueryResult);
@@ -50,7 +50,7 @@ class ExactSearchAlgorithm : public AbstractSearchAlgorithm
public:
ExactSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
@@ -59,7 +59,7 @@ class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
public:
AlphaSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
@@ -68,7 +68,7 @@ class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
public:
SentenceArchiveSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
@@ -77,7 +77,7 @@ class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
ChunkByChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
@@ -93,7 +93,7 @@ class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
FuzzyChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
factory=_factory;
@@ -108,14 +108,14 @@ class GenericSearchAlgorithm : public AbstractSearchAlgorithm
public:
GenericSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
void addAlgorithm(AbstractSearchAlgorithm *algo);
void setMaxResultNumber(uint num){maxResults=num;}
protected:
- QValueList<AbstractSearchAlgorithm *> algoChain;
+ TQValueList<AbstractSearchAlgorithm *> algoChain;
uint maxResults;
};
@@ -125,7 +125,7 @@ class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm
Q_OBJECT
public:
CorrelationSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
};
@@ -135,7 +135,7 @@ class SingleWordSearchAlgorithm : public GenericSearchAlgorithm
Q_OBJECT
public:
SingleWordSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
private:
ExactSearchAlgorithm exact;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
index 7c62748a..ef426d53 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
@@ -19,12 +19,12 @@ AbstractChunk::~AbstractChunk( )
{
}
-WordChunk::WordChunk( DataBaseInterface * di, QString _word ) : AbstractChunk(di)
+WordChunk::WordChunk( DataBaseInterface * di, TQString _word ) : AbstractChunk(di)
{
word=_word;
}
-QValueList<QueryResult> WordChunk::translations( )
+TQValueList<QueryResult> WordChunk::translations( )
{
DataBaseInterface::ResultList r;
SingleWordSearchAlgorithm sa(di,di->getSettings());
@@ -32,13 +32,13 @@ QValueList<QueryResult> WordChunk::translations( )
return r;
}
-//QValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
//{
//}
-QValueList< uint > WordChunk::locationReferences( )
+TQValueList< uint > WordChunk::locationReferences( )
{
- QValueList<uint> res=di->getWordIndex(word);
+ TQValueList<uint> res=di->getWordIndex(word);
kdDebug(0) << "Number of locations " << res.count() <<endl ;
return res;
/* DBItemMainKey *k = new DBItemMainKey(word);
@@ -46,20 +46,20 @@ QValueList< uint > WordChunk::locationReferences( )
if(wordsindex->get(k,d)!=DB_NOTFOUND)
return d->getList();
else
- return QValueList<uint> tmpList;
+ return TQValueList<uint> tmpList;
*/
}
-void WordChunk::setLocationReferences( QValueList< uint > )
+void WordChunk::setLocationReferences( TQValueList< uint > )
{
}
-SentenceChunk::SentenceChunk( DataBaseInterface * di, QString _sentence ): AbstractChunk(di)
+SentenceChunk::SentenceChunk( DataBaseInterface * di, TQString _sentence ): AbstractChunk(di)
{
sentence=_sentence;
}
-QValueList<QueryResult> SentenceChunk::translations( )
+TQValueList<QueryResult> SentenceChunk::translations( )
{
GenericSearchAlgorithm g(di,di->getSettings());
@@ -75,29 +75,29 @@ QValueList<QueryResult> SentenceChunk::translations( )
}
-//QValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
//{
//
//}
-QValueList< uint > SentenceChunk::locationReferences( )
+TQValueList< uint > SentenceChunk::locationReferences( )
{
}
-void SentenceChunk::setLocationReferences( QValueList< uint > )
+void SentenceChunk::setLocationReferences( TQValueList< uint > )
{
}
-QPtrList< AbstractChunk> WordChunkFactory::chunks()
+TQPtrList< AbstractChunk> WordChunkFactory::chunks()
{
- QString str=di->simple(string);
- QPtrList<AbstractChunk> list;
+ TQString str=di->simple(string);
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
_separators.clear();
kdDebug(0) << "Word chunks of:" <<str << endl;
int pos;
- QString sep;
- QRegExp r("(\\s)");
+ TQString sep;
+ TQRegExp r("(\\s)");
do {
pos=r.search(str);
@@ -120,10 +120,10 @@ QPtrList< AbstractChunk> WordChunkFactory::chunks()
-QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
+TQPtrList<AbstractChunk> SentenceChunkFactory::chunks()
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
// kdDebug(0) << s << endl;
@@ -132,9 +132,9 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
- QString sep=re.cap(1);
+ TQString sep=re.cap(1);
if(!str.left(pos).isEmpty())
{
@@ -154,14 +154,14 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
return list;
}
-QPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
+TQPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
uint slen=str.length();
kdDebug(0) << "CaseWordChunk string:" << str << endl;
- QString tmpWord;
+ TQString tmpWord;
bool upcase;
for(uint i=0;i<=slen;i++)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
index 5c5fcb93..2578e59e 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
@@ -11,8 +11,8 @@
//
#ifndef DBSE2_CHUNK_H
#define DBSE2_CHUNK_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "database.h"
/**
@@ -29,13 +29,13 @@ class AbstractChunk
/**
* This function should return a list of translation for the current chunk.
*/
- virtual QValueList<QueryResult> translations()=0;
+ virtual TQValueList<QueryResult> translations()=0;
//FIXME: is this in the right place, better in factory? check that stuff
- //virtual QValueList<QueryResult> translationsFromReference(uint reference)=0;
- virtual QValueList<uint> locationReferences()=0;
- virtual void setLocationReferences(QValueList<uint>)=0;
- virtual QString chunkString()=0;
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference)=0;
+ virtual TQValueList<uint> locationReferences()=0;
+ virtual void setLocationReferences(TQValueList<uint>)=0;
+ virtual TQString chunkString()=0;
protected:
DataBaseInterface *di;
@@ -47,16 +47,16 @@ class AbstractChunk
class WordChunk : public AbstractChunk
{
public:
- WordChunk(DataBaseInterface *di,QString _word);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return word;}
+ WordChunk(DataBaseInterface *di,TQString _word);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return word;}
- //static QValueList<WordChunk> divide(QString);
+ //static TQValueList<WordChunk> divide(TQString);
private:
- QString word;
+ TQString word;
};
/**
@@ -65,17 +65,17 @@ class WordChunk : public AbstractChunk
class SentenceChunk : public AbstractChunk
{
public:
- SentenceChunk(DataBaseInterface *di,QString _sentence);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return sentence;}
+ SentenceChunk(DataBaseInterface *di,TQString _sentence);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return sentence;}
- // static QValueList<SentenceChunk> divide(QString);
+ // static TQValueList<SentenceChunk> divide(TQString);
private:
- QString sentence;
+ TQString sentence;
};
@@ -92,11 +92,11 @@ class AbstractChunkFactory
di=_di;
}
virtual ~AbstractChunkFactory(){}
- virtual QPtrList<AbstractChunk> chunks()=0;
+ virtual TQPtrList<AbstractChunk> chunks()=0;
/**
Change th string and return the chunks
*/
- virtual QPtrList<AbstractChunk> chunks(const QString& s)
+ virtual TQPtrList<AbstractChunk> chunks(const TQString& s)
{
string=s;
return chunks();
@@ -105,14 +105,14 @@ class AbstractChunkFactory
* Returns the list of separators of last @ref chunks() call
*/
- virtual QStringList separators(){ return _separators;}
- void setQuery(const QString& s)
+ virtual TQStringList separators(){ return _separators;}
+ void setQuery(const TQString& s)
{
string=s;
}
protected:
- QString string;
- QStringList _separators;
+ TQString string;
+ TQStringList _separators;
DataBaseInterface *di;
};
@@ -123,7 +123,7 @@ class WordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class CaseBasedWordChunkFactory : public AbstractChunkFactory
@@ -133,7 +133,7 @@ class CaseBasedWordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class SentenceChunkFactory : public AbstractChunkFactory
@@ -144,7 +144,7 @@ class SentenceChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
index ea0e8379..0631f7ad 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
@@ -8,8 +8,8 @@ License: GPLv2
#include <math.h>
#include "database.h"
-#include <qregexp.h>
-#include <qdict.h>
+#include <tqregexp.h>
+#include <tqdict.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -21,7 +21,7 @@ License: GPLv2
-DataBase::DataBase(QString dbpath,QString dbname, QString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
+DataBase::DataBase(TQString dbpath,TQString dbname, TQString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
{
filename=dbpath+"."+dblang+".db";
@@ -59,11 +59,11 @@ unsigned int DataBase::getLast()
-QueryResult::QueryResult(QString r)
+QueryResult::QueryResult(TQString r)
{
res=r;
}
-QueryResult::QueryResult(QString r,QString o,int s)
+QueryResult::QueryResult(TQString r,TQString o,int s)
{
res=r;
richr=r;
@@ -80,7 +80,7 @@ QueryResult::QueryResult()
-DataBaseInterface::DataBaseInterface(QString dir, DBSESettings *sets)
+DataBaseInterface::DataBaseInterface(TQString dir, DBSESettings *sets)
{
//FIXME Better db names!!
@@ -125,7 +125,7 @@ DataBaseInterface::~DataBaseInterface()
}
-DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt)
+DataBase *DataBaseInterface::openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt)
{
DataBase *aDb = new DataBase(prefix,name,l);
@@ -163,7 +163,7 @@ DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString&
*/
-DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchFilter *filter)
+DataBaseInterface::MainEntry DataBaseInterface::get(const TQString& query,SearchFilter *filter)
{
static int counter=1;
counter++;
@@ -184,11 +184,11 @@ DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchF
*/
-bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *info)
+bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo *info)
{
DBItemMainKey mk(original);
DBItemMainData md;
- QMap<QString, int> correlationDiff;
+ TQMap<TQString, int> correlationDiff;
bool newentry=false;
//try to get
kdDebug(0) << "Inserting the pair:" << endl;
@@ -220,8 +220,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
alpha->put(&ka,&in);
kdDebug(0) << "Updating the word index " << endl;
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -240,8 +240,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
kdDebug(0) << "inside sentence loop" << endl;
@@ -276,11 +276,11 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
if(!translated.isEmpty())
{
//loop on all translations to update correlation
- QStringList tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ TQStringList tmpTranslations=md.getTranslations();
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]--;
@@ -294,10 +294,10 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
md.addTranslation(translated,info->ref());
tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]++;
@@ -316,7 +316,7 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
}
-bool DataBaseInterface::removeEntry(QString original)
+bool DataBaseInterface::removeEntry(TQString original)
{
DBItemMainKey mk(original);
DBItemMainData md;
@@ -346,8 +346,8 @@ bool DataBaseInterface::removeEntry(QString original)
alpha->put(&ka,&in);
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); it++)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); it++)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -357,8 +357,8 @@ bool DataBaseInterface::removeEntry(QString original)
}
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
for(int i=0; i< so.count() ; i++)
@@ -380,16 +380,16 @@ bool DataBaseInterface::removeEntry(QString original)
-QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *filter,bool notify, float minSign)
+TQMap<TQString,float> DataBaseInterface::correlation(TQString word,SearchFilter *filter,bool notify, float minSign)
{
- QDict<unsigned int> res;
+ TQDict<unsigned int> res;
// res.setAutoDelete(true);
- QMap<QString, float>final;
+ TQMap<TQString, float>final;
DBItemMultiIndex::IndexList il;
unsigned int tot=0;
unsigned int background=0;
unsigned int nocck;
- QString sword=simple(word);
+ TQString sword=simple(word);
DBItemMainKey *k = new DBItemMainKey(sword);
DBItemMultiIndex *d = new DBItemMultiIndex();
if(wordsindex->get(k,d)!=DB_NOTFOUND)
@@ -398,29 +398,29 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
il=d->getList();
kdDebug(0) << il.count()<<endl;
tot=0;
- for(QValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
+ for(TQValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
{
numindex->get(*it,k);
- // QValueList<QueryResult> trad=exactMatch(k->getString(),filter);
+ // TQValueList<QueryResult> trad=exactMatch(k->getString(),filter);
MainEntry e=get(k->getString(),filter);
- QStringList trad=e.second.getTranslations();
+ TQStringList trad=e.second.getTranslations();
nocck=words(k->getString()).contains(sword);
- for( QStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
+ for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
{
- QStringList w=words(*it2);
+ TQStringList w=words(*it2);
unsigned int numWords = w.count()*10+1;
unsigned int wei=100000/sqrt(numWords); //weight (is the best one?)
background+=(numWords-nocck)*wei;
- QDict<uint> count;
+ TQDict<uint> count;
//count.setAutoDelete(true);
//FIXME:SET AUTODELETE FOR ALL DICTS
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(!(ip=count[*it1])) count.insert(*it1,new uint(1));
@@ -428,7 +428,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
(*ip)++;
}
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(*(count[*it1])==nocck) //add only if same number of entry (it cuts articles)
@@ -442,7 +442,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
unsigned int sqrBG=sqrt((1.0*background+1)/10000);
- for(QDictIterator<uint> it(res) ; it.current(); ++it)
+ for(TQDictIterator<uint> it(res) ; it.current(); ++it)
{
float sign=1.0*(*(it.current()))/(10000.0*sqrBG);
if(sign >minSign){
@@ -457,15 +457,15 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
return final;
}
-QStringList DataBaseInterface::words(QString s)
+TQStringList DataBaseInterface::words(TQString s)
{
- QString str=simple(s);
- QStringList list;
+ TQString str=simple(s);
+ TQStringList list;
int pos;
do {
- pos=str.find(QRegExp("\\s"));
+ pos=str.find(TQRegExp("\\s"));
// if(!simple(str.left(pos)).isEmpty())
// list.append(simple(str.left(pos)));
if(!str.left(pos).isEmpty())
@@ -476,24 +476,24 @@ QStringList DataBaseInterface::words(QString s)
return list;
}
-QString DataBaseInterface::simple(QString str,bool ck)
+TQString DataBaseInterface::simple(TQString str,bool ck)
{
- QString res;
+ TQString res;
if(ck)
res=str; //case keep
else
res=str.lower(); //lowercase
//FIXME: uncoment the foll. line (check speed)
- res=res.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
+ res=res.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
//Try to get rid of regexps.
- // res=res.replace(QRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
- // res=res.replace(QRegExp("(('|-|_)+)")," "); //strip non-word char
- // res=res.replace(QRegExp("[^\\w\\s%]"),""); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
- QString r;
- QChar c;
+ TQString r;
+ TQChar c;
bool wasSpace=true;
uint len=res.length();
for(uint i=0; i<len;i++)
@@ -540,10 +540,10 @@ QString DataBaseInterface::simple(QString str,bool ck)
return res;
}
-QStringList DataBaseInterface::sentences(QString s)
+TQStringList DataBaseInterface::sentences(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
@@ -551,7 +551,7 @@ QStringList DataBaseInterface::sentences(QString s)
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
if(!str.left(pos).isEmpty())
list.append(str.left(pos).stripWhiteSpace());
@@ -565,20 +565,20 @@ QStringList DataBaseInterface::sentences(QString s)
return list;
}
-QStringList DataBaseInterface::sentencesSeparator(QString s)
+TQStringList DataBaseInterface::sentencesSeparator(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
int pos;
do {
- QRegExp re;
+ TQRegExp re;
re.setPattern("([.:?!;]( |$|\\\\n\\n))");
pos = re.search(str);
- QString separator=re.cap(1);
+ TQString separator=re.cap(1);
if(pos!=-1){
list.append(separator);
}
@@ -589,26 +589,26 @@ QStringList DataBaseInterface::sentencesSeparator(QString s)
return list;
}
-bool DataBaseInterface::isUpper(QChar s)
+bool DataBaseInterface::isUpper(TQChar s)
{
return s==s.upper();
}
-bool DataBaseInterface::isLower(QChar s)
+bool DataBaseInterface::isLower(TQChar s)
{
return s==s.lower();
}
-QString DataBaseInterface::format(QString _s,QString t)
+TQString DataBaseInterface::format(TQString _s,TQString t)
{
//FIXME use settings
//FIXME use regexp
- QString s=_s;
- QString noTagT=t.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
- QChar first=noTagT[noTagT.find(QRegExp("\\w"))];
+ TQString s=_s;
+ TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
+ TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))];
bool firstCapital=isUpper(first);
/*
@@ -643,9 +643,9 @@ if(columnAtEnd)
if(allupper)
s=s.upper();
- int pos=t.find(QRegExp("&"));
+ int pos=t.find(TQRegExp("&"));
if(pos>=0) {
- QChar accel=t[t.find(QRegExp("&"))+1];
+ TQChar accel=t[t.find(TQRegExp("&"))+1];
if(accel!='&')
{
@@ -667,32 +667,32 @@ if(columnAtEnd)
}
-QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace)
+TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace)
{
- QString s=_s;
- QRegExp templateRegExp(tre);
- //QString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
- //QString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
+ TQString s=_s;
+ TQRegExp templateRegExp(tre);
+ //TQString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
+ //TQString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
if(templateRegExp.exactMatch(t))
{
- QStringList caps=templateRegExp.capturedTexts();
+ TQStringList caps=templateRegExp.capturedTexts();
int i=0;
- for(QStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
+ for(TQStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
{
- QString phRegExp="(?!\\\\)@CAP"+QString::number(i)+"@";
+ TQString phRegExp="(?!\\\\)@CAP"+TQString::number(i)+"@";
//kdDebug(0) << "phRegExp: " << phRegExp << endl;
//kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl;
- stringReplace = stringReplace.replace(QRegExp(phRegExp),*capit);
- stringSearch = stringSearch.replace(QRegExp(phRegExp),*capit);
+ stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit);
+ stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit);
i++;
}
// kdDebug(0) << "stringSearch " << stringSearch << endl;
// kdDebug(0) << "stringReplace " << stringReplace << endl;
- QRegExp stringSearchRegExp = QRegExp(stringSearch);
+ TQRegExp stringSearchRegExp = TQRegExp(stringSearch);
// kdDebug(0) << "before: "<<s<<endl;
s = s.replace(stringSearchRegExp,stringReplace);
// kdDebug(0) << "after: "<<s<<endl;
@@ -702,7 +702,7 @@ QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QStri
return s;
}
-DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const TQString & query )
{
DBItemMainKey *k = new DBItemMainKey(simple(query));
DBItemMultiIndex *d = new DBItemMultiIndex();
@@ -718,7 +718,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getFromIndex( uint i )
return get(k.getString(),0); //FIXME: this is a BUG right now but the filter should be removed
}
-DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & query )
+DataBaseInterface::MainEntry DataBaseInterface::getSentence( const TQString & query )
{
static int counter=1;
@@ -731,7 +731,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & que
}
-DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const TQString & query )
{
DBItemMainKey k = DBItemMainKey(query);
DBItemMultiIndex d = DBItemMultiIndex();
@@ -740,7 +740,7 @@ DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & que
}
else
{
- QValueList<unsigned int> tmpList;
+ TQValueList<unsigned int> tmpList;
return tmpList;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.h b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
index c447fa59..d6ed3482 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
@@ -8,11 +8,11 @@
#ifndef DATABASE_2_H
#define DATABASE_2_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <db4/db_cxx.h>
-#include <qobject.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqregexp.h>
#include "dbentries.h"
@@ -43,7 +43,7 @@ public:
class DataBase : Db
{
public:
- DataBase(QString dbpath, QString dbname, QString dblang);
+ DataBase(TQString dbpath, TQString dbname, TQString dblang);
int open(DBTYPE type,unsigned int flags=0);
@@ -105,12 +105,12 @@ int get(DBItem * key,DBItem *data){
int close(unsigned int i) {return Db::close( i); }
//For scrolling
- // int getFirst(DBItem *key,DBItem *data,QString table);
- // int getNext(DBItem *key,DBItem *data,QString table);
- // bool isEnd(QString table);
+ // int getFirst(DBItem *key,DBItem *data,TQString table);
+ // int getNext(DBItem *key,DBItem *data,TQString table);
+ // bool isEnd(TQString table);
private:
- QString filename;
- QString database;
+ TQString filename;
+ TQString database;
DBTYPE mytype;
};
@@ -122,26 +122,26 @@ class QueryResult //from DBInterface to KDBSearchEngine
{
public:
QueryResult();
- QueryResult(QString r);
- QueryResult(QString r,QString o,int s);
- void setRichResult(QString r) { richr=r; }
- void setRichOriginal(QString r) { richo=r; }
+ QueryResult(TQString r);
+ QueryResult(TQString r,TQString o,int s);
+ void setRichResult(TQString r) { richr=r; }
+ void setRichOriginal(TQString r) { richo=r; }
- QString richResult() {return richr;}
- QString richOriginal() {return richo;}
+ TQString richResult() {return richr;}
+ TQString richOriginal() {return richo;}
- QString result(){ return res; }
- QString original() {return orig; }
+ TQString result(){ return res; }
+ TQString original() {return orig; }
int score() {return sco;}
//info contains originalkey,catalog,date,author etc...
ResultInfo info(){ResultInfo i; i.info="no info"; return i;}
private:
- QString res;
- QString orig;
- QString richr;
- QString richo;
+ TQString res;
+ TQString orig;
+ TQString richr;
+ TQString richo;
int sco;
};
@@ -158,34 +158,34 @@ class DataBaseInterface : public QObject
public:
//move result list typedef to AbstractAlgorthm or somewhere else
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
typedef QPair<DBItemMainKey,DBItemMainData> MainEntry;
- DataBaseInterface( QString dir, DBSESettings *sets);
+ DataBaseInterface( TQString dir, DBSESettings *sets);
~DataBaseInterface();
//Ask the Database to stop now.
void stop(bool b=true) {_stopNow=b;}
//Search words
- ResultList wordsMatch(QString query,SearchFilter *filter=0,bool notify=true);
+ ResultList wordsMatch(TQString query,SearchFilter *filter=0,bool notify=true);
//Edit database functions.
//addEntry and sync all the tables
- bool addEntry(QString original,QString translated,InputInfo *info);
+ bool addEntry(TQString original,TQString translated,InputInfo *info);
//FIXME:implement me!
- bool removeEntry(QString original);
+ bool removeEntry(TQString original);
//FIXME: go persistent!
- QMap<QString,float> correlation(QString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
+ TQMap<TQString,float> correlation(TQString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
// Read the database
- MainEntry get(const QString& query,SearchFilter *filter=0);
+ MainEntry get(const TQString& query,SearchFilter *filter=0);
MainEntry getFromIndex(uint i);
- DBItemMultiIndex::IndexList getAlpha(const QString& query);
- DBItemMultiIndex::IndexList getWordIndex(const QString& query);
- MainEntry getSentence(const QString& query);
+ DBItemMultiIndex::IndexList getAlpha(const TQString& query);
+ DBItemMultiIndex::IndexList getWordIndex(const TQString& query);
+ MainEntry getSentence(const TQString& query);
//Database status check functions
bool mainOk() {return main!=0;}
@@ -206,7 +206,7 @@ class DataBaseInterface : public QObject
DBSESettings *getSettings() {return settings;}
private:
- DataBase * openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt);
+ DataBase * openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt);
DataBase *main;
DataBase *numindex;
DataBase *wordsindex;
@@ -222,14 +222,14 @@ class DataBaseInterface : public QObject
//FIXME:Move to KBabel common library.
public:
- QString format( QString _s,QString t);
- QString formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace);
- static QStringList words(QString s);
- static QStringList sentences(QString s);
- static QStringList sentencesSeparator(QString s);
- static QString simple(QString str,bool ck=false);
- static bool isUpper(QChar s);
- static bool isLower(QChar s);
+ TQString format( TQString _s,TQString t);
+ TQString formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace);
+ static TQStringList words(TQString s);
+ static TQStringList sentences(TQString s);
+ static TQStringList sentencesSeparator(TQString s);
+ static TQString simple(TQString str,bool ck=false);
+ static bool isUpper(TQChar s);
+ static bool isLower(TQChar s);
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
index 4f048f9c..efa7e44d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
@@ -1,12 +1,12 @@
#include "dbentries.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
void DBItem::set()
{
- QBuffer b(mydata);
+ TQBuffer b(mydata);
b.open( IO_WriteOnly );
- QDataStream s(&b);
+ TQDataStream s(&b);
write(&s);
b.close();
set_data(mydata.data());
@@ -18,7 +18,7 @@ void DBItem::set()
mydata.resize(get_size());
mydata.duplicate((const char *)get_data(),(unsigned int)get_size());
- QDataStream *s = new QDataStream(mydata,IO_ReadOnly);
+ TQDataStream *s = new TQDataStream(mydata,IO_ReadOnly);
read(s);
delete s;
}
@@ -31,18 +31,18 @@ DBItemMainKey::DBItemMainKey()
//set();
}
-DBItemMainKey::DBItemMainKey(QString searchstring)
+DBItemMainKey::DBItemMainKey(TQString searchstring)
{
sstr=searchstring;
//set();
}
-void DBItemMainKey::read(QDataStream *s)
+void DBItemMainKey::read(TQDataStream *s)
{
*s >> sstr;
}
-void DBItemMainKey::write(QDataStream *s)
+void DBItemMainKey::write(TQDataStream *s)
{
*s << sstr;
}
@@ -64,17 +64,17 @@ void DBItemMainData::clear()
//set();
}
-void DBItemMainData::read(QDataStream *s)
+void DBItemMainData::read(TQDataStream *s)
{
*s >> indexnumber >> translations;
}
-void DBItemMainData::write(QDataStream *s)
+void DBItemMainData::write(TQDataStream *s)
{
*s << (Q_UINT32)indexnumber << translations;
}
-void DBItemMainData::addTranslation(QString str, unsigned int ref)
+void DBItemMainData::addTranslation(TQString str, unsigned int ref)
{
//get();
if(translations[str].find(ref)==translations[str].end()) // If it do not exists
@@ -87,7 +87,7 @@ void DBItemMainData::addTranslation(QString str, unsigned int ref)
}
-void DBItemMainData::removeTranslation(QString str, unsigned int ref)
+void DBItemMainData::removeTranslation(TQString str, unsigned int ref)
{
//get();
translations[str].remove(ref);
@@ -100,8 +100,8 @@ void DBItemMainData::removeTranslation(QString str, unsigned int ref)
void DBItemMainData::removeRef( unsigned int ref)
{
//get();
-QMapIterator<QString,QValueList<unsigned int> > it2;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQMapIterator<TQString,TQValueList<unsigned int> > it2;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); /* it++*/)
{ //Dirty hack
it2=it;
@@ -113,11 +113,11 @@ QMapIterator<QString,QValueList<unsigned int> > it2;
//set();
}
-QStringList DBItemMainData::getTranslations()
+TQStringList DBItemMainData::getTranslations()
{
//get();
-QStringList result;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQStringList result;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); it++)
result.append(it.key());
@@ -125,7 +125,7 @@ return result;
}
-QValueList<unsigned int> DBItemMainData::getReferences(QString str)
+TQValueList<unsigned int> DBItemMainData::getReferences(TQString str)
{
//get();
return translations[str]; //this also add a "str" entry but we do not call set()!
@@ -160,12 +160,12 @@ void DBItemMultiIndex::removeEntry(unsigned int index)
}
-void DBItemMultiIndex::read(QDataStream *s)
+void DBItemMultiIndex::read(TQDataStream *s)
{
*s >> list;
}
-void DBItemMultiIndex::write(QDataStream *s)
+void DBItemMultiIndex::write(TQDataStream *s)
{
*s << list;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
index 0a40878c..c4410ade 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
@@ -2,19 +2,19 @@
#define DBENTRIES_H
#include <db4/db_cxx.h>
-#include <qstring.h>
-#include <qbuffer.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqbuffer.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
class CatalogInfo
{
- QString author;
- QDateTime datetime;
- QString filename;
- QString filepath;
+ TQString author;
+ TQDateTime datetime;
+ TQString filename;
+ TQString filepath;
};
@@ -23,13 +23,13 @@ class ResultInfo
{
public:
//Common info
- QString original; //placeholder
+ TQString original; //placeholder
//
//Multi reference info
- QValueList<CatalogInfo> catalogs;
+ TQValueList<CatalogInfo> catalogs;
- QString info;
+ TQString info;
};
@@ -54,9 +54,9 @@ public:
protected:
- virtual void read(QDataStream *s) = 0;
- virtual void write(QDataStream *s) = 0;
- QByteArray mydata;
+ virtual void read(TQDataStream *s) = 0;
+ virtual void write(TQDataStream *s) = 0;
+ TQByteArray mydata;
bool empty;
};
@@ -65,17 +65,17 @@ class DBItemMainKey : public DBItem
{
public:
DBItemMainKey();
- DBItemMainKey(QString searchstring);
+ DBItemMainKey(TQString searchstring);
- QString getString(){ return sstr;}
+ TQString getString(){ return sstr;}
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
- QString sstr;
+ TQString sstr;
};
@@ -84,21 +84,21 @@ class DBItemMainData : public DBItem
{
public:
- typedef QMapIterator<QString,QValueList<unsigned int> > TranslationIterator;
- typedef QMap<QString,QValueList<unsigned int> > TranslationMap;
+ typedef TQMapIterator<TQString,TQValueList<unsigned int> > TranslationIterator;
+ typedef TQMap<TQString,TQValueList<unsigned int> > TranslationMap;
DBItemMainData();
- QStringList getTranslations();
- QValueList<unsigned int> getReferences(QString str);
+ TQStringList getTranslations();
+ TQValueList<unsigned int> getReferences(TQString str);
void clear();
//Add a translation with reference ref, if translation exists append
// ref to the list of references
- void addTranslation(QString str,unsigned int ref);
- void removeTranslation(QString str,unsigned int ref);
+ void addTranslation(TQString str,unsigned int ref);
+ void removeTranslation(TQString str,unsigned int ref);
//remove any reference to ref, if ref is the only reference of a translation
// the translation is removed
@@ -109,8 +109,8 @@ class DBItemMainData : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
unsigned int indexnumber;
TranslationMap translations;
@@ -121,7 +121,7 @@ private:
class DBItemMultiIndex : public DBItem
{
public:
- typedef QValueList<unsigned int> IndexList;
+ typedef TQValueList<unsigned int> IndexList;
DBItemMultiIndex();
// DBItemMultiIndex(IndexList l);
@@ -134,8 +134,8 @@ class DBItemMultiIndex : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
IndexList list;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
index b19b2db2..7c2d8564 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
@@ -18,8 +18,8 @@
*/
#include "dbscan.h"
#include <kconfig.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -69,9 +69,9 @@ void MessagesSource::getDialogValues(SourceDialog *sd)
type=sd->type->currentItem();
}
-QValueList<KURL> MessagesSource::urls()
+TQValueList<KURL> MessagesSource::urls()
{
- QValueList<KURL> urlList;
+ TQValueList<KURL> urlList;
if(type==0)
urlList.append(location);
if(type==1|| type==2)
@@ -81,18 +81,18 @@ QValueList<KURL> MessagesSource::urls()
}
-QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
+TQValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
{
- QValueList<KURL> result;
- QDir d(url.path());
+ TQValueList<KURL> result;
+ TQDir d(url.path());
d.setMatchAllDirs(true);
kdDebug(0) << d.count() << " files in dir "<< url.path()<<endl;
const QFileInfoList* files = d.entryInfoList();
kdDebug(0) << files << endl;
- // QPtrListIterator<QFileInfo> it(*files);
+ // TQPtrListIterator<TQFileInfo> it(*files);
if(files){
- for (QPtrListIterator<QFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
+ for (TQPtrListIterator<TQFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
{
if ((*fileit)->isDir())
{
@@ -120,14 +120,14 @@ QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
//FIXME: clean this class
PoScanner::PoScanner(DataBaseInterface *dbi,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
di=dbi;
removeOldCatalogTranslation=true;
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
//Only one progress bar!!
@@ -138,18 +138,18 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{
emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -188,7 +188,7 @@ if(pb){called=false;count=0;}
return true;
}
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
KURL u(fileName);
return scanURL(u);
@@ -202,10 +202,10 @@ emit fileStarted();
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString pretty=u.prettyURL();
-QString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
+TQString pretty=u.prettyURL();
+TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -220,10 +220,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("");
+else author=TQString("");
//int catnum=dm->catalogRef(location,author,fileName);
InputInfo ii;
@@ -253,7 +253,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
msgstr=catalog->msgstr(i).first();
res=di->addEntry(msgid,msgstr,&ii);
@@ -264,7 +264,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
index 990d556c..e4cdf7da 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
@@ -48,10 +48,10 @@ class MessagesSource
* It returns a list of urls to scan, the list contains single file if type is "SingleFile"
* or a list of files if type is "SingleDir" or "RecDir"
*/
- QValueList<KURL> urls();
+ TQValueList<KURL> urls();
private:
- QValueList<KURL> filesInDir(KURL url,bool recursive);
+ TQValueList<KURL> filesInDir(KURL url,bool recursive);
KURL location;
// The source type "SingleFile" =0, "SingleDirectory"=1, "RecursiveDirectory"=2
@@ -63,9 +63,9 @@ class MessagesSource
SearchFilter filter;
- QString projectName;
- QString projectKeywords;
- QString status;
+ TQString projectName;
+ TQString projectKeywords;
+ TQString status;
};
@@ -75,12 +75,12 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseInterface *dbi,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseInterface *dbi,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a single URL file.
@@ -91,7 +91,7 @@ class PoScanner : public QObject
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -105,7 +105,7 @@ class PoScanner : public QObject
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
index 9c286052..55f6a16f 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
@@ -22,7 +22,7 @@ KInstance *DbSe2Factory::s_instance = 0;
KAboutData *DbSe2Factory::s_about = 0;
-DbSe2Factory::DbSe2Factory( QObject *parent, const char *name)
+DbSe2Factory::DbSe2Factory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -43,10 +43,10 @@ DbSe2Factory::~DbSe2Factory()
}
-QObject *DbSe2Factory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSe2Factory::createObject( TQObject *parent, const char *name,
+ const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
index 4285d53c..2b70184a 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
@@ -9,12 +9,12 @@ class DbSe2Factory : public KLibFactory
{
Q_OBJECT
public:
- DbSe2Factory( QObject *parent=0, const char *name=0);
+ DbSe2Factory( TQObject *parent=0, const char *name=0);
~DbSe2Factory();
- 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();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
index 7634a799..76aef878 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
@@ -1,13 +1,13 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include <knuminput.h>
@@ -15,11 +15,11 @@
#include "dbse2.h"
#include "preferenceswidget.h"
-KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
+KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE Database Search Engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE Database Search Engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePrefWidget(this);
@@ -30,7 +30,7 @@ KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
standard();
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -52,7 +52,7 @@ emit restoreNow();
void KDB2PreferencesWidget::standard()
{
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
index 4714fd13..1f706902 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
@@ -9,7 +9,7 @@ class KDB2PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- KDB2PreferencesWidget(QWidget *parent=0, const char* name=0);
+ KDB2PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~KDB2PreferencesWidget();
virtual void apply();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
index 1448e2b0..c8d8c1db 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PaFactory::s_instance = 0;
KAboutData *PaFactory::s_about = 0;
-PaFactory::PaFactory( QObject *parent, const char *name)
+PaFactory::PaFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PaFactory::~PaFactory()
}
-QObject *PaFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PaFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
index 8871a538..901351c7 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
@@ -43,12 +43,12 @@ class PaFactory : public KLibFactory
{
Q_OBJECT
public:
- PaFactory( QObject *parent=0, const char *name=0);
+ PaFactory( TQObject *parent=0, const char *name=0);
~PaFactory();
- 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();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
index 373f123d..eae86d65 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
@@ -37,9 +37,9 @@
#include <kglobal.h>
#include <kinstance.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
#include "poauxiliary.h"
#include "preferenceswidget.h"
@@ -50,7 +50,7 @@
using namespace KBabel;
-PoAuxiliary::PoAuxiliary(QObject *parent, const char *name)
+PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
catalog = new Catalog(this, "PoAuxiliary::catalog");
@@ -63,8 +63,8 @@ PoAuxiliary::PoAuxiliary(QObject *parent, const char *name)
ignoreFuzzy=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(loadAuxiliary()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(loadAuxiliary()));
msgidDict.setAutoDelete(true);
}
@@ -101,7 +101,7 @@ void PoAuxiliary::readSettings(KConfigBase *config)
{
bool needLoading=false;
- QString newPath = config->readEntry("Auxiliary"
+ TQString newPath = config->readEntry("Auxiliary"
,"../../../de/messages/@DIR1@/@PACKAGE@.po");
if(!initialized)
{
@@ -124,12 +124,12 @@ void PoAuxiliary::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *PoAuxiliary::preferencesWidget(QWidget *parent)
+PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent)
{
prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget");
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -142,24 +142,24 @@ const KAboutData *PoAuxiliary::about() const
}
-QString PoAuxiliary::name() const
+TQString PoAuxiliary::name() const
{
return i18n("PO Auxiliary");
}
-QString PoAuxiliary::id() const
+TQString PoAuxiliary::id() const
{
return "poauxiliary";
}
-QString PoAuxiliary::lastError()
+TQString PoAuxiliary::lastError()
{
return errorMsg;
}
-bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFilter*filter)
+bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFilter*filter)
{
- QString text(t);
+ TQString text(t);
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
applySettings();
@@ -192,10 +192,10 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil
if( !(entry->fuzzy && ignoreFuzzy) )
{
SearchResult *result = new SearchResult;
- result->requested =QStyleSheet::convertFromPlainText(text);
- result->found = QStyleSheet::convertFromPlainText(text);
+ result->requested =TQStyleSheet::convertFromPlainText(text);
+ result->found = TQStyleSheet::convertFromPlainText(text);
result->translation =
- QStyleSheet::convertFromPlainText(entry->translation);
+ TQStyleSheet::convertFromPlainText(entry->translation);
result->plainRequested = text;
result->plainFound=text;
@@ -231,7 +231,7 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil
}
-bool PoAuxiliary::startSearchInTranslation(const QString& text)
+bool PoAuxiliary::startSearchInTranslation(const TQString& text)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -263,10 +263,10 @@ bool PoAuxiliary::startSearchInTranslation(const QString& text)
if( !(entry->fuzzy && ignoreFuzzy) )
{
SearchResult *result = new SearchResult;
- result->requested =QStyleSheet::convertFromPlainText(entry->orig);
- result->found = QStyleSheet::convertFromPlainText(entry->orig);
+ result->requested =TQStyleSheet::convertFromPlainText(entry->orig);
+ result->found = TQStyleSheet::convertFromPlainText(entry->orig);
result->translation =
- QStyleSheet::convertFromPlainText(text);
+ TQStyleSheet::convertFromPlainText(text);
result->plainRequested = entry->orig;
result->plainFound=entry->orig;
@@ -317,7 +317,7 @@ void PoAuxiliary::applySettings()
if(isSearching())
stopSearch();
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -356,7 +356,7 @@ void PoAuxiliary::loadAuxiliary()
loading=true;
error=false;
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -370,14 +370,14 @@ void PoAuxiliary::loadAuxiliary()
}
if(path.contains("@PACKAGEDIR@"))
{
- QString packagedir;
+ TQString packagedir;
int pos=package.findRev("/");
if( pos > 0 ) packagedir=package.left(pos);
else packagedir="";
path.replace("@PACKAGEDIR@",packagedir);
kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl;
}
- QRegExp reg("@DIR[0-9]+@");
+ TQRegExp reg("@DIR[0-9]+@");
if(path.contains(reg))
{
int pos=reg.search(path);
@@ -385,14 +385,14 @@ void PoAuxiliary::loadAuxiliary()
while(pos>=0)
{
- QString num=path.mid(pos+4,len-5);
+ TQString num=path.mid(pos+4,len-5);
bool ok;
int number=num.toInt(&ok);
if(ok)
{
- QString dir=directory(editedFile,number);
- QString s("@DIR%1@");
+ TQString dir=directory(editedFile,number);
+ TQString s("@DIR%1@");
path.replace(s.arg(number),dir);
pos+=dir.length();
@@ -404,7 +404,7 @@ void PoAuxiliary::loadAuxiliary()
}
KURL u;
- QRegExp rel("^[a-zA-Z]+:");
+ TQRegExp rel("^[a-zA-Z]+:");
if(rel.search(path) >= 0)
{
u=path;
@@ -412,7 +412,7 @@ void PoAuxiliary::loadAuxiliary()
else if(path[0] != '/') // relative path
{
KURL temp(editedFile);
- QString dir = temp.directory();
+ TQString dir = temp.directory();
kdDebug(KBABEL_SEARCH) << dir << endl;
u.setPath(dir+"/"+path);
u.cleanPath();
@@ -424,8 +424,8 @@ void PoAuxiliary::loadAuxiliary()
}
emit progressStarts(i18n("Loading PO auxiliary"));
- connect(catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ connect(catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
ConversionStatus stat = catalog->openURL(u);
if( stat != OK && stat != RECOVERED_PARSE_ERROR)
@@ -476,8 +476,8 @@ void PoAuxiliary::loadAuxiliary()
auxTranslator = catalog->lastTranslator();
}
- disconnect(catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ disconnect(catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
emit progressEnds();
@@ -489,7 +489,7 @@ void PoAuxiliary::loadAuxiliary()
}
-void PoAuxiliary::setEditedFile(const QString& file)
+void PoAuxiliary::setEditedFile(const TQString& file)
{
if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url))
&& file!=editedFile && !loadTimer->isActive() )
@@ -501,7 +501,7 @@ void PoAuxiliary::setEditedFile(const QString& file)
}
-void PoAuxiliary::setEditedPackage(const QString& pack)
+void PoAuxiliary::setEditedPackage(const TQString& pack)
{
if(initialized && url.contains("@PACKAGE@") && pack!=package
&& !loadTimer->isActive() )
@@ -513,7 +513,7 @@ void PoAuxiliary::setEditedPackage(const QString& pack)
}
-void PoAuxiliary::setLanguageCode(const QString& lang)
+void PoAuxiliary::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -529,7 +529,7 @@ bool PoAuxiliary::usesRichTextResults()
return true;
}
-QString PoAuxiliary::translate(const QString& text, uint pluralForm)
+TQString PoAuxiliary::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -538,7 +538,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm)
if(error)
{
- return QString::null;
+ return TQString::null;
}
Entry *entry = msgidDict[text];
@@ -547,7 +547,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm)
return entry->translation;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
index 27fecba6..e0f4fe5d 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
@@ -36,8 +36,8 @@
#include "searchengine.h"
-#include <qguardedptr.h>
-#include <qdict.h>
+#include <tqguardedptr.h>
+#include <tqdict.h>
class QTimer;
namespace KBabel
@@ -52,40 +52,40 @@ class PoAuxiliary : public SearchEngine
Q_OBJECT
public:
- PoAuxiliary(QObject *parent=0, const char *name=0);
+ PoAuxiliary(TQObject *parent=0, const char *name=0);
virtual ~PoAuxiliary();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
virtual bool usesRichTextResults();
public slots:
- virtual bool startSearch(const QString& text, unsigned int pluralForm
+ virtual bool startSearch(const TQString& text, unsigned int pluralForm
, const SearchFilter*filter);
- virtual bool startSearchInTranslation(const QString& text);
+ virtual bool startSearchInTranslation(const TQString& text);
virtual void stopSearch();
- virtual void setEditedFile(const QString&);
- virtual void setEditedPackage(const QString&);
- virtual void setLanguageCode(const QString&);
+ virtual void setEditedFile(const TQString&);
+ virtual void setEditedPackage(const TQString&);
+ virtual void setLanguageCode(const TQString&);
protected slots:
@@ -98,39 +98,39 @@ protected slots:
void loadAuxiliary();
private:
- QGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
+ TQGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
KBabel::Catalog *catalog;
- QString auxPackage;
- QString auxTranslator;
- QString auxURL;
+ TQString auxPackage;
+ TQString auxTranslator;
+ TQString auxURL;
- QString url;
+ TQString url;
bool ignoreFuzzy;
- QString editedFile;
- QString package;
- QString langCode;
+ TQString editedFile;
+ TQString package;
+ TQString langCode;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool loading;
bool initialized;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
struct Entry
{
- QString orig;
- QString translation;
- QString comment;
+ TQString orig;
+ TQString translation;
+ TQString comment;
bool fuzzy;
};
- QDict<Entry> msgidDict;
- QDict<Entry> msgstrDict;
+ TQDict<Entry> msgidDict;
+ TQDict<Entry> msgstrDict;
};
#endif
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
index e8d48032..5a534ecf 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
@@ -30,12 +30,12 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -43,18 +43,18 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(QWidget *parent, const char* name)
+AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new PWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
}
AuxiliaryPreferencesWidget::~AuxiliaryPreferencesWidget()
@@ -78,13 +78,13 @@ void AuxiliaryPreferencesWidget::standard()
changed=true;
}
-void AuxiliaryPreferencesWidget::setURL(const QString url)
+void AuxiliaryPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
}
-QString AuxiliaryPreferencesWidget::url()
+TQString AuxiliaryPreferencesWidget::url()
{
changed = false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
index 45488158..3f0862b2 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
@@ -44,15 +44,15 @@ class AuxiliaryPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- AuxiliaryPreferencesWidget(QWidget *parent=0, const char* name=0);
+ AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~AuxiliaryPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
- QString url();
+ void setURL(const TQString url);
+ TQString url();
void setIgnoreFuzzy(bool);
bool ignoreFuzzy();
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
index d862b236..9eb816bd 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
@@ -42,8 +42,8 @@
using namespace KBabel;
-CompendiumData::CompendiumData(QObject *parent)
- : QObject(parent)
+CompendiumData::CompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -53,7 +53,7 @@ CompendiumData::CompendiumData(QObject *parent)
, _wordDict(9887)
, _textonlyDict(9887)
{
- _catalog = new Catalog(this, "CompendiumData::catalog", QString::null);
+ _catalog = new Catalog(this, "CompendiumData::catalog", TQString::null);
_exactDict.setAutoDelete(true);
_allDict.setAutoDelete(true);
_wordDict.setAutoDelete(true);
@@ -77,12 +77,12 @@ bool CompendiumData::load(KURL url)
emit progressStarts(i18n("Loading PO compendium"));
- connect(_catalog, SIGNAL(signalProgress(int)), this, SIGNAL(progress(int)));
+ connect(_catalog, TQT_SIGNAL(signalProgress(int)), this, TQT_SIGNAL(progress(int)));
ConversionStatus stat=_catalog->openURL(url);
- disconnect(_catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ disconnect(_catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
if( stat!= OK && stat != RECOVERED_PARSE_ERROR)
@@ -113,7 +113,7 @@ bool CompendiumData::load(KURL url)
}
// FIXME: shoudl care about plural forms
- QString temp = _catalog->msgid(i,true).first();
+ TQString temp = _catalog->msgid(i,true).first();
int *index = new int(i);
_exactDict.insert(temp,index);
@@ -125,25 +125,25 @@ bool CompendiumData::load(KURL url)
if(!temp.isEmpty() && temp.length() > 1)
{
// add to allDict
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(i);
// add to textonlyDict
- QString temp1 = temp;
+ TQString temp1 = temp;
temp1.remove( ' ' );
indexList=_textonlyDict[temp1];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_textonlyDict.insert(temp1,indexList);
kdDebug() << "Adding " << temp1 << endl;
}
@@ -151,8 +151,8 @@ bool CompendiumData::load(KURL url)
indexList->append(i);
// add to wordDict
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -161,7 +161,7 @@ bool CompendiumData::load(KURL url)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -173,7 +173,7 @@ bool CompendiumData::load(KURL url)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -198,34 +198,34 @@ bool CompendiumData::load(KURL url)
return true;
}
-const int* CompendiumData::exactDict(const QString text) const
+const int* CompendiumData::exactDict(const TQString text) const
{
return _exactDict[text];
}
-const QValueList<int>* CompendiumData::allDict(const QString text) const
+const TQValueList<int>* CompendiumData::allDict(const TQString text) const
{
return _allDict[text];
}
-const QValueList<int>* CompendiumData::wordDict(const QString text) const
+const TQValueList<int>* CompendiumData::wordDict(const TQString text) const
{
return _wordDict[text];
}
-const QValueList<int>* CompendiumData::textonlyDict(const QString text) const
+const TQValueList<int>* CompendiumData::textonlyDict(const TQString text) const
{
return _textonlyDict[text];
}
-void CompendiumData::registerObject(QObject *obj)
+void CompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool CompendiumData::unregisterObject(QObject *obj)
+bool CompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -237,9 +237,9 @@ bool CompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString CompendiumData::simplify(const QString string)
+TQString CompendiumData::simplify(const TQString string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -251,11 +251,11 @@ QString CompendiumData::simplify(const QString string)
return result;
}
-QStringList CompendiumData::wordList(const QString string)
+TQStringList CompendiumData::wordList(const TQString string)
{
- QString result=CompendiumData::simplify(string);
+ TQString result=CompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "compendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
index 2fec45cb..d5668b4a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
@@ -35,11 +35,11 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
namespace KBabel
{
@@ -51,38 +51,38 @@ class CompendiumData : public QObject
Q_OBJECT
public:
- CompendiumData(QObject *parent=0);
+ CompendiumData(TQObject *parent=0);
bool load(KURL url);
const KBabel::Catalog *catalog() const { return _catalog; }
- const int *exactDict(const QString text) const;
- const QValueList<int> *allDict(const QString text) const;
- const QValueList<int> *wordDict(const QString text) const;
- const QValueList<int> *textonlyDict(const QString text) const;
+ const int *exactDict(const TQString text) const;
+ const TQValueList<int> *allDict(const TQString text) const;
+ const TQValueList<int> *wordDict(const TQString text) const;
+ const TQValueList<int> *textonlyDict(const TQString text) const;
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString text);
- static QStringList wordList(const QString text);
+ static TQString simplify(const TQString text);
+ static TQStringList wordList(const TQString text);
signals:
- void progressStarts(const QString);
+ void progressStarts(const TQString);
void progressEnds();
void progress(int);
@@ -91,15 +91,15 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
KBabel::Catalog *_catalog;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
- QDict< QValueList<int> > _textonlyDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
+ TQDict< TQValueList<int> > _textonlyDict;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
index 882cc064..37ae63a4 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
index d52fadfe..1b0b8820 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
@@ -43,12 +43,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- 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();
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
index 0cd79fb3..5220f88a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
@@ -41,9 +41,9 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "resources.h"
#include "compendiumdata.h"
@@ -60,10 +60,10 @@
using namespace KBabel;
-static KStaticDeleter< QDict<CompendiumData> > compDataDeleter;
-QDict<CompendiumData> *PoCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<CompendiumData> > compDataDeleter;
+TQDict<CompendiumData> *PoCompendium::_compDict = 0;
-PoCompendium::PoCompendium(QObject *parent, const char *name)
+PoCompendium::PoCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -87,8 +87,8 @@ PoCompendium::PoCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
PoCompendium::~PoCompendium()
@@ -145,7 +145,7 @@ void PoCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -160,13 +160,13 @@ void PoCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *PoCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *PoCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new CompendiumPreferencesWidget(parent,"pocompendium_prefwidget");
kdDebug(KBABEL_SEARCH) << "PreferencesWidget is " << prefWidget << endl;
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -179,22 +179,22 @@ const KAboutData *PoCompendium::about() const
}
-QString PoCompendium::name() const
+TQString PoCompendium::name() const
{
return i18n("PO Compendium");
}
-QString PoCompendium::id() const
+TQString PoCompendium::id() const
{
return "pocompendium";
}
-QString PoCompendium::lastError()
+TQString PoCompendium::lastError()
{
return errorMsg;
}
-bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchExact(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
const int *index = data->exactDict(text);
if(index)
@@ -222,14 +222,14 @@ bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<Se
}
-bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
+ TQString searchStr = text.lower();
- const QValueList<int> *indexList = data->allDict(text.lower());
+ const TQValueList<int> *indexList = data->allDict(text.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -243,7 +243,7 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -276,16 +276,16 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
return false;
}
-bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
- QString t = text;
+ TQString searchStr = text.lower();
+ TQString t = text;
t.remove( " " );
- const QValueList<int> *indexList = data->textonlyDict(t.lower());
+ const TQValueList<int> *indexList = data->textonlyDict(t.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -299,7 +299,7 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -325,22 +325,22 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
return false;
}
-bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QStringList wList = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = CompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
break;
- const QValueList<int> *indexList = data->wordDict((*wit).lower());
+ const TQValueList<int> *indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -371,7 +371,7 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -389,8 +389,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -421,8 +421,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -430,8 +430,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -440,13 +440,13 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -483,15 +483,15 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -539,7 +539,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -564,8 +564,8 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -575,19 +575,19 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -632,7 +632,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter* filter)
+bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -669,13 +669,13 @@ bool PoCompendium::startSearch(const QString& text, uint pluralForm, const Searc
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
searchExact(text, pluralForm, results, foundIndices, checkedIndices);
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -738,7 +738,7 @@ void PoCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -795,7 +795,7 @@ void PoCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -828,7 +828,7 @@ void PoCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -847,7 +847,7 @@ void PoCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -864,7 +864,7 @@ void PoCompendium::recheckData()
loading=false;
}
-QString PoCompendium::maskString(QString s)
+TQString PoCompendium::maskString(TQString s)
{
s.replace("\\","\\\\");
s.replace("\?","\\?");
@@ -883,7 +883,7 @@ QString PoCompendium::maskString(QString s)
return s;
}
-void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
+void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res)
{
if(res.last() && res.last()->score >= result->score)
{
@@ -915,7 +915,7 @@ void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
}
-void PoCompendium::setLanguageCode(const QString& lang)
+void PoCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -926,7 +926,7 @@ void PoCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString PoCompendium::translate(const QString& text, uint pluralForm)
+TQString PoCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -938,7 +938,7 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -950,10 +950,10 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
return data->catalog()->msgstr(*index).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const uint pluralForm)
+TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const uint pluralForm)
{
if(!initialized)
{
@@ -965,7 +965,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -976,7 +976,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
int best_match = 0;
int total = data->catalog()->numberOfEntries();
- QString searchStr = CompendiumData::simplify(text);
+ TQString searchStr = CompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -1004,7 +1004,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
}
// get a message from the catalog FIXME: plurals
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -1029,11 +1029,11 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
return data->catalog()->msgstr(best_matching).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint pluralForm)
+TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const uint pluralForm)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -1041,7 +1041,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
if(isSearching())
- return QString::null;
+ return TQString::null;
clearResults();
stop = false;
@@ -1058,21 +1058,21 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
if(error || !data)
{
active = false;
- return QString::null;
+ return TQString::null;
}
if(data->active())
{
active = false;
- return QString::null;
+ return TQString::null;
}
emit started();
- QPtrList<SearchResult> res;
+ TQPtrList<SearchResult> res;
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
if( searchExact(text, pluralForm, res, foundIndices, checkedIndices) )
@@ -1086,7 +1086,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
return res.first()->translation;
}
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -1107,7 +1107,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
// search without whitespace
- QString s = searchStr;
+ TQString s = searchStr;
s.remove( ' ' );
if( searchTextOnly(s, pluralForm, res, foundIndices, checkedIndices) )
{
@@ -1145,7 +1145,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
sc = 0;
- return QString::null;
+ return TQString::null;
}
@@ -1153,14 +1153,14 @@ void PoCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -1171,7 +1171,7 @@ void PoCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -1195,22 +1195,22 @@ void PoCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(
- progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(
+ progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void PoCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("CompendiumData"))
{
const CompendiumData *d=static_cast<const CompendiumData*>(s);
if(d)
{
- QDictIterator<CompendiumData> it(*compendiumDict());
+ TQDictIterator<CompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -1230,11 +1230,11 @@ void PoCompendium::removeData()
}
}
-QDict<CompendiumData> *PoCompendium::compendiumDict()
+TQDict<CompendiumData> *PoCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<CompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<CompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
index 6d92fb58..d96774e9 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
@@ -39,10 +39,10 @@
#include "compendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
class CompendiumPreferencesWidget;
class KConfigBase;
@@ -53,35 +53,35 @@ class PoCompendium : public SearchEngine
Q_OBJECT
public:
- PoCompendium(QObject *parent=0, const char *name=0);
+ PoCompendium(TQObject *parent=0, const char *name=0);
virtual ~PoCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString&text, uint pluralForm);
- virtual QString searchTranslation(const QString&, int &score, const uint pluralForm);
- virtual QString fuzzyTranslation(const QString&, int &score, const uint pluralForm);
+ virtual TQString translate(const TQString&text, uint pluralForm);
+ virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString&, int &score, const uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
public slots:
- virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
+ virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -97,27 +97,27 @@ protected slots:
protected:
void loadCompendium();
- void addResult(SearchResult *, QPtrList<SearchResult>& allResults);
- QString maskString(QString string);
+ void addResult(SearchResult *, TQPtrList<SearchResult>& allResults);
+ TQString maskString(TQString string);
void registerData();
void unregisterData();
- bool searchExact(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchTextOnly(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchCaseInsensitive(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchWords(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchNGram(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
+ bool searchExact(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchTextOnly(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchCaseInsensitive(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchWords(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchNGram(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
private:
- QGuardedPtr<CompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<CompendiumPreferencesWidget> prefWidget;
CompendiumData *data;
KBabel::PoInfo catalogInfo;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool ignoreFuzzy;
@@ -133,15 +133,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<CompendiumData> *_compDict;
- static QDict<CompendiumData> *compendiumDict();
+ static TQDict<CompendiumData> *_compDict;
+ static TQDict<CompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
index c3ce730d..1f3a8b37 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
@@ -30,13 +30,13 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -44,72 +44,72 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-CompendiumPreferencesWidget::CompendiumPreferencesWidget(QWidget *parent, const char* name)
+CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new CompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->fuzzyBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->fuzzyBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example if you want to perform a case sensitive search, or if "
"you want fuzzy messages to be ignored.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
CompendiumPreferencesWidget::~CompendiumPreferencesWidget()
@@ -143,7 +143,7 @@ void CompendiumPreferencesWidget::standard()
changed=true;
}
-void CompendiumPreferencesWidget::setURL(const QString url)
+void CompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -200,7 +200,7 @@ void CompendiumPreferencesWidget::setMatchWords(bool on)
-QString CompendiumPreferencesWidget::url()
+TQString CompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
index db70df4d..3a22bc31 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
@@ -44,14 +44,14 @@ class CompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- CompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ CompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~CompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -61,7 +61,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
index a3dcfdf9..eaea5194 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.h b/kbabel/kbabeldict/modules/tmx/pc_factory.h
index 5ef08277..74739e0a 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.h
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.h
@@ -45,12 +45,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- 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();
diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
index 1202496d..85d38294 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
@@ -32,13 +32,13 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -46,68 +46,68 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(QWidget *parent, const char* name)
+TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new TmxCompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example, if you want to perform a case sensitive search.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
TmxCompendiumPreferencesWidget::~TmxCompendiumPreferencesWidget()
@@ -139,7 +139,7 @@ void TmxCompendiumPreferencesWidget::standard()
changed=true;
}
-void TmxCompendiumPreferencesWidget::setURL(const QString url)
+void TmxCompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -190,7 +190,7 @@ void TmxCompendiumPreferencesWidget::setMatchWords(bool on)
-QString TmxCompendiumPreferencesWidget::url()
+TQString TmxCompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
index c8356c3d..e2a4b900 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
@@ -46,14 +46,14 @@ class TmxCompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- TmxCompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ TmxCompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~TmxCompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -62,7 +62,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
index 152bc536..415992bf 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
@@ -41,8 +41,8 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "tmxcompendiumdata.h"
#include "tmxcompendium.h"
@@ -55,10 +55,10 @@
#define NGRAM_LEN 3
#define LIM_NGRAM 50
-static KStaticDeleter< QDict<TmxCompendiumData> > compDataDeleter;
-QDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<TmxCompendiumData> > compDataDeleter;
+TQDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
-TmxCompendium::TmxCompendium(QObject *parent, const char *name)
+TmxCompendium::TmxCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -81,8 +81,8 @@ TmxCompendium::TmxCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
TmxCompendium::~TmxCompendium()
@@ -137,7 +137,7 @@ void TmxCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -152,12 +152,12 @@ void TmxCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *TmxCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *TmxCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new TmxCompendiumPreferencesWidget(parent,"tmxcompendium_prefwidget");
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -170,23 +170,23 @@ const KAboutData *TmxCompendium::about() const
}
-QString TmxCompendium::name() const
+TQString TmxCompendium::name() const
{
return i18n("TMX Compendium");
}
-QString TmxCompendium::id() const
+TQString TmxCompendium::id() const
{
return "tmxcompendium";
}
-QString TmxCompendium::lastError()
+TQString TmxCompendium::lastError()
{
return errorMsg;
}
-bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter*)
+bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter*)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -223,8 +223,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
uint checkCounter=0;
const int *index = data->exactDict(text);
@@ -240,8 +240,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
results.append(result);
@@ -250,7 +250,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit resultFound(result);
}
- QString searchStr=TmxCompendiumData::simplify(text);
+ TQString searchStr=TmxCompendiumData::simplify(text);
if(!caseSensitive)
@@ -258,13 +258,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
searchStr = searchStr.lower();
}
- QString temp = searchStr;
+ TQString temp = searchStr;
temp = temp.lower();
- const QValueList<int> *indexList = data->allDict(temp);
+ const TQValueList<int> *indexList = data->allDict(temp);
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -272,7 +272,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
continue;
}
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -294,8 +294,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -303,8 +303,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
}
- QStringList wList = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = TmxCompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
@@ -313,7 +313,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -339,7 +339,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
kapp->processEvents(100);
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -357,8 +357,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -389,8 +389,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -398,8 +398,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -408,13 +408,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -436,8 +436,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -451,10 +451,10 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
(!wholeWords && (matchContains || matchIsContained || matchWords))
)
{
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -497,7 +497,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit progress( (100*(checkCounter+1))/data->numberOfEntries());
}
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -523,8 +523,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -533,19 +533,19 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -577,8 +577,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -629,7 +629,7 @@ void TmxCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -685,7 +685,7 @@ void TmxCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -718,7 +718,7 @@ void TmxCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -737,7 +737,7 @@ void TmxCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -746,7 +746,7 @@ void TmxCompendium::recheckData()
loading=false;
}
-QString TmxCompendium::maskString(QString s) const
+TQString TmxCompendium::maskString(TQString s) const
{
s.replace('\\',"\\\\");
s.replace('?',"\\?");
@@ -795,7 +795,7 @@ void TmxCompendium::addResult(SearchResult *result)
}
-void TmxCompendium::setLanguageCode(const QString& lang)
+void TmxCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -806,7 +806,7 @@ void TmxCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString TmxCompendium::translate(const QString& text, uint pluralForm)
+TQString TmxCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -818,7 +818,7 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -829,10 +829,10 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
return data->msgstr(*index);
}
- return QString::null;
+ return TQString::null;
}
-QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pluralForm)
+TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint pluralForm)
{
if(!initialized)
{
@@ -844,7 +844,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -855,7 +855,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
int best_match = 0;
int total = data->numberOfEntries();
- QString searchStr = TmxCompendiumData::simplify(text);
+ TQString searchStr = TmxCompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -883,7 +883,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
}
// get a message from the catalog
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -907,7 +907,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
return data->msgstr(best_matching);
}
- return QString::null;
+ return TQString::null;
}
@@ -915,14 +915,14 @@ void TmxCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -933,7 +933,7 @@ void TmxCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -957,21 +957,21 @@ void TmxCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void TmxCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("TmxCompendiumData"))
{
const TmxCompendiumData *d=static_cast<const TmxCompendiumData*>(s);
if(d)
{
- QDictIterator<TmxCompendiumData> it(*compendiumDict());
+ TQDictIterator<TmxCompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -991,11 +991,11 @@ void TmxCompendium::removeData()
}
}
-QDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
+TQDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<TmxCompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<TmxCompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
index 9a2f8fba..21270799 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
@@ -39,9 +39,9 @@
#include "tmxcompendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
class TmxCompendiumPreferencesWidget;
class KConfigBase;
@@ -52,34 +52,34 @@ class TmxCompendium : public SearchEngine
Q_OBJECT
public:
- TmxCompendium(QObject *parent=0, const char *name=0);
+ TmxCompendium(TQObject *parent=0, const char *name=0);
virtual ~TmxCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
- virtual QString fuzzyTranslation(const QString& text, int &score, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString& text, int &score, uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
public slots:
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -96,19 +96,19 @@ protected slots:
protected:
void loadCompendium();
void addResult(SearchResult *);
- QString maskString(QString string) const;
+ TQString maskString(TQString string) const;
void registerData();
void unregisterData();
private:
- QGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
TmxCompendiumData *data;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool wholeWords;
@@ -123,15 +123,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<TmxCompendiumData> *_compDict;
- static QDict<TmxCompendiumData> *compendiumDict();
+ static TQDict<TmxCompendiumData> *_compDict;
+ static TQDict<TmxCompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
index 3fa84aa4..7893e837 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
@@ -34,8 +34,8 @@
**************************************************************************** */
#include "tmxcompendiumdata.h"
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <tagextractor.h>
#include <resources.h>
@@ -47,8 +47,8 @@
using namespace KBabel;
-TmxCompendiumData::TmxCompendiumData(QObject *parent)
- : QObject(parent)
+TmxCompendiumData::TmxCompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -62,7 +62,7 @@ TmxCompendiumData::TmxCompendiumData(QObject *parent)
}
-bool TmxCompendiumData::load(const KURL& url, const QString& language)
+bool TmxCompendiumData::load(const KURL& url, const TQString& language)
{
kdDebug(KBABEL_SEARCH) << "Load " << url.url() << " in " << language << endl;
if(_active)
@@ -79,13 +79,13 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Loading TMX compendium"));
- QDomDocument doc( "mydocument" );
+ TQDomDocument doc( "mydocument" );
- QString target;
+ TQString target;
if( KIO::NetAccess::download( url, target ) )
{
- QFile f( target );
+ TQFile f( target );
if ( !f.open( IO_ReadOnly ) )
{
_error = true;
@@ -102,7 +102,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_errorMsg = i18n( "Cannot open the file." );
}
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
if( docElem.tagName() != "tmx" || !(docElem.hasAttribute("version")
&& docElem.attribute("version") == "1.4" ) )
@@ -131,7 +131,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Building indices"));
- QDomNodeList tuTags = docElem.elementsByTagName("tu");
+ TQDomNodeList tuTags = docElem.elementsByTagName("tu");
uint total = tuTags.count();
_originals.clear();
@@ -149,11 +149,11 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
kapp->processEvents(100);
}
- QDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
- QString english, other;
+ TQDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
+ TQString english, other;
for( uint j = 0 ; j < tuvTags.count() ; j++ )
{
- QDomElement el = tuvTags.item(j).toElement();
+ TQDomElement el = tuvTags.item(j).toElement();
if( el.attribute("xml:lang").upper() == "EN" ) english = el.text();
if( el.attribute("xml:lang").upper().startsWith(language.upper()) )
other = el.text();
@@ -165,7 +165,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_originals[lastindex] = english;
_translations[lastindex] = other;
- QString temp = english;
+ TQString temp = english;
int *index = new int(lastindex);
_exactDict.insert(temp,index);
@@ -175,18 +175,18 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!temp.isEmpty() && temp.length() > 1)
{
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(lastindex);
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -195,7 +195,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -210,7 +210,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -240,39 +240,39 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
return true;
}
-const int* TmxCompendiumData::exactDict(const QString& text) const
+const int* TmxCompendiumData::exactDict(const TQString& text) const
{
return _exactDict[text];
}
-const QValueList<int>* TmxCompendiumData::allDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::allDict(const TQString& text) const
{
return _allDict[text];
}
-const QValueList<int>* TmxCompendiumData::wordDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::wordDict(const TQString& text) const
{
return _wordDict[text];
}
-const QString TmxCompendiumData::msgid(const int index) const
+const TQString TmxCompendiumData::msgid(const int index) const
{
return _originals[index];
}
-const QString TmxCompendiumData::msgstr(const int index) const
+const TQString TmxCompendiumData::msgstr(const int index) const
{
return _translations[index];
}
-void TmxCompendiumData::registerObject(QObject *obj)
+void TmxCompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool TmxCompendiumData::unregisterObject(QObject *obj)
+bool TmxCompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -284,9 +284,9 @@ bool TmxCompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString TmxCompendiumData::simplify(const QString& string)
+TQString TmxCompendiumData::simplify(const TQString& string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -298,11 +298,11 @@ QString TmxCompendiumData::simplify(const QString& string)
return result;
}
-QStringList TmxCompendiumData::wordList(const QString& string)
+TQStringList TmxCompendiumData::wordList(const TQString& string)
{
- QString result=TmxCompendiumData::simplify(string);
+ TQString result=TmxCompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "tmxcompendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
index bc88a92e..ce2692a1 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
@@ -37,52 +37,52 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqptrlist.h>
class TmxCompendiumData : public QObject
{
Q_OBJECT
public:
- TmxCompendiumData(QObject *parent=0);
+ TmxCompendiumData(TQObject *parent=0);
- bool load(const KURL& url, const QString& language);
+ bool load(const KURL& url, const TQString& language);
- const int *exactDict(const QString& text) const;
- const QValueList<int> *allDict(const QString& text) const;
- const QValueList<int> *wordDict(const QString& text) const;
+ const int *exactDict(const TQString& text) const;
+ const TQValueList<int> *allDict(const TQString& text) const;
+ const TQValueList<int> *wordDict(const TQString& text) const;
- const QString msgid(const int index) const;
- const QString msgstr(const int index) const;
+ const TQString msgid(const int index) const;
+ const TQString msgstr(const int index) const;
const int numberOfEntries() const { return _exactDict.count(); }
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString& text);
- static QStringList wordList(const QString& text);
+ static TQString simplify(const TQString& text);
+ static TQStringList wordList(const TQString& text);
signals:
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
void progress(int);
@@ -91,16 +91,16 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
- QValueVector<QString> _originals;
- QValueVector<QString> _translations;
+ TQValueVector<TQString> _originals;
+ TQValueVector<TQString> _translations;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif
diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp
index 95ab5694..19112fe7 100644
--- a/kbabel/kbabeldict/searchengine.cpp
+++ b/kbabel/kbabeldict/searchengine.cpp
@@ -53,7 +53,7 @@ SearchResult::SearchResult(const SearchResult& r)
descriptions.setAutoDelete(true);
score=r.score;
- QPtrListIterator<TranslationInfo> it(r.descriptions);
+ TQPtrListIterator<TranslationInfo> it(r.descriptions);
for ( ; it.current(); ++it )
{
TranslationInfo *ti=new TranslationInfo(*(*it));
@@ -62,8 +62,8 @@ SearchResult::SearchResult(const SearchResult& r)
}
-PrefWidget::PrefWidget(QWidget *parent, const char *name)
- : QWidget(parent,name)
+PrefWidget::PrefWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
}
@@ -72,8 +72,8 @@ PrefWidget::~PrefWidget()
}
-SearchEngine::SearchEngine(QObject *parent, const char *name)
- : QObject(parent, name)
+SearchEngine::SearchEngine(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
autoUpdate=false;
results.setAutoDelete(true);
@@ -83,7 +83,7 @@ SearchEngine::~SearchEngine()
{
}
-bool SearchEngine::startSearchInTranslation(const QString&, unsigned int, const SearchFilter*)
+bool SearchEngine::startSearchInTranslation(const TQString&, unsigned int, const SearchFilter*)
{
return true;
}
@@ -175,34 +175,34 @@ void SearchEngine::clearResults()
-void SearchEngine::setEditedFile(const QString&)
+void SearchEngine::setEditedFile(const TQString&)
{
}
-void SearchEngine::setEditedPackage(const QString&)
+void SearchEngine::setEditedPackage(const TQString&)
{
}
-void SearchEngine::setLanguageCode(const QString&)
+void SearchEngine::setLanguageCode(const TQString&)
{
}
-void SearchEngine::setLanguage(const QString&,const QString&)
+void SearchEngine::setLanguage(const TQString&,const TQString&)
{
}
-void SearchEngine::stringChanged(const QStringList&,const QString&,unsigned int, const QString&)
+void SearchEngine::stringChanged(const TQStringList&,const TQString&,unsigned int, const TQString&)
{
}
-QString SearchEngine::directory(const QString& path, int n)
+TQString SearchEngine::directory(const TQString& path, int n)
{
if(n<0)
- return QString::null;
+ return TQString::null;
int begin=path.findRev('/');
int end=path.length();
@@ -213,14 +213,14 @@ QString SearchEngine::directory(const QString& path, int n)
if(n==0)
return path;
else
- return QString::null;
+ return TQString::null;
}
for(int i=0; i < n; i++)
{
if(begin==0)
{
- return QString::null;
+ return TQString::null;
}
end = begin;
@@ -228,7 +228,7 @@ QString SearchEngine::directory(const QString& path, int n)
if(begin < 0)
{
- return QString::null;
+ return TQString::null;
}
}
@@ -237,7 +237,7 @@ QString SearchEngine::directory(const QString& path, int n)
}
-uint SearchEngine::score(const QString& orig, const QString& found)
+uint SearchEngine::score(const TQString& orig, const TQString& found)
{
if(orig == found)
return 100;
@@ -246,8 +246,8 @@ uint SearchEngine::score(const QString& orig, const QString& found)
uint scoreB = ngramMatch(orig,found);
uint score = QMIN(scoreA, scoreB);
- QString f = found.lower();
- QString o = orig.lower();
+ TQString f = found.lower();
+ TQString o = orig.lower();
scoreA = ngramMatch(f, o);
scoreB = ngramMatch(o, f);
@@ -256,7 +256,7 @@ uint SearchEngine::score(const QString& orig, const QString& found)
return score;
}
-uint SearchEngine::ngramMatch (const QString& text1, const QString& text2,
+uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_len)
{
if (text1.length() < ngram_len || text2.length() < ngram_len)
diff --git a/kbabel/kbabeldict/searchengine.h b/kbabel/kbabeldict/searchengine.h
index db722362..a10e6193 100644
--- a/kbabel/kbabeldict/searchengine.h
+++ b/kbabel/kbabeldict/searchengine.h
@@ -34,11 +34,11 @@
#ifndef SEARCH_ENGINE_H
#define SEARCH_ENGINE_H
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kconfigbase.h>
@@ -55,50 +55,50 @@ public:
* Information about the location, where this entry was found.
* For example the PO-file it was found in, etc.
* */
- QString location;
+ TQString location;
/**
* The complete path of the file, where this entry was found
*/
- QString filePath;
+ TQString filePath;
/** The date of the last change */
- QDateTime lastChange;
+ TQDateTime lastChange;
/** The language, the translation belongs to */
- QString languageCode;
+ TQString languageCode;
/**
* The translator of this string
* For example the translator found in the header of the PO-file.
*/
- QString translator;
+ TQString translator;
/**
* The name of a project this translation is a part of.
*/
- QString projectName;
+ TQString projectName;
/**
* Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch)
*/
- QStringList projectKeywords;
+ TQStringList projectKeywords;
/**
* Part/context in a project, for example "multimedia", "admin", etc.
*/
- QString projectContext;
+ TQString projectContext;
/**
* Status of the translation, for example "approved", "spellchecked", "unknown"
*/
- QString status;
+ TQString status;
/**
* Additional information to be presented to the user, for example a comment
*/
- QString description;
+ TQString description;
};
@@ -114,16 +114,16 @@ public:
SearchResult(const SearchResult&);
/** The requested string to search for */
- QString requested;
+ TQString requested;
/** The string that, was found (a list if it is a plural form) */
- QStringList found;
+ TQStringList found;
/** The number of a plural form to search for */
uint requestedPluralForm;
/** The translation of the found string */
- QString translation;
+ TQString translation;
/** The number of a plural form of the translated string found */
uint translationPluralForm;
@@ -133,21 +133,21 @@ public:
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainTranslation;
+ TQString plainTranslation;
/**
* This string contains the plain string, that was found, if you are
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainFound;
+ TQString plainFound;
/**
* This string contains the plain requested string if you are
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainRequested;
+ TQString plainRequested;
/**
* Constains a score for the found translation. 0 means exact matching.
@@ -156,7 +156,7 @@ public:
*/
int score;
- QPtrList<TranslationInfo> descriptions;
+ TQPtrList<TranslationInfo> descriptions;
};
/**
@@ -167,9 +167,9 @@ class KDE_EXPORT SearchFilter
public:
SearchFilter() :
_projects()
- , _location( QString::null )
- , _languageCode( QString::null )
- , _origLanguageCode( QString::null )
+ , _location( TQString::null )
+ , _languageCode( TQString::null )
+ , _origLanguageCode( TQString::null )
, _translators()
, _projectKeywords()
, _projectContexts()
@@ -178,45 +178,45 @@ public:
virtual ~SearchFilter() {}
- void setProjectName( const QString& project ) { _projects = project; }
- void setProjectName( const QStringList& projects ) { _projects = projects; }
+ void setProjectName( const TQString& project ) { _projects = project; }
+ void setProjectName( const TQStringList& projects ) { _projects = projects; }
/**
* Information about the location, where this entry was found.
* For example the PO-file it was found in, etc.
* */
- void setLocation( const QString& location) { _location = location; }
- QString location() const { return _location; }
+ void setLocation( const TQString& location) { _location = location; }
+ TQString location() const { return _location; }
/** The original language, the translation was made from */
- void setOriginalLanguage( const QString& languageCode) { _origLanguageCode = languageCode; }
+ void setOriginalLanguage( const TQString& languageCode) { _origLanguageCode = languageCode; }
/** The language, the translation belongs to */
- void setTranslationLanguage( const QString& languageCode) { _languageCode = languageCode; }
+ void setTranslationLanguage( const TQString& languageCode) { _languageCode = languageCode; }
/**
* The translator of this string
* For example the translator found in the header of the PO-file.
*/
- void setTranslator( const QString& translator) { _translators = translator ; }
- void setTranslator( const QStringList& translators) { _translators = translators ; }
+ void setTranslator( const TQString& translator) { _translators = translator ; }
+ void setTranslator( const TQStringList& translators) { _translators = translators ; }
/**
* Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch)
*/
- void setProjectKeywords( const QStringList& projectKeywords ) { _projectKeywords = projectKeywords; }
+ void setProjectKeywords( const TQStringList& projectKeywords ) { _projectKeywords = projectKeywords; }
/**
* Part/context in a project, for example "multimedia", "admin", etc.
*/
- void setProjectContext( const QString& projectContext) { _projectContexts = projectContext; }
- void setProjectContext( const QStringList& projectContexts) { _projectContexts = projectContexts; }
+ void setProjectContext( const TQString& projectContext) { _projectContexts = projectContext; }
+ void setProjectContext( const TQStringList& projectContexts) { _projectContexts = projectContexts; }
/**
* Status of the translation, for example "approved", "spellchecked", "unknown"
*/
- void setStatus( const QString& translationStatus) { _translationStatus = translationStatus; }
- void setStatus( const QStringList& translationStati) { _translationStatus = translationStati; }
+ void setStatus( const TQString& translationStatus) { _translationStatus = translationStatus; }
+ void setStatus( const TQStringList& translationStati) { _translationStatus = translationStati; }
/**
* The key method of the class - check, if the argument
@@ -225,14 +225,14 @@ public:
virtual bool match( const TranslationInfo& toCheck );
private:
- QStringList _projects;
- QString _location;
- QString _languageCode;
- QString _origLanguageCode;
- QStringList _translators;
- QStringList _projectKeywords ;
- QStringList _projectContexts;
- QStringList _translationStatus;
+ TQStringList _projects;
+ TQString _location;
+ TQString _languageCode;
+ TQString _origLanguageCode;
+ TQStringList _translators;
+ TQStringList _projectKeywords ;
+ TQStringList _projectContexts;
+ TQStringList _translationStatus;
};
/**
@@ -246,7 +246,7 @@ class KDE_EXPORT PrefWidget : public QWidget
Q_OBJECT
public:
- PrefWidget(QWidget *parent, const char* name=0);
+ PrefWidget(TQWidget *parent, const char* name=0);
virtual ~PrefWidget();
public slots:
@@ -270,7 +270,7 @@ class KDE_EXPORT SearchEngine : public QObject
Q_OBJECT
public:
- SearchEngine(QObject *parent=0, const char *name=0);
+ SearchEngine(TQObject *parent=0, const char *name=0);
virtual ~SearchEngine();
@@ -297,26 +297,26 @@ public:
* @returns the exact translation of text or a empty string
* if no exact match was found.
*/
- virtual QString translate(const QString& text, const uint pluralForm = 0)=0;
+ virtual TQString translate(const TQString& text, const uint pluralForm = 0)=0;
/**
* @returns the translation of text according to the plugin settings or a empty string
* if no match was found.
*/
- virtual QString searchTranslation(const QString&, int &score, const uint pluralForm = 0) {
+ virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm = 0) {
Q_UNUSED(pluralForm);
- score = 0; return QString::null;
+ score = 0; return TQString::null;
}
/**
* @returns a fuzzy translation of text or a empty string
* if no good match was found.
*/
- virtual QString fuzzyTranslation(const QString& /*text*/, int &score, const uint pluralForm = 0) {
+ virtual TQString fuzzyTranslation(const TQString& /*text*/, int &score, const uint pluralForm = 0) {
Q_UNUSED(pluralForm);
- score = 0; return QString::null; };
+ score = 0; return TQString::null; };
/**
@@ -329,7 +329,7 @@ public:
* @return true, if successfull
*/
virtual bool messagesForFilter(const SearchFilter* filter
- , QValueList<SearchResult>& resultList, QString& error)
+ , TQValueList<SearchResult>& resultList, TQString& error)
{
Q_UNUSED(filter);
Q_UNUSED(resultList);
@@ -354,19 +354,19 @@ public:
* a tabbed widget.
* @param parent the parent of the returned widget
*/
- virtual PrefWidget* preferencesWidget(QWidget *parent)=0;
+ virtual PrefWidget* preferencesWidget(TQWidget *parent)=0;
/** @returns information about this SearchEngine */
virtual const KAboutData *about() const= 0;
/** @returns the i18n name of this search engine */
- virtual QString name() const= 0;
+ virtual TQString name() const= 0;
/** @returns a untranslated name of this engine */
- virtual QString id() const= 0;
+ virtual TQString id() const= 0;
/** @returns the last error message */
- virtual QString lastError() = 0;
+ virtual TQString lastError() = 0;
/**
@@ -382,7 +382,7 @@ public:
* a number between 0 and 100. @param ngram_len should be
* a value between 3 and 5.
*/
- static uint ngramMatch (const QString& text1, const QString& text2,
+ static uint ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_len=3);
public slots:
@@ -391,14 +391,14 @@ public slots:
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0;
+ virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0;
/**
* starts a search for string s in the translated text
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- virtual bool startSearchInTranslation(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
+ virtual bool startSearchInTranslation(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
/** stops a search */
@@ -425,22 +425,22 @@ public slots:
* on the edited file. The default implementation does nothing.
* @param file The edited file with path
*/
- virtual void setEditedFile(const QString& file);
+ virtual void setEditedFile(const TQString& file);
/**
* This method allows a search engine to use different settings depending
* on the edited package. The default implementation does nothing.
* @param package The name of the package, that is currently translated.
*/
- virtual void setEditedPackage(const QString& package);
+ virtual void setEditedPackage(const TQString& package);
/**
* This method allows a search engine to use different settings depending
* on the language code. The default implementation does nothing.
* @param lang The current language code (e.g. de).
*/
- virtual void setLanguageCode(const QString& lang);
- virtual void setLanguage(const QString& languageCode, const QString& languageName);
+ virtual void setLanguageCode(const TQString& lang);
+ virtual void setLanguage(const TQString& languageCode, const TQString& languageName);
@@ -453,8 +453,8 @@ public slots:
* @param pluralForm the number of the plural form of the translation
* @param description the additional description, e.g., a PO comment
*/
- virtual void stringChanged( const QStringList& orig, const QString& translated
- , const uint translationPluralForm, const QString& description);
+ virtual void stringChanged( const TQStringList& orig, const TQString& translated
+ , const uint translationPluralForm, const TQString& description);
/**
* If the database is editable this slot should open an dialog to let
@@ -470,13 +470,13 @@ public slots:
* returns "foobar", while n=1 would return "src"
* FIXME: isn't it a code duplication?
*/
- static QString directory(const QString& path, int n);
+ static TQString directory(const TQString& path, int n);
/**
* computes a score to assess the match of the two strings:
* 0 means exact match, bigger means worse
*/
- static uint score(const QString& orig, const QString& found);
+ static uint score(const TQString& orig, const TQString& found);
signals:
/** signals, that a new search started */
@@ -493,7 +493,7 @@ signals:
* progressbar or if you do something else then searching,
* maybe loading a big file
*/
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
@@ -523,10 +523,10 @@ signals:
* signals, that an error occured, for example, that you wasn't
* able to open a database.
*/
- void hasError(const QString& error);
+ void hasError(const TQString& error);
protected:
- QPtrList<SearchResult> results;
+ TQPtrList<SearchResult> results;
bool autoUpdate;
};