diff options
Diffstat (limited to 'kbabel/kbabel/kbabelview.cpp')
-rw-r--r-- | kbabel/kbabel/kbabelview.cpp | 560 |
1 files changed, 280 insertions, 280 deletions
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" |