summaryrefslogtreecommitdiffstats
path: root/kdict
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kdict
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdict')
-rw-r--r--kdict/actions.cpp26
-rw-r--r--kdict/actions.h9
-rw-r--r--kdict/applet/kdictapplet.cpp32
-rw-r--r--kdict/applet/kdictapplet.h6
-rw-r--r--kdict/application.h1
-rw-r--r--kdict/dict.cpp64
-rw-r--r--kdict/dict.h3
-rw-r--r--kdict/matchview.cpp44
-rw-r--r--kdict/matchview.h9
-rw-r--r--kdict/options.cpp24
-rw-r--r--kdict/options.h11
-rw-r--r--kdict/queryview.cpp52
-rw-r--r--kdict/queryview.h12
-rw-r--r--kdict/sets.cpp26
-rw-r--r--kdict/sets.h3
-rw-r--r--kdict/toplevel.cpp96
-rw-r--r--kdict/toplevel.h3
17 files changed, 217 insertions, 204 deletions
diff --git a/kdict/actions.cpp b/kdict/actions.cpp
index 2496d1b7..0ae5c793 100644
--- a/kdict/actions.cpp
+++ b/kdict/actions.cpp
@@ -24,9 +24,9 @@
#include <ktoolbar.h>
-DictComboAction::DictComboAction( const TQString &text, TQObject *parent, const char *name,
+DictComboAction::DictComboAction( const TQString &text, TQObject *tqparent, const char *name,
bool editable, bool autoSized )
- : KAction( text, 0, parent, name ), m_editable(editable), m_autoSized(autoSized), m_compMode(KGlobalSettings::completionMode())
+ : KAction( text, 0, tqparent, name ), m_editable(editable), m_autoSized(autoSized), m_compMode(KGlobalSettings::completionMode())
{
}
@@ -46,7 +46,7 @@ int DictComboAction::plug( TQWidget *widget, int index )
m_combo = new KComboBox(m_editable,bar);
m_combo->setCompletionMode(m_compMode);
- bar->insertWidget( id_, m_combo->sizeHint().width(), m_combo, index );
+ bar->insertWidget( id_, m_combo->tqsizeHint().width(), m_combo, index );
bar->setItemAutoSized(id_,m_autoSized);
if ( m_combo ) {
@@ -103,7 +103,7 @@ TQString DictComboAction::currentText() const
if (m_combo)
return m_combo->currentText();
else
- return TQString::null;
+ return TQString();
}
void DictComboAction::selectAll()
@@ -155,7 +155,7 @@ void DictComboAction::setList(TQStringList items)
if (m_editable && m_combo->completionObject())
m_combo->completionObject()->setItems(items);
if (!m_autoSized)
- m_combo->setFixedWidth(m_combo->sizeHint().width());
+ m_combo->setFixedWidth(m_combo->tqsizeHint().width());
}
}
@@ -193,8 +193,8 @@ void DictComboAction::slotComboActivated(const TQString &s)
//*********************************************************************************
-DictLabelAction::DictLabelAction( const TQString &text, TQObject *parent, const char *name )
- : KAction( text, 0, parent, name )
+DictLabelAction::DictLabelAction( const TQString &text, TQObject *tqparent, const char *name )
+ : KAction( text, 0, tqparent, name )
{
}
@@ -213,9 +213,9 @@ int DictLabelAction::plug( TQWidget *widget, int index )
int id = KAction::getToolButtonID();
TQLabel *label = new TQLabel( text(), widget, "kde toolbar widget" );
- label->setMinimumWidth(label->sizeHint().width());
- label->setBackgroundMode( Qt::PaletteButton );
- label->setAlignment(AlignCenter | AlignVCenter);
+ label->setMinimumWidth(label->tqsizeHint().width());
+ label->setBackgroundMode( TQt::PaletteButton );
+ label->tqsetAlignment(AlignCenter | AlignVCenter);
label->adjustSize();
tb->insertWidget( id, label->width(), label, index );
@@ -263,8 +263,8 @@ void DictLabelAction::setBuddy(TQWidget *buddy)
DictButtonAction::DictButtonAction( const TQString& text, TQObject* receiver,
- const char* slot, TQObject* parent, const char* name )
- : KAction( text, 0, receiver, slot, parent, name )
+ const char* slot, TQObject* tqparent, const char* name )
+ : KAction( text, 0, receiver, slot, tqparent, name )
{
}
@@ -320,7 +320,7 @@ void DictButtonAction::unplug( TQWidget *widget )
int DictButtonAction::widthHint()
{
if (m_button)
- return m_button->sizeHint().width();
+ return m_button->tqsizeHint().width();
else
return 0;
}
diff --git a/kdict/actions.h b/kdict/actions.h
index d2261937..3ce80182 100644
--- a/kdict/actions.h
+++ b/kdict/actions.h
@@ -31,9 +31,10 @@ class TQPushButton;
class DictComboAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- DictComboAction( const TQString& text, TQObject* parent,
+ DictComboAction( const TQString& text, TQObject* tqparent,
const char* name, bool editable, bool autoSized );
~DictComboAction();
@@ -73,9 +74,10 @@ class DictComboAction : public KAction
class DictLabelAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- DictLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 );
+ DictLabelAction( const TQString &text, TQObject *tqparent = 0, const char *name = 0 );
~DictLabelAction();
virtual int plug( TQWidget *widget, int index = -1 );
@@ -92,10 +94,11 @@ class DictLabelAction : public KAction
class DictButtonAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
DictButtonAction( const TQString& text, TQObject* receiver,
- const char* slot, TQObject* parent, const char* name );
+ const char* slot, TQObject* tqparent, const char* name );
~DictButtonAction();
virtual int plug( TQWidget *w, int index = -1 );
diff --git a/kdict/applet/kdictapplet.cpp b/kdict/applet/kdictapplet.cpp
index 6e45de52..eda347e4 100644
--- a/kdict/applet/kdictapplet.cpp
+++ b/kdict/applet/kdictapplet.cpp
@@ -74,16 +74,16 @@ void PopupBox::enablePopup()
extern "C"
{
- KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kdictapplet");
- return new DictApplet(configFile, KPanelApplet::Stretch, 0, parent, "kdictapplet");
+ return new DictApplet(configFile, KPanelApplet::Stretch, 0, tqparent, "kdictapplet");
}
}
-DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
- : KPanelApplet(configFile, type, actions, parent, name), waiting(0)
+DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name)
+ : KPanelApplet(configFile, type, actions, tqparent, name), waiting(0)
{
// first the widgets for a horizontal panel
baseWidget = new TQWidget(this);
@@ -102,7 +102,7 @@ DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWid
TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true);
iconLabel->setPixmap(pm);
baseLay->addWidget(iconLabel,1,0);
- iconLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
+ iconLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter);
iconLabel->setFixedWidth(pm.width()+4);
TQToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
@@ -160,7 +160,7 @@ DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWid
externalCombo = new KHistoryCombo(popupBox);
externalCombo->setCompletionObject(completionObject);
connect(externalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
- externalCombo->setFixedSize(160, externalCombo->sizeHint().height());
+ externalCombo->setFixedSize(160, externalCombo->tqsizeHint().height());
connect(internalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
@@ -205,9 +205,9 @@ DictApplet::~DictApplet()
int DictApplet::widthForHeight(int height) const
{
if (height >= 38)
- return textLabel->sizeHint().width()+55;
+ return textLabel->tqsizeHint().width()+55;
else
- return textLabel->sizeHint().width()+25;
+ return textLabel->tqsizeHint().width()+25;
}
@@ -219,15 +219,15 @@ int DictApplet::heightForWidth(int width) const
void DictApplet::resizeEvent(TQResizeEvent*)
{
- if (orientation() == Horizontal) {
+ if (orientation() ==Qt::Horizontal) {
verticalBtn->hide();
baseWidget->show();
baseWidget->setFixedSize(width(),height());
- if (height() < internalCombo->sizeHint().height())
+ if (height() < internalCombo->tqsizeHint().height())
internalCombo->setFixedHeight(height());
else
- internalCombo->setFixedHeight(internalCombo->sizeHint().height());
+ internalCombo->setFixedHeight(internalCombo->tqsizeHint().height());
if (height() >= 38) {
textLabel->show();
@@ -246,7 +246,7 @@ void DictApplet::resizeEvent(TQResizeEvent*)
}
baseWidget->updateGeometry();
- } else { // orientation() == Vertical
+ } else { // orientation() ==Qt::Vertical
verticalBtn->show();
baseWidget->hide();
verticalBtn->setFixedSize(width(),width());
@@ -286,7 +286,7 @@ void DictApplet::sendCommand(const TQCString &fun, const TQString &data)
return;
} else {
QCStringList list = client->remoteObjects("kdict");
- if (list.findIndex("KDictIface")==-1) {
+ if (list.tqfindIndex("KDictIface")==-1) {
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
@@ -313,7 +313,7 @@ void DictApplet::sendDelayedCommand()
return;
} else {
QCStringList list = client->remoteObjects("kdict");
- if (list.findIndex("KDictIface")==-1) {
+ if (list.tqfindIndex("KDictIface")==-1) {
waiting++;
TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
@@ -338,7 +338,7 @@ void DictApplet::startQuery(const TQString &s)
sendCommand("definePhrase(TQString)",query);
- if (orientation() == Vertical)
+ if (orientation() ==Qt::Vertical)
popupBox->hide();
}
@@ -352,7 +352,7 @@ void DictApplet::comboTextChanged(const TQString &s)
void DictApplet::queryClipboard()
{
- sendCommand("defineClipboardContent()",TQString::null);
+ sendCommand("defineClipboardContent()",TQString());
}
diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h
index de5f469b..a79300af 100644
--- a/kdict/applet/kdictapplet.h
+++ b/kdict/applet/kdictapplet.h
@@ -30,9 +30,10 @@ class KHistoryCombo;
//********* PopupBox ********************************************
-class PopupBox : public QHBox
+class PopupBox : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
PopupBox();
@@ -59,9 +60,10 @@ private:
class DictApplet : public KPanelApplet
{
Q_OBJECT
+ TQ_OBJECT
public:
- DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *parent = 0, const char *name = 0);
+ DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *tqparent = 0, const char *name = 0);
virtual ~DictApplet();
int widthForHeight(int height) const;
diff --git a/kdict/application.h b/kdict/application.h
index e5d46c67..57fe5780 100644
--- a/kdict/application.h
+++ b/kdict/application.h
@@ -22,6 +22,7 @@ class TopLevel;
class Application : public KUniqueApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
Application();
diff --git a/kdict/dict.cpp b/kdict/dict.cpp
index 74395d4a..11d5e12b 100644
--- a/kdict/dict.cpp
+++ b/kdict/dict.cpp
@@ -3,7 +3,7 @@
dict.cpp (part of The KDE Dictionary Client)
Copyright (C) 2000-2001 Christian Gebauer <gebauer@kde.org>
- (C) by Matthias Hölzer 1998
+ (C) by Matthias H�lzer 1998
This file is distributed under the Artistic License.
See LICENSE for details.
@@ -201,21 +201,21 @@ void DictAsyncClient::define()
job->strategy = ".";
if (!match())
return;
- job->result = TQString::null;
+ job->result = TQString();
if (job->numFetched == 0) {
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("No definitions found for \'%1'.").arg(job->query));
+ resultAppend(i18n("No definitions found for \'%1'.").tqarg(job->query));
resultAppend("</p>\n</html></body>");
} else {
// html header...
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").arg(job->query));
+ resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").tqarg(job->query));
resultAppend("</p>\n<table width=\"100%\" cols=2>\n");
TQString lastDb;
TQStringList::iterator it;
for (it = job->matches.begin(); it != job->matches.end(); ++it) {
- int pos = (*it).find(' ');
+ int pos = (*it).tqfind(' ');
if (pos != -1) {
if (lastDb != (*it).left(pos)) {
if (lastDb.length() > 0)
@@ -352,7 +352,7 @@ bool DictAsyncClient::getDefinitions()
}
} else {
job->error = JobData::ErrServerError;
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(thisLine);
doQuit();
return false;
@@ -430,7 +430,7 @@ bool DictAsyncClient::getDefinitions()
}
resultAppend("</p></pre>\n");
- if (hashList.find(context.hexDigest())>=0) // duplicate??
+ if (hashList.tqfind(context.hexDigest())>=0) // duplicate??
job->result.truncate(oldResPos); // delete the whole definition
else {
hashList.append(context.hexDigest());
@@ -591,7 +591,7 @@ void DictAsyncClient::showDbInfo()
// html header...
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("Database Information [%1]:").arg(job->query));
+ resultAppend(i18n("Database Information [%1]:").tqarg(job->query));
resultAppend("</p>\n<pre><p class=\"definition\">\n");
bool done(false);
@@ -792,13 +792,13 @@ void DictAsyncClient::openConnection()
if (ks.status() == IO_LookupError)
job->error = JobData::ErrBadHost;
else if (ks.status() == IO_ConnectError) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrConnect;
} else if (ks.status() == IO_TimeOutError)
job->error = JobData::ErrTimeout;
else {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrCommunication;
}
@@ -898,7 +898,7 @@ bool DictAsyncClient::waitForRead()
if (ret == -1) { // select failed
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -918,7 +918,7 @@ bool DictAsyncClient::waitForRead()
}
if (FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -930,7 +930,7 @@ bool DictAsyncClient::waitForRead()
}
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -961,7 +961,7 @@ bool DictAsyncClient::waitForWrite()
if (ret == -1) { // select failed
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -981,7 +981,7 @@ bool DictAsyncClient::waitForWrite()
}
if (FD_ISSET(tcpSocket,&fdsR)||FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -992,7 +992,7 @@ bool DictAsyncClient::waitForWrite()
return true;
}
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -1032,7 +1032,7 @@ bool DictAsyncClient::sendBuffer()
ret = KSocks::self()->write(tcpSocket,&cmdBuffer.data()[done],todo);
if (ret <= 0) {
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -1077,7 +1077,7 @@ bool DictAsyncClient::getNextLine()
} while ((received<0)&&(errno==EINTR)); // don't get tricked by signals
if (received <= 0) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
closeSocket();
@@ -1121,7 +1121,7 @@ void DictAsyncClient::handleErrors()
int len = strlen(thisLine);
if (len>80)
len = 80;
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(codec->toUnicode(thisLine,len));
switch (strtol(thisLine,0L,0)) {
@@ -1364,10 +1364,10 @@ void DictInterface::clientDone()
{
TQString message;
- cleanPipes(); // read from pipe so that notifier doesn´t fire again
+ cleanPipes(); // read from pipe so that notifier doesn�t fire again
if (jobList.isEmpty()) {
- kdDebug(5004) << "This shouldn´t happen, the client-thread signaled termination, but the job list is empty" << endl;
+ kdDebug(5004) << "This shouldn�t happen, the client-thread signaled termination, but the job list is empty" << endl;
return; // strange..
}
@@ -1407,7 +1407,7 @@ void DictInterface::clientDone()
message = i18n("One definition found");
break;
default:
- message = i18n("%1 definitions found").arg(job->numFetched);
+ message = i18n("%1 definitions found").tqarg(job->numFetched);
}
} else {
switch (job->numFetched) {
@@ -1418,7 +1418,7 @@ void DictInterface::clientDone()
message = i18n(" One definition fetched ");
break;
default:
- message = i18n(" %1 definitions fetched ").arg(job->numFetched);
+ message = i18n(" %1 definitions fetched ").tqarg(job->numFetched);
}
}
emit stopped(message);
@@ -1433,7 +1433,7 @@ void DictInterface::clientDone()
message = i18n(" One matching definition found ");
break;
default:
- message = i18n(" %1 matching definitions found ").arg(job->numFetched);
+ message = i18n(" %1 matching definitions found ").tqarg(job->numFetched);
}
emit stopped(message);
emit matchReady(job->matches);
@@ -1451,17 +1451,17 @@ void DictInterface::clientDone()
errMsg += job->result;
break;
case JobData::ErrTimeout:
- errMsg = i18n("A delay occurred which exceeded the\ncurrent timeout limit of %1 seconds.\nYou can modify this limit in the Preferences Dialog.").arg(global->timeout);
+ errMsg = i18n("A delay occurred which exceeded the\ncurrent timeout limit of %1 seconds.\nYou can modify this limit in the Preferences Dialog.").tqarg(global->timeout);
break;
case JobData::ErrBadHost:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\nCannot resolve hostname.").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\nCannot resolve hostname.").tqarg(job->server).tqarg(job->port);
break;
case JobData::ErrConnect:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\n").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\n").tqarg(job->server).tqarg(job->port);
errMsg += job->result;
break;
case JobData::ErrRefused:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\nThe server refused the connection.").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\nThe server refused the connection.").tqarg(job->server).tqarg(job->port);
break;
case JobData::ErrNotAvailable:
errMsg = i18n("The server is temporarily unavailable.");
@@ -1488,7 +1488,7 @@ void DictInterface::clientDone()
errMsg = i18n("No strategies available.");
break;
case JobData::ErrServerError:
- errMsg = i18n("The server sent an unexpected reply:\n\"%1\"\nThis shouldn't happen, please consider\nwriting a bug report").arg(job->result);
+ errMsg = i18n("The server sent an unexpected reply:\n\"%1\"\nThis shouldn't happen, please consider\nwriting a bug report").tqarg(job->result);
break;
case JobData::ErrMsgTooLong:
errMsg = i18n("The server sent a response with a text line\nthat was too long.\n(RFC 2229: max. 1024 characters/6144 octets)");
@@ -1521,7 +1521,7 @@ JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
return 0L;
if (query.length()>300) // shorten if necessary
query.truncate(300);
- query = query.replace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
+ query = query.tqreplace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
if (query.isEmpty())
return 0L;
@@ -1537,7 +1537,7 @@ JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
if ((global->currentDatabase > 0)&& // database set
(global->currentDatabase < global->databaseSets.count()+1)) {
for (int i = 0;i<(int)global->serverDatabases.count();i++)
- if ((global->databaseSets.at(global->currentDatabase-1))->findIndex(global->serverDatabases[i])>0)
+ if ((global->databaseSets.at(global->currentDatabase-1))->tqfindIndex(global->serverDatabases[i])>0)
newjob->databases.append(global->serverDatabases[i].utf8().data());
if (newjob->databases.count()==0) {
KMessageBox::sorry(global->topLevel, i18n("Please select at least one database."));
@@ -1570,7 +1570,7 @@ void DictInterface::startClient()
{
cleanPipes();
if (jobList.isEmpty()) {
- kdDebug(5004) << "This shouldn´t happen, startClient called, but clientList is empty" << endl;
+ kdDebug(5004) << "This shouldn�t happen, startClient called, but clientList is empty" << endl;
return;
}
diff --git a/kdict/dict.h b/kdict/dict.h
index 64cf25e0..81d3d5d5 100644
--- a/kdict/dict.h
+++ b/kdict/dict.h
@@ -149,9 +149,10 @@ private:
//********* DictInterface *************************************************
-class DictInterface : public QObject
+class DictInterface : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdict/matchview.cpp b/kdict/matchview.cpp
index 869ea383..e633c2a2 100644
--- a/kdict/matchview.cpp
+++ b/kdict/matchview.cpp
@@ -96,22 +96,22 @@ void MatchViewItem::setOpen(bool o)
}
-void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
+void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{
if(command.isEmpty()) {
TQFont font=p->font();
font.setBold(true);
p->setFont(font);
}
- TQListViewItem::paintCell(p,cg,column,width,alignment);
+ TQListViewItem::paintCell(p,cg,column,width,tqalignment);
}
//********* MatchView ******************************************
-MatchView::MatchView(TQWidget *parent, const char *name)
- : TQWidget(parent,name),getOn(false),getAllOn(false)
+MatchView::MatchView(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent,name),getOn(false),getAllOn(false)
{
setCaption(kapp->makeStdCaption(i18n("Match List")));
@@ -119,13 +119,13 @@ MatchView::MatchView(TQWidget *parent, const char *name)
boxLayout->addSpacing(1);
w_strat = new TQComboBox(false,this);
- w_strat->setFixedHeight(w_strat->sizeHint().height());
+ w_strat->setFixedHeight(w_strat->tqsizeHint().height());
connect(w_strat,TQT_SIGNAL(activated(int)),this,TQT_SLOT(strategySelected(int)));
boxLayout->addWidget(w_strat,0);
boxLayout->addSpacing(1);
w_list = new TQListView(this);
- w_list->setFocusPolicy(TQWidget::StrongFocus);
+ w_list->setFocusPolicy(TQ_StrongFocus);
w_list->header()->hide();
w_list->addColumn("foo");
w_list->setColumnWidthMode(0,TQListView::Maximum);
@@ -133,7 +133,7 @@ MatchView::MatchView(TQWidget *parent, const char *name)
w_list->setSelectionMode(TQListView::Extended);
w_list->setTreeStepSize(18);
w_list->setSorting(-1); // disable sorting
- w_list->setMinimumHeight(w_strat->sizeHint().height());
+ w_list->setMinimumHeight(w_strat->tqsizeHint().height());
connect(w_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(enableGetButton()));
connect(w_list,TQT_SIGNAL(returnPressed(TQListViewItem *)),TQT_SLOT(returnPressed(TQListViewItem *)));
connect(w_list,TQT_SIGNAL(doubleClicked(TQListViewItem *)),TQT_SLOT(getOneItem(TQListViewItem *)));
@@ -144,15 +144,15 @@ MatchView::MatchView(TQWidget *parent, const char *name)
boxLayout->addSpacing(1);
w_get = new TQPushButton(i18n("&Get Selected"),this);
- w_get->setFixedHeight(w_get->sizeHint().height()-3);
- w_get->setMinimumWidth(w_get->sizeHint().width()-20);
+ w_get->setFixedHeight(w_get->tqsizeHint().height()-3);
+ w_get->setMinimumWidth(w_get->tqsizeHint().width()-20);
w_get->setEnabled(false);
connect(w_get, TQT_SIGNAL(clicked()), this, TQT_SLOT(getSelected()));
boxLayout->addWidget(w_get,0);
w_getAll = new TQPushButton(i18n("Get &All"),this);
- w_getAll->setFixedHeight(w_getAll->sizeHint().height()-3);
- w_getAll->setMinimumWidth(w_getAll->sizeHint().width()-20);
+ w_getAll->setFixedHeight(w_getAll->tqsizeHint().height()-3);
+ w_getAll->setMinimumWidth(w_getAll->tqsizeHint().width()-20);
w_getAll->setEnabled(false);
connect(w_getAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(getAll()));
boxLayout->addWidget(w_getAll,0);
@@ -176,7 +176,7 @@ void MatchView::updateStrategyCombo()
bool MatchView::selectStrategy(const TQString &strategy) const
{
- int newCurrent = global->strategies.findIndex(strategy);
+ int newCurrent = global->strategies.tqfindIndex(strategy);
if (newCurrent == -1)
return false;
else {
@@ -217,7 +217,7 @@ void MatchView::enableGetButton()
void MatchView::mouseButtonPressed(int button, TQListViewItem *, const TQPoint &, int)
{
- if (button == MidButton)
+ if (button == Qt::MidButton)
emit(clipboardRequested());
}
@@ -232,7 +232,7 @@ void MatchView::getOneItem(TQListViewItem *i)
{
TQStringList defines;
- if ((!i->childCount())&&(i->parent()))
+ if ((!i->childCount())&&(i->tqparent()))
defines.append(((MatchViewItem *)(i))->command);
else {
i = i->firstChild();
@@ -310,7 +310,7 @@ void MatchView::doGet(TQStringList &defines)
if (defines.count() > 0) {
if (defines.count() > global->maxDefinitions) {
KMessageBox::sorry(global->topLevel,i18n("You have selected %1 definitions,\nbut Kdict will fetch only the first %2 definitions.\nYou can modify this limit in the Preferences Dialog.")
- .arg(defines.count()).arg(global->maxDefinitions));
+ .tqarg(defines.count()).tqarg(global->maxDefinitions));
while (defines.count()>global->maxDefinitions)
defines.pop_back();
}
@@ -368,7 +368,7 @@ void MatchView::newList(const TQStringList &matches)
}
w_list->setUpdatesEnabled(true);
- w_list->repaint();
+ w_list->tqrepaint();
w_list->setFocus();
}
@@ -378,7 +378,7 @@ void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int)
{
rightBtnMenu->clear();
- if ((i!=0L)&&(i->isExpandable()||i->parent())) {
+ if ((i!=0L)&&(i->isExpandable()||i->tqparent())) {
popupCurrent = (MatchViewItem *)(i);
rightBtnMenu->insertItem(i18n("&Get"),this,TQT_SLOT(popupGetCurrent()));
if (!i->isExpandable()) { // toplevel item -> only "get"
@@ -388,14 +388,14 @@ void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int)
rightBtnMenu->insertSeparator();
}
- kapp->clipboard()->setSelectionMode(false);
- TQString text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(false);
+ TQString text = kapp->tqclipboard()->text();
if (text.isEmpty()) {
- kapp->clipboard()->setSelectionMode(true);
- text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(true);
+ text = kapp->tqclipboard()->text();
}
if (!text.isEmpty()) {
- popupClip = kapp->clipboard()->text();
+ popupClip = kapp->tqclipboard()->text();
rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,TQT_SLOT(popupMatchClip()));
rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,TQT_SLOT(popupDefineClip()));
rightBtnMenu->insertSeparator();
diff --git a/kdict/matchview.h b/kdict/matchview.h
index 7248c35c..54c2dab5 100644
--- a/kdict/matchview.h
+++ b/kdict/matchview.h
@@ -23,7 +23,7 @@ class KPopupMenu;
//********* MatchViewItem ********************************************
-class MatchViewItem : public QListViewItem
+class MatchViewItem : public TQListViewItem
{
public:
@@ -35,7 +35,7 @@ public:
~MatchViewItem();
void setOpen(bool o);
- void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment);
TQString command;
TQStringList subEntrys;
@@ -45,13 +45,14 @@ public:
//********* MatchView ******************************************
-class MatchView : public QWidget
+class MatchView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MatchView(TQWidget *parent=0,const char *name=0);
+ MatchView(TQWidget *tqparent=0,const char *name=0);
~MatchView();
void updateStrategyCombo();
diff --git a/kdict/options.cpp b/kdict/options.cpp
index 3220b07c..f3bf58bb 100644
--- a/kdict/options.cpp
+++ b/kdict/options.cpp
@@ -104,7 +104,7 @@ void GlobalData::read()
f_onts[Fheadings]=config->readFontEntry("headingsFont",&defFont);
f_ontNames[Fheadings]=i18n("Headings");
- // geometry...
+ // tqgeometry...
config->setGroup("Geometry");
TQSize invalid(-1,-1);
optSize = config->readSizeEntry("Opt_Size",&invalid);
@@ -384,8 +384,8 @@ TQString GlobalData::encryptStr(const TQString& aStr)
//********* OptionsDialog::DialogListBox *****************************
-OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, TQWidget * parent, const char * name)
- : TQListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
+OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, TQWidget * tqparent, const char * name)
+ : TQListBox(tqparent, name), a_lwaysIgnore(alwaysIgnore)
{
}
@@ -425,7 +425,7 @@ void OptionsDialog::ColorListItem::paint( TQPainter *p )
p->drawText( 30+3*2, fm.ascent() + fm.leading()/2, text() );
- p->setPen( Qt::black );
+ p->setPen( TQt::black );
p->drawRect( 3, 1, 30, h-1 );
p->fillRect( 4, 2, 28, h-3, mColor );
}
@@ -449,7 +449,7 @@ int OptionsDialog::ColorListItem::width(const TQListBox *lb ) const
OptionsDialog::FontListItem::FontListItem( const TQString &name, const TQFont &font )
: TQListBoxText(name), f_ont(font)
{
- fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").tqarg(f_ont.family()).tqarg(f_ont.pointSize());
}
@@ -461,7 +461,7 @@ OptionsDialog::FontListItem::~FontListItem()
void OptionsDialog::FontListItem::setFont(const TQFont &font)
{
f_ont = font;
- fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").tqarg(f_ont.family()).tqarg(f_ont.pointSize());
}
@@ -488,8 +488,8 @@ int OptionsDialog::FontListItem::width(const TQListBox *lb ) const
//********* OptionsDialog ******************************************
-OptionsDialog::OptionsDialog(TQWidget *parent, const char *name)
- : KDialogBase(IconList, i18n("Configure"), Help|Default|Ok|Apply|Cancel, Ok, parent, name, false, true)
+OptionsDialog::OptionsDialog(TQWidget *tqparent, const char *name)
+ : KDialogBase(IconList, i18n("Configure"), Help|Default|Ok|Apply|Cancel, Ok, tqparent, name, false, true)
{
//******** Server ************************************
@@ -641,11 +641,11 @@ OptionsDialog::OptionsDialog(TQWidget *parent, const char *name)
f_List->insertItem(new FontListItem(global->fontName(i), global->font(i)));
//************ Layout ***************************
- layoutTab = addPage(i18n("Layout"),i18n("Customize Output Format"), BarIcon("text_left", KIcon::SizeMedium ));
+ tqlayoutTab = addPage(i18n("Layout"),i18n("Customize Output Format"), BarIcon("text_left", KIcon::SizeMedium ));
- TQVBoxLayout *vbox = new TQVBoxLayout(layoutTab, 0, spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(tqlayoutTab, 0, spacingHint());
- TQButtonGroup *bGroup = new TQButtonGroup(i18n("Headings"),layoutTab);
+ TQButtonGroup *bGroup = new TQButtonGroup(i18n("Headings"),tqlayoutTab);
TQVBoxLayout *bvbox = new TQVBoxLayout(bGroup,8,5);
bvbox->addSpacing(fontMetrics().lineSpacing()-4);
@@ -869,7 +869,7 @@ void OptionsDialog::slotColDefaultBtnClicked()
colorItem->setColor(global->defaultColor(i));
}
c_List->triggerUpdate(true);
- c_List->repaint(true);
+ c_List->tqrepaint(true);
}
diff --git a/kdict/options.h b/kdict/options.h
index 239b52ef..a0b1cfe8 100644
--- a/kdict/options.h
+++ b/kdict/options.h
@@ -74,7 +74,7 @@ public:
bool defineClipboard; // define clipboard content on startup?
- TQSize optSize,setsSize,matchSize; // window geometry
+ TQSize optSize,setsSize,matchSize; // window tqgeometry
bool showMatchList;
TQValueList<int> splitterSizes;
@@ -111,10 +111,11 @@ extern GlobalData *global;
class OptionsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- OptionsDialog(TQWidget *parent=0, const char *name=0);
+ OptionsDialog(TQWidget *tqparent=0, const char *name=0);
~OptionsDialog();
//===================================================================================
@@ -123,7 +124,7 @@ public:
public:
// alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus
- DialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0);
+ DialogListBox(bool alwaysIgnore=false, TQWidget * tqparent=0, const char * name=0);
~DialogListBox();
protected:
@@ -137,7 +138,7 @@ public:
class ColorListItem : public TQListBoxText {
public:
- ColorListItem( const TQString &text, const TQColor &color=Qt::black );
+ ColorListItem( const TQString &text, const TQColor &color=TQt::black );
~ColorListItem();
const TQColor& color() { return mColor; }
void setColor( const TQColor &color ) { mColor = color; }
@@ -217,7 +218,7 @@ private:
*f_ntDefBtn,
*f_ntChngBtn;
- TQFrame *layoutTab;
+ TQFrame *tqlayoutTab;
TQRadioButton *w_layout[3];
TQFrame *otherTab;
diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp
index 045b4e49..e48397e1 100644
--- a/kdict/queryview.cpp
+++ b/kdict/queryview.cpp
@@ -40,8 +40,8 @@
TQString SaveHelper::lastPath;
-SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent)
- : p_arent(parent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
+SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *tqparent)
+ : p_arent(tqparent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
{
}
@@ -74,7 +74,7 @@ TQFile* SaveHelper::getFile(const TQString &dialogTitle)
if (url.isLocalFile()) {
if (TQFileInfo(url.path()).exists() &&
(KMessageBox::warningContinueCancel(global->topLevel,
- i18n("A file named %1 already exists.\nDo you want to replace it?").arg(url.path()),
+ i18n("A file named %1 already exists.\nDo you want to replace it?").tqarg(url.path()),
dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
return 0;
}
@@ -109,8 +109,8 @@ BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText)
//********* DictHTMLPart ******************************************
-DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname)
- : KHTMLPart(parentWidget,widgetname)
+DictHTMLPart::DictHTMLPart(TQWidget *tqparentWidget, const char *widgetname)
+ : KHTMLPart(tqparentWidget,widgetname)
{}
@@ -120,7 +120,7 @@ DictHTMLPart::~DictHTMLPart()
void DictHTMLPart::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event)
{
- if (event->qmouseEvent()->button()==MidButton)
+ if (event->qmouseEvent()->button()==Qt::MidButton)
emit(middleButtonClicked());
else
KHTMLPart::khtmlMouseReleaseEvent(event);
@@ -140,7 +140,7 @@ QueryView::QueryView(TQWidget *_parent)
part->setJScriptEnabled(false);
part->setJavaEnabled(false);
part->setURLCursor(KCursor::handCursor());
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
connect(part, TQT_SIGNAL(completed()), TQT_SLOT(partCompleted()));
connect(part, TQT_SIGNAL(middleButtonClicked()), TQT_SLOT(middleButtonClicked()));
rightBtnMenu = new KPopupMenu(this);
@@ -184,11 +184,11 @@ void QueryView::optionsChanged()
saveCurrentResultPos();
currentHTMLHeader = TQString("<html><head><style type=\"text/css\">\n");
- currentHTMLHeader += TQString("body { background-color:%1; color:%2; }\n").arg(global->backgroundColor().name()).arg(global->textColor().name());
- currentHTMLHeader += TQString("a:link, a:active { color:%1; text-decoration:none; }\n").arg(global->linksColor().name());
- currentHTMLHeader += TQString("a:visited { color:%1; text-decoration:none; }\n").arg(global->visitedLinksColor().name());
- currentHTMLHeader += TQString("a:hover { color:%1; text-decoration:underline; }\n").arg(global->linksColor().name());
- currentHTMLHeader += TQString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").arg(global->headingsBackgroundColor().name()).arg(global->headingsTextColor().name()).arg(global->headingsFont().family()).arg(global->headingsFont().pointSize());
+ currentHTMLHeader += TQString("body { background-color:%1; color:%2; }\n").tqarg(global->backgroundColor().name()).tqarg(global->textColor().name());
+ currentHTMLHeader += TQString("a:link, a:active { color:%1; text-decoration:none; }\n").tqarg(global->linksColor().name());
+ currentHTMLHeader += TQString("a:visited { color:%1; text-decoration:none; }\n").tqarg(global->visitedLinksColor().name());
+ currentHTMLHeader += TQString("a:hover { color:%1; text-decoration:underline; }\n").tqarg(global->linksColor().name());
+ currentHTMLHeader += TQString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").tqarg(global->headingsBackgroundColor().name()).tqarg(global->headingsTextColor().name()).tqarg(global->headingsFont().family()).tqarg(global->headingsFont().pointSize());
if (global->headingsFont().italic())
currentHTMLHeader += TQString("font-style:italic; ");
if (global->headingsFont().bold())
@@ -196,7 +196,7 @@ void QueryView::optionsChanged()
currentHTMLHeader += TQString("}\n");
currentHTMLHeader += TQString("p.definition { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
currentHTMLHeader += TQString("table { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += TQString("pre { font-family:%1; font-size:%2pt; ").arg(global->textFont().family()).arg(global->textFont().pointSize());
+ currentHTMLHeader += TQString("pre { font-family:%1; font-size:%2pt; ").tqarg(global->textFont().family()).tqarg(global->textFont().pointSize());
if (global->textFont().italic())
currentHTMLHeader += TQString("font-style:italic; ");
if (global->textFont().bold())
@@ -231,9 +231,9 @@ void QueryView::saveQuery()
if (!browseList.isEmpty()) {
BrowseData* brw = browseList.at(browsePos);
TQString fName = brw->queryText+".html";
- fName.replace(TQRegExp("[\\s/]"),"_");
+ fName.tqreplace(TQRegExp("[\\s/]"),"_");
SaveHelper helper(fName,"*.html",global->topLevel);
- TQFile *file = helper.getFile(TQString::null);
+ TQFile *file = helper.getFile(TQString());
if (file) {
TQTextStream stream(file);
@@ -276,13 +276,13 @@ void QueryView::selectAll()
void QueryView::copySelection()
{
- kapp->clipboard()->setText(part->selectedText());
+ kapp->tqclipboard()->setText(part->selectedText());
}
void QueryView::showFindDialog()
{
- KAction *act = part->actionCollection()->action("find");
+ KAction *act = part->actionCollection()->action("tqfind");
if (act)
act->activate();
}
@@ -441,14 +441,14 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
} else {
- kapp->clipboard()->setSelectionMode(false);
- TQString text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(false);
+ TQString text = kapp->tqclipboard()->text();
if (text.isEmpty()) {
- kapp->clipboard()->setSelectionMode(true);
- text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(true);
+ text = kapp->tqclipboard()->text();
}
if (!text.isEmpty()) {
- popupSelect = TQApplication::clipboard()->text();
+ popupSelect = TQApplication::tqclipboard()->text();
rightBtnMenu->insertItem(SmallIcon("define_clip"),
i18n("&Define Clipboard Content"),
this,TQT_SLOT(popupDefineSelect()));
@@ -467,7 +467,7 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(browseBack()));
else
rightBtnMenu->insertItem(SmallIcon("back"),
- i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)),
+ i18n("&Back: '%1'").tqarg(getShortString(browseList.at(browsePos-1)->queryText,25)),
this,TQT_SLOT(browseBack()));
} else {
ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, TQT_SLOT(browseBack()));
@@ -481,7 +481,7 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(browseForward()));
else
rightBtnMenu->insertItem(SmallIcon("forward"),
- i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)),
+ i18n("&Forward: '%1'").tqarg(getShortString(browseList.at(browsePos+1)->queryText,25)),
this,TQT_SLOT(browseForward()));
} else {
ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,TQT_SLOT(browseForward()));
@@ -569,7 +569,7 @@ void QueryView::updateBrowseActions()
if (browseList.at(browsePos-1)->queryText.isEmpty())
actBack->setText(i18n("&Back: Information"));
else
- actBack->setText(i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)));
+ actBack->setText(i18n("&Back: '%1'").tqarg(getShortString(browseList.at(browsePos-1)->queryText,25)));
actBack->popupMenu()->clear();
int i = browsePos-1;
@@ -593,7 +593,7 @@ void QueryView::updateBrowseActions()
if (browseList.at(browsePos+1)->queryText.isEmpty())
actForward->setText(i18n("&Forward: Information"));
else
- actForward->setText(i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)));
+ actForward->setText(i18n("&Forward: '%1'").tqarg(getShortString(browseList.at(browsePos+1)->queryText,25)));
actForward->popupMenu()->clear();
int i = browsePos+1;
diff --git a/kdict/queryview.h b/kdict/queryview.h
index 5dc3c9bc..cb4a0012 100644
--- a/kdict/queryview.h
+++ b/kdict/queryview.h
@@ -16,8 +16,8 @@
------------------------------------------------------------- */
-#ifndef _QUERYVIEW_H_
-#define _QUERYVIEW_H_
+#ifndef _TQUERYVIEW_H_
+#define _TQUERYVIEW_H_
#include <tqvbox.h>
#include <khtml_part.h>
@@ -38,7 +38,7 @@ class SaveHelper {
public:
- SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent);
+ SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *tqparent);
~SaveHelper();
// returns a file open for writing
@@ -77,10 +77,11 @@ public:
class DictHTMLPart : public KHTMLPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- DictHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0);
+ DictHTMLPart(TQWidget *tqparentWidget = 0, const char *widgetname = 0);
~DictHTMLPart();
signals:
@@ -95,9 +96,10 @@ protected:
//********* QueryView ******************************************
-class QueryView : public QVBox
+class QueryView : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdict/sets.cpp b/kdict/sets.cpp
index 51dd7eb6..a7621b35 100644
--- a/kdict/sets.cpp
+++ b/kdict/sets.cpp
@@ -29,8 +29,8 @@
//********* DbSetsDialog ******************************************
-DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
- : KDialogBase(Plain, i18n("Database Sets"),Close | Help, Close, parent, name, false, true)
+DbSetsDialog::DbSetsDialog(TQWidget *tqparent, const char *name)
+ : KDialogBase(Plain, i18n("Database Sets"),Close | Help, Close, tqparent, name, false, true)
{
TQFrame* page=plainPage();
@@ -44,12 +44,12 @@ DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
topLayout->addLayout(subLayout1,0);
w_set = new TQComboBox(true,page);
- w_set->setFixedHeight(w_set->sizeHint().height());
+ w_set->setFixedHeight(w_set->tqsizeHint().height());
w_set->setInsertionPolicy (TQComboBox::NoInsertion);
w_set->insertStringList(sets);
connect(w_set, TQT_SIGNAL(activated(int)),this, TQT_SLOT(activateSet(int)));
TQLabel *l = new TQLabel(w_set, i18n("&Set:"),page);
- l->setMinimumSize(l->sizeHint());
+ l->setMinimumSize(l->tqsizeHint());
subLayout1->addWidget(l,0);
subLayout1->addWidget(w_set,1);
@@ -60,12 +60,12 @@ DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
subLayout1->addWidget(w_save,0);
TQPushButton *btn = new TQPushButton(i18n("&New"),page);
- btn->setMinimumSize(btn->sizeHint());
+ btn->setMinimumSize(btn->tqsizeHint());
connect(btn, TQT_SIGNAL(clicked()),this, TQT_SLOT(newPressed()));
subLayout1->addWidget(btn,0);
w_delete = new TQPushButton(i18n("&Delete"),page);
- w_delete->setMinimumSize(w_delete->sizeHint());
+ w_delete->setMinimumSize(w_delete->tqsizeHint());
connect(w_delete, TQT_SIGNAL(clicked()),this, TQT_SLOT(deletePressed()));
subLayout1->addWidget(w_delete,0);
@@ -83,7 +83,7 @@ DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
connect(w_leftBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(leftSelected(int)));
connect(w_leftBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(leftHighlighted(int)));
TQLabel *leftLabel = new TQLabel(w_leftBox, i18n("S&elected databases:"),page);
- leftLabel->setMinimumSize(leftLabel->sizeHint());
+ leftLabel->setMinimumSize(leftLabel->tqsizeHint());
subLayout2->addWidget(leftLabel,0,0);
subLayout2->addMultiCellWidget(w_leftBox,1,6,0,0);
@@ -111,7 +111,7 @@ DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
connect(w_rightBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(rightSelected(int)));
connect(w_rightBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(rightHighlighted(int)));
TQLabel *rightLabel = new TQLabel(w_rightBox, i18n("A&vailable databases:"),page);
- rightLabel->setMinimumSize(rightLabel->sizeHint());
+ rightLabel->setMinimumSize(rightLabel->tqsizeHint());
subLayout2->addWidget(rightLabel,0,2);
subLayout2->addMultiCellWidget(w_rightBox,1,6,2,2);
@@ -264,12 +264,12 @@ void DbSetsDialog::activateSet(int num)
w_set->clearEdit();
w_delete->setEnabled(false);
w_save->setEnabled(false);
- w_rightBox->repaint(true); // Workaround for repaint-bug
- w_leftBox->repaint(true); // Workaround for repaint-bug
+ w_rightBox->tqrepaint(true); // Workaround for tqrepaint-bug
+ w_leftBox->tqrepaint(true); // Workaround for tqrepaint-bug
} else {
w_set->setCurrentItem(num);
for (unsigned int i=0;i<global->serverDatabases.count();i++)
- if (global->databaseSets.at(num)->findIndex(global->serverDatabases[i])>0)
+ if (global->databaseSets.at(num)->tqfindIndex(global->serverDatabases[i])>0)
w_leftBox->insertItem(global->serverDatabases[i]);
else
w_rightBox->insertItem(global->serverDatabases[i]);
@@ -278,9 +278,9 @@ void DbSetsDialog::activateSet(int num)
w_delete->setEnabled(true);
w_save->setEnabled(true);
if (w_rightBox->count()==0)
- w_rightBox->repaint(true); // Workaround for repaint-bug
+ w_rightBox->tqrepaint(true); // Workaround for tqrepaint-bug
if (w_leftBox->count()==0)
- w_leftBox->repaint(true); // Workaround for repaint-bug
+ w_leftBox->tqrepaint(true); // Workaround for tqrepaint-bug
w_leftBox->clearSelection();
w_leftBox->centerCurrentItem();
w_rightBox->clearSelection();
diff --git a/kdict/sets.h b/kdict/sets.h
index 1baa3133..6e8397c6 100644
--- a/kdict/sets.h
+++ b/kdict/sets.h
@@ -27,10 +27,11 @@ class TQListBox;
class DbSetsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- DbSetsDialog(TQWidget *parent=0, const char *name=0);
+ DbSetsDialog(TQWidget *tqparent=0, const char *name=0);
signals:
diff --git a/kdict/toplevel.cpp b/kdict/toplevel.cpp
index f0842512..48a5c30a 100644
--- a/kdict/toplevel.cpp
+++ b/kdict/toplevel.cpp
@@ -3,7 +3,7 @@
toplevel.cpp (part of The KDE Dictionary Client)
Copyright (C) 2000-2001 Christian Gebauer <gebauer@kde.org>
- (C) by Matthias Hölzer 1998
+ (C) by Matthias H�lzer 1998
This file is distributed under the Artistic License.
See LICENSE for details.
@@ -50,8 +50,8 @@ DictInterface *interface;
GlobalData *global;
-TopLevel::TopLevel(TQWidget* parent, const char* name)
- : DCOPObject("KDictIface"), KMainWindow(parent, name, WType_TopLevel),
+TopLevel::TopLevel(TQWidget* tqparent, const char* name)
+ : DCOPObject("KDictIface"), KMainWindow(tqparent, name, WType_TopLevel),
optDlg(0L), setsDlg(0L), stopRef(0)
{
kapp->dcopClient()->setDefaultObject(objId());
@@ -89,7 +89,7 @@ TopLevel::TopLevel(TQWidget* parent, const char* name)
if (global->showMatchList)
{ // show splitter, html view & match list
- splitter = new TQSplitter(TQSplitter::Horizontal,this);
+ splitter = new TQSplitter(Qt::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
queryView->reparent(splitter,0,queryView->pos(),true);
matchView->reparent(splitter,0,matchView->pos(),true);
@@ -203,7 +203,7 @@ bool TopLevel::setDatabase(TQString db)
{
kdDebug(5004) << "*DCOP call* TopLevel::setDatabase()" << endl;
- int newCurrent = global->databases.findIndex(db);
+ int newCurrent = global->databases.tqfindIndex(db);
if (newCurrent == -1)
return false;
else {
@@ -260,11 +260,11 @@ void TopLevel::define(const TQString &query)
void TopLevel::defineClipboard()
{
kdDebug(5004) << "TopLevel::defineClipboard()" << endl;
- kapp->clipboard()->setSelectionMode(true);
- TQString text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(true);
+ TQString text = kapp->tqclipboard()->text();
if (text.isEmpty()) {
- kapp->clipboard()->setSelectionMode(false);
- text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(false);
+ text = kapp->tqclipboard()->text();
}
define(text);
}
@@ -281,11 +281,11 @@ void TopLevel::match(const TQString &query)
void TopLevel::matchClipboard()
{
kdDebug(5004) << "TopLevel::matchClipboard()" << endl;
- kapp->clipboard()->setSelectionMode(true);
- TQString text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(true);
+ TQString text = kapp->tqclipboard()->text();
if (text.isEmpty()) {
- kapp->clipboard()->setSelectionMode(false);
- text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(false);
+ text = kapp->tqclipboard()->text();
}
match(text);
}
@@ -308,46 +308,46 @@ bool TopLevel::queryClose()
void TopLevel::setupActions()
{
// file menu...
- actSave = KStdAction::save(queryView, TQT_SLOT(saveQuery()), actionCollection());
+ actSave = KStdAction::save(TQT_TQOBJECT(queryView), TQT_SLOT(saveQuery()), actionCollection());
actSave->setText(i18n("&Save As..."));
actSave->setEnabled(false);
- actPrint = KStdAction::print(queryView, TQT_SLOT(printQuery()), actionCollection());
+ actPrint = KStdAction::print(TQT_TQOBJECT(queryView), TQT_SLOT(printQuery()), actionCollection());
actPrint->setEnabled(false);
- actStartQuery = new KAction(i18n("St&art Query"),"reload", 0 , this,
+ actStartQuery = new KAction(i18n("St&art Query"),"reload", 0 , TQT_TQOBJECT(this),
TQT_SLOT(doDefine()), actionCollection(), "start_query");
- actStopQuery = new KAction(i18n("St&op Query"),"stop", 0 , this,
+ actStopQuery = new KAction(i18n("St&op Query"),"stop", 0 , TQT_TQOBJECT(this),
TQT_SLOT(stopClients()), actionCollection(), "stop_query");
actStopQuery->setEnabled(false);
- KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection());
// edit menu...
- actCopy = KStdAction::copy(queryView, TQT_SLOT(copySelection()), actionCollection());
+ actCopy = KStdAction::copy(TQT_TQOBJECT(queryView), TQT_SLOT(copySelection()), actionCollection());
actCopy->setEnabled(false);
- KStdAction::selectAll(queryView, TQT_SLOT(selectAll()), actionCollection());
- new KAction(i18n("&Define Clipboard Content"), "define_clip", 0 , this,
+ KStdAction::selectAll(TQT_TQOBJECT(queryView), TQT_SLOT(selectAll()), actionCollection());
+ new KAction(i18n("&Define Clipboard Content"), "define_clip", 0 , TQT_TQOBJECT(this),
TQT_SLOT(defineClipboard()), actionCollection(), "define_clipboard");
- new KAction(i18n("&Match Clipboard Content"), 0 , this,
+ new KAction(i18n("&Match Clipboard Content"), 0 , TQT_TQOBJECT(this),
TQT_SLOT(matchClipboard()), actionCollection(), "match_clipboard");
- KStdAction::find(queryView, TQT_SLOT(showFindDialog()), actionCollection());
+ KStdAction::find(TQT_TQOBJECT(queryView), TQT_SLOT(showFindDialog()), actionCollection());
// history menu...
actBack = new KToolBarPopupAction(i18n("&Back"), "back", KStdAccel::shortcut(KStdAccel::Back),
- queryView, TQT_SLOT(browseBack()), actionCollection(),"browse_back");
+ TQT_TQOBJECT(queryView), TQT_SLOT(browseBack()), actionCollection(),"browse_back");
actBack->setDelayed(true);
actBack->setStickyMenu(false);
actBack->setEnabled(false);
actForward = new KToolBarPopupAction(i18n("&Forward"), "forward", KStdAccel::shortcut(KStdAccel::Forward),
- queryView, TQT_SLOT(browseForward()), actionCollection(),"browse_forward");
+ TQT_TQOBJECT(queryView), TQT_SLOT(browseForward()), actionCollection(),"browse_forward");
actForward->setDelayed(true);
actForward->setStickyMenu(false);
actForward->setEnabled(false);
- new KAction(i18n("&Clear History"), 0 , this,
+ new KAction(i18n("&Clear History"), 0 , TQT_TQOBJECT(this),
TQT_SLOT(clearQueryHistory()), actionCollection(), "clear_history");
// server menu...
new KAction(i18n("&Get Capabilities"), 0 , interface,
TQT_SLOT(updateServer()), actionCollection(), "get_capabilities");
- new KAction(i18n("Edit &Database Sets..."), "edit", 0 , this,
+ new KAction(i18n("Edit &Database Sets..."), "edit", 0 , TQT_TQOBJECT(this),
TQT_SLOT(showSetsDialog()), actionCollection(), "edit_sets");
new KAction(i18n("&Summary"), 0 , interface,
TQT_SLOT(showDatabases()), actionCollection(), "db_summary");
@@ -360,17 +360,17 @@ void TopLevel::setupActions()
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- actShowMatchList = new KToggleAction(i18n("Show &Match List"), 0 , this,
+ actShowMatchList = new KToggleAction(i18n("Show &Match List"), 0 , TQT_TQOBJECT(this),
TQT_SLOT(toggleMatchListShow()), actionCollection(), "show_match");
actShowMatchList->setCheckedState(i18n("Hide &Match List"));
actShowMatchList->setChecked(global->showMatchList);
KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
- KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
- KStdAction::preferences(this, TQT_SLOT(showOptionsDialog()), actionCollection());
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showOptionsDialog()), actionCollection());
// toolbar...
- new KAction(i18n("Clear Input Field"), "query_erase", 0 , this,
+ new KAction(i18n("Clear Input Field"), "query_erase", 0 , TQT_TQOBJECT(this),
TQT_SLOT(clearInput()), actionCollection(), "clear_query");
actQueryLabel = new DictLabelAction(i18n("&Look for:"), actionCollection(), "look_label");
@@ -380,8 +380,8 @@ actionCollection());
actDbLabel = new DictLabelAction(i18n("&in"), actionCollection(), "in_label");
actDbCombo = new DictComboAction(i18n("Databases"), actionCollection(), "db_combo",false,false);
connect(actDbCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(databaseSelected(int)));
- actDefineBtn = new DictButtonAction(i18n("&Define"), this, TQT_SLOT(doDefine()), actionCollection(), "define_btn");
- actMatchBtn = new DictButtonAction(i18n("&Match"), this, TQT_SLOT(doMatch()), actionCollection(), "match_btn");
+ actDefineBtn = new DictButtonAction(i18n("&Define"), TQT_TQOBJECT(this), TQT_SLOT(doDefine()), actionCollection(), "define_btn");
+ actMatchBtn = new DictButtonAction(i18n("&Match"), TQT_TQOBJECT(this), TQT_SLOT(doMatch()), actionCollection(), "match_btn");
queryView->setActions(actBack,actForward,actQueryCombo);
}
@@ -394,12 +394,12 @@ void TopLevel::setupStatusBar()
TQString serverInfo;
if (global->authEnabled)
- serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
- .arg(getShortString(global->server,50))
- .arg(global->port);
+ serverInfo = TQString(" %1@%2:%3 ").tqarg(getShortString(global->user,50))
+ .tqarg(getShortString(global->server,50))
+ .tqarg(global->port);
else
- serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
- .arg(global->port);
+ serverInfo = TQString(" %1:%3 ").tqarg(getShortString(global->server,50))
+ .tqarg(global->port);
statusBar()->insertItem(serverInfo, 1,3);
statusBar()->setItemAlignment(1,AlignLeft | AlignVCenter);
}
@@ -503,7 +503,7 @@ void TopLevel::buildHistMenu()
unsigned int i = 0;
while ((i<10)&&(i<global->queryHistory.count())) {
- historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, TQT_SLOT(queryHistMenu()),
+ historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, TQT_TQOBJECT(this), TQT_SLOT(queryHistMenu()),
(TQObject*)0, global->queryHistory[i].utf8().data()) );
i++;
}
@@ -515,7 +515,7 @@ void TopLevel::buildHistMenu()
// process a query via the history menu
void TopLevel::queryHistMenu()
{
- TQCString name = sender()->name();
+ TQCString name = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
if (!name.isEmpty())
define(TQString::fromUtf8(name));
}
@@ -542,7 +542,7 @@ void TopLevel::stratDbChanged()
dbActionList.clear();
for (unsigned int i=0;i<global->serverDatabases.count();i++)
- dbActionList.append( new KAction(global->serverDatabases[i], 0, this, TQT_SLOT(dbInfoMenuClicked()),
+ dbActionList.append( new KAction(global->serverDatabases[i], 0, TQT_TQOBJECT(this), TQT_SLOT(dbInfoMenuClicked()),
(TQObject*)0, global->serverDatabases[i].utf8().data()) );
plugActionList("db_detail", dbActionList);
@@ -551,7 +551,7 @@ void TopLevel::stratDbChanged()
void TopLevel::dbInfoMenuClicked()
{
- TQCString name = sender()->name();
+ TQCString name = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
if (!name.isEmpty())
interface->showDbInfo(name);
}
@@ -641,7 +641,7 @@ void TopLevel::toggleMatchListShow()
else // list is not visible -> show it
{
global->showMatchList = true;
- splitter = new TQSplitter(TQSplitter::Horizontal,this);
+ splitter = new TQSplitter(Qt::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
setCentralWidget(splitter);
splitter->show();
@@ -746,12 +746,12 @@ void TopLevel::optionsChanged()
{
TQString serverInfo;
if (global->authEnabled)
- serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
- .arg(getShortString(global->server,50))
- .arg(global->port);
+ serverInfo = TQString(" %1@%2:%3 ").tqarg(getShortString(global->user,50))
+ .tqarg(getShortString(global->server,50))
+ .tqarg(global->port);
else
- serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
- .arg(global->port);
+ serverInfo = TQString(" %1:%3 ").tqarg(getShortString(global->server,50))
+ .tqarg(global->port);
statusBar()->changeItem(serverInfo,1);
interface->serverChanged(); // inform client
queryView->optionsChanged(); // inform html-view
diff --git a/kdict/toplevel.h b/kdict/toplevel.h
index 256668e1..47295405 100644
--- a/kdict/toplevel.h
+++ b/kdict/toplevel.h
@@ -38,12 +38,13 @@ class DbSetsDialog;
class TopLevel : public KMainWindow, virtual public KDictIface
{
Q_OBJECT
+ TQ_OBJECT
friend class QueryView;
public:
- TopLevel(TQWidget* parent = 0, const char* name = 0);
+ TopLevel(TQWidget* tqparent = 0, const char* name = 0);
~TopLevel();
void normalStartup(); // called when started without commandline parameters