diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbabel/kbabeldict/kbabeldictbox.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/kbabeldict/kbabeldictbox.cpp')
-rw-r--r-- | kbabel/kbabeldict/kbabeldictbox.cpp | 386 |
1 files changed, 193 insertions, 193 deletions
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? |