summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/kbabeldictbox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kbabel/kbabeldict/kbabeldictbox.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/kbabeldict/kbabeldictbox.cpp')
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kbabel/kbabeldict/kbabeldictbox.cpp b/kbabel/kbabeldict/kbabeldictbox.cpp
index 9580f2d9..4f1a4f7f 100644
--- a/kbabel/kbabeldict/kbabeldictbox.cpp
+++ b/kbabel/kbabeldict/kbabeldictbox.cpp
@@ -22,11 +22,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -74,10 +74,10 @@
using namespace KBabel;
-class ResultListItem : public QListViewItem
+class ResultListItem : public TQListViewItem
{
public:
- ResultListItem(TQListView *parent, const SearchResult& result,bool richText);
+ ResultListItem(TQListView *tqparent, const SearchResult& result,bool richText);
virtual TQString key(int column, bool ascending) const;
const SearchResult* result() const;
@@ -88,9 +88,9 @@ private:
bool _richText;
};
-ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result
+ResultListItem::ResultListItem(TQListView *tqparent, const SearchResult& result
, bool richText)
- : TQListViewItem(parent)
+ : TQListViewItem(tqparent)
, _result(result)
, _richText(richText)
{
@@ -109,7 +109,7 @@ ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result
tmp=result.found.first();
bool cutted=false;
- int index=tmp.find('\n');
+ int index=tmp.tqfind('\n');
if(index > 0)
{
tmp=tmp.left(index);
@@ -132,7 +132,7 @@ ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result
tmp=result.translation;
cutted=false;
- index=tmp.find('\n');
+ index=tmp.tqfind('\n');
if(index > 0)
{
tmp=tmp.left(index);
@@ -179,11 +179,11 @@ const SearchResult *ResultListItem::result() const
}
/*
- * Constructs a KBabelDictBox which is a child of 'parent', with the
+ * Constructs a KBabelDictBox which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*/
-KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
- : DCOPObject("KBabelDict"), TQWidget( parent, name, fl )
+KBabelDictBox::KBabelDictBox( TQWidget* tqparent, const char* name, WFlags fl )
+ : DCOPObject("KBabelDict"), TQWidget( tqparent, name, fl )
{
active=-1;
currentResult=0;
@@ -251,12 +251,12 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
hbox = new TQHBoxLayout;
hbox->addStretch(1);
- listButton = new TQToolButton(Qt::UpArrow,this);
+ listButton = new TQToolButton(TQt::UpArrow,this);
listButton->setFixedSize(20,15);
listButton->setAutoRepeat(false);
connect(listButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showListOnly()));
hbox->addWidget(listButton);
- detailButton = new TQToolButton(Qt::DownArrow,this);
+ detailButton = new TQToolButton(TQt::DownArrow,this);
detailButton->setFixedSize(20,15);
detailButton->setAutoRepeat(false);
connect(detailButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showDetailsOnly()));
@@ -324,10 +324,10 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
mainLayout->addLayout(hbox);
totalResultsLabel->setNum(100000);
- totalResultsLabel->setFixedSize(totalResultsLabel->sizeHint());
+ totalResultsLabel->setFixedSize(totalResultsLabel->tqsizeHint());
totalResultsLabel->setNum(0);
currentLabel->setNum(100000);
- currentLabel->setFixedSize(currentLabel->sizeHint());
+ currentLabel->setFixedSize(currentLabel->tqsizeHint());
currentLabel->setNum(0);
setRMBMenu(new TQPopupMenu(this));
@@ -347,7 +347,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
for ( TQStringList::Iterator fit = list.begin(); fit != list.end()
; ++fit )
{
- if(!fileList.contains((*fit)))
+ if(!fileList.tqcontains((*fit)))
{
fileList.append((*fit));
}
@@ -373,7 +373,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
TQStringList appList = rcConfig.readListEntry("Applications");
KInstance *inst = KGlobal::instance();
- if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName()))
+ if(inst && !appList.isEmpty() && !appList.tqcontains(inst->instanceName()))
{
continue;
}
@@ -759,7 +759,7 @@ TQString KBabelDictBox::translate(const TQString text)
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return TQString::null;
+ return TQString();
}
else
{
@@ -779,7 +779,7 @@ TQString KBabelDictBox::fuzzyTranslation(const TQString text, int &score)
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return TQString::null;
+ return TQString();
}
else
{
@@ -799,7 +799,7 @@ TQString KBabelDictBox::searchTranslation(const TQString text, int &score)
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return TQString::null;
+ return TQString();
}
else
{
@@ -929,7 +929,7 @@ TQPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
}
-TQPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(TQWidget *parent)
+TQPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(TQWidget *tqparent)
{
TQPtrList<PrefWidget> list;
list.setAutoDelete(false);
@@ -937,7 +937,7 @@ TQPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(TQWidget *parent)
for(e = moduleList.first(); e != 0; e = moduleList.next())
{
- list.append(e->preferencesWidget(parent));
+ list.append(e->preferencesWidget(tqparent));
}
return list;
@@ -1007,7 +1007,7 @@ void KBabelDictBox::showResult(TQListViewItem *item)
if(!info->filePath.isEmpty())
{
rmbPopup->changeItem(editFileIndex
- ,i18n("Edit File %1").arg(info->location));
+ ,i18n("Edit File %1").tqarg(info->location));
rmbPopup->setItemEnabled(editFileIndex,true);
}
else
@@ -1182,7 +1182,7 @@ void KBabelDictBox::nextInfo()
if(!info->filePath.isEmpty())
{
rmbPopup->changeItem(editFileIndex
- ,i18n("Edit File %1").arg(info->location));
+ ,i18n("Edit File %1").tqarg(info->location));
rmbPopup->setItemEnabled(editFileIndex,true);
}
else
@@ -1255,7 +1255,7 @@ void KBabelDictBox::about()
if(aboutData->bugAddress() != "[email protected]")
{
text += "\n" + i18n("Send bugs to %1")
- .arg(aboutData->bugAddress()) +"\n";
+ .tqarg(aboutData->bugAddress()) +"\n";
}
TQLabel *label = new TQLabel(text,0);
@@ -1410,7 +1410,7 @@ void KBabelDictBox::copy()
}
else
{
- QClipboard *cb = KApplication::clipboard();
+ TQClipboard *cb = KApplication::tqclipboard();
cb->setText(translation());
}
}
@@ -1502,7 +1502,7 @@ void KBabelDictBox::configure(const TQString& id, bool modal)
{
if(e->id() == id)
{
- TQString caption = i18n("Configure Dictionary %1").arg(e->name());
+ TQString caption = i18n("Configure Dictionary %1").tqarg(e->name());
KDialogBase *dialog = new KDialogBase(this,"prefDialog"
, modal, caption
, KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel|
@@ -1696,7 +1696,7 @@ void KBabelDictBox::editFile()
{
KMessageBox::sorry(this
,i18n("There was an error starting KBabel:\n%1")
- .arg(error));
+ .tqarg(error));
return;
}
}