summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabel/kbabelview2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabel/kbabelview2.cpp')
-rw-r--r--kbabel/kbabel/kbabelview2.cpp126
1 files changed, 63 insertions, 63 deletions
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;