summaryrefslogtreecommitdiffstats
path: root/kdict
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kdict
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdict')
-rw-r--r--kdict/actions.cpp56
-rw-r--r--kdict/actions.h44
-rw-r--r--kdict/applet/kdictapplet.cpp120
-rw-r--r--kdict/applet/kdictapplet.h26
-rw-r--r--kdict/application.cpp4
-rw-r--r--kdict/application.h4
-rw-r--r--kdict/dcopinterface.h18
-rw-r--r--kdict/dict.cpp100
-rw-r--r--kdict/dict.h56
-rw-r--r--kdict/matchview.cpp144
-rw-r--r--kdict/matchview.h48
-rw-r--r--kdict/options.cpp254
-rw-r--r--kdict/options.h124
-rw-r--r--kdict/queryview.cpp142
-rw-r--r--kdict/queryview.h46
-rw-r--r--kdict/sets.cpp78
-rw-r--r--kdict/sets.h10
-rw-r--r--kdict/toplevel.cpp174
-rw-r--r--kdict/toplevel.h36
19 files changed, 742 insertions, 742 deletions
diff --git a/kdict/actions.cpp b/kdict/actions.cpp
index 5ca1aade..2496d1b7 100644
--- a/kdict/actions.cpp
+++ b/kdict/actions.cpp
@@ -17,14 +17,14 @@
#include "actions.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
#include <ktoolbar.h>
-DictComboAction::DictComboAction( const QString &text, QObject *parent, const char *name,
+DictComboAction::DictComboAction( const TQString &text, TQObject *parent, const char *name,
bool editable, bool autoSized )
: KAction( text, 0, parent, name ), m_editable(editable), m_autoSized(autoSized), m_compMode(KGlobalSettings::completionMode())
{
@@ -36,7 +36,7 @@ DictComboAction::~DictComboAction()
}
-int DictComboAction::plug( QWidget *widget, int index )
+int DictComboAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -50,15 +50,15 @@ int DictComboAction::plug( QWidget *widget, int index )
bar->setItemAutoSized(id_,m_autoSized);
if ( m_combo ) {
- connect(bar->getCombo(id_), SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&)));
- connect(bar->getCombo(id_), SIGNAL(activated(int)), SLOT(slotComboActivated(int)));
+ connect(bar->getCombo(id_), TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
+ connect(bar->getCombo(id_), TQT_SIGNAL(activated(int)), TQT_SLOT(slotComboActivated(int)));
if (m_editable)
- m_combo->setInsertionPolicy( QComboBox::NoInsertion );
+ m_combo->setInsertionPolicy( TQComboBox::NoInsertion );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -66,7 +66,7 @@ int DictComboAction::plug( QWidget *widget, int index )
}
-void DictComboAction::unplug( QWidget *widget )
+void DictComboAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -85,7 +85,7 @@ void DictComboAction::unplug( QWidget *widget )
}
-QWidget* DictComboAction::widget()
+TQWidget* DictComboAction::widget()
{
return m_combo;
}
@@ -98,12 +98,12 @@ void DictComboAction::setFocus()
}
-QString DictComboAction::currentText() const
+TQString DictComboAction::currentText() const
{
if (m_combo)
return m_combo->currentText();
else
- return QString::null;
+ return TQString::null;
}
void DictComboAction::selectAll()
@@ -116,7 +116,7 @@ void DictComboAction::selectAll()
}
-void DictComboAction::setEditText(const QString &s)
+void DictComboAction::setEditText(const TQString &s)
{
if (m_combo && m_editable)
m_combo->setEditText(s);
@@ -147,7 +147,7 @@ void DictComboAction::clear()
}
-void DictComboAction::setList(QStringList items)
+void DictComboAction::setList(TQStringList items)
{
if (m_combo) {
m_combo->clear();
@@ -184,7 +184,7 @@ void DictComboAction::slotComboActivated(int i)
}
-void DictComboAction::slotComboActivated(const QString &s)
+void DictComboAction::slotComboActivated(const TQString &s)
{
emit(activated(s));
}
@@ -193,7 +193,7 @@ void DictComboAction::slotComboActivated(const QString &s)
//*********************************************************************************
-DictLabelAction::DictLabelAction( const QString &text, QObject *parent, const char *name )
+DictLabelAction::DictLabelAction( const TQString &text, TQObject *parent, const char *name )
: KAction( text, 0, parent, name )
{
}
@@ -204,7 +204,7 @@ DictLabelAction::~DictLabelAction()
}
-int DictLabelAction::plug( QWidget *widget, int index )
+int DictLabelAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -212,7 +212,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
int id = KAction::getToolButtonID();
- QLabel *label = new QLabel( text(), widget, "kde toolbar widget" );
+ TQLabel *label = new TQLabel( text(), widget, "kde toolbar widget" );
label->setMinimumWidth(label->sizeHint().width());
label->setBackgroundMode( Qt::PaletteButton );
label->setAlignment(AlignCenter | AlignVCenter);
@@ -222,7 +222,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
m_label = label;
@@ -233,7 +233,7 @@ int DictLabelAction::plug( QWidget *widget, int index )
}
-void DictLabelAction::unplug( QWidget *widget )
+void DictLabelAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -252,7 +252,7 @@ void DictLabelAction::unplug( QWidget *widget )
}
-void DictLabelAction::setBuddy(QWidget *buddy)
+void DictLabelAction::setBuddy(TQWidget *buddy)
{
if (m_label && buddy)
m_label->setBuddy(buddy);
@@ -262,8 +262,8 @@ void DictLabelAction::setBuddy(QWidget *buddy)
//*********************************************************************************
-DictButtonAction::DictButtonAction( const QString& text, QObject* receiver,
- const char* slot, QObject* parent, const char* name )
+DictButtonAction::DictButtonAction( const TQString& text, TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name )
: KAction( text, 0, receiver, slot, parent, name )
{
}
@@ -274,7 +274,7 @@ DictButtonAction::~DictButtonAction()
}
-int DictButtonAction::plug( QWidget *widget, int index )
+int DictButtonAction::plug( TQWidget *widget, int index )
{
if ( widget->inherits( "KToolBar" ) )
{
@@ -282,14 +282,14 @@ int DictButtonAction::plug( QWidget *widget, int index )
int id = KAction::getToolButtonID();
- QPushButton *button = new QPushButton( text(), widget );
+ TQPushButton *button = new TQPushButton( text(), widget );
button->adjustSize();
- connect(button,SIGNAL(clicked()),this,SLOT(activate()));
+ connect(button,TQT_SIGNAL(clicked()),this,TQT_SLOT(activate()));
tb->insertWidget( id, button->width(), button, index );
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
m_button = button;
@@ -300,7 +300,7 @@ int DictButtonAction::plug( QWidget *widget, int index )
}
-void DictButtonAction::unplug( QWidget *widget )
+void DictButtonAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
diff --git a/kdict/actions.h b/kdict/actions.h
index 568a9f7c..97759af4 100644
--- a/kdict/actions.h
+++ b/kdict/actions.h
@@ -18,8 +18,8 @@
#ifndef _ACTIONS_H_
#define _ACTIONS_H_
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kglobalsettings.h>
@@ -33,38 +33,38 @@ class DictComboAction : public KAction
Q_OBJECT
public:
- DictComboAction( const QString& text, QObject* parent,
+ DictComboAction( const TQString& text, TQObject* parent,
const char* name, bool editable, bool autoSized );
~DictComboAction();
- virtual int plug( QWidget *w, int index = -1 );
- virtual void unplug( QWidget *w );
+ virtual int plug( TQWidget *w, int index = -1 );
+ virtual void unplug( TQWidget *w );
- QWidget* widget();
+ TQWidget* widget();
void setFocus();
- QString currentText() const;
+ TQString currentText() const;
void selectAll();
- void setEditText(const QString &s);
+ void setEditText(const TQString &s);
void setCurrentItem(int index);
void clearEdit();
void clear();
- void setList(QStringList items);
+ void setList(TQStringList items);
KGlobalSettings::Completion completionMode();
void setCompletionMode(KGlobalSettings::Completion mode);
signals:
void activated(int);
- void activated(const QString&);
+ void activated(const TQString&);
private slots:
void slotComboActivated(int);
- void slotComboActivated(const QString&);
+ void slotComboActivated(const TQString&);
private:
- QGuardedPtr<KComboBox> m_combo;
+ TQGuardedPtr<KComboBox> m_combo;
bool m_editable, m_autoSized;
KGlobalSettings::Completion m_compMode;
};
@@ -75,16 +75,16 @@ class DictLabelAction : public KAction
Q_OBJECT
public:
- DictLabelAction( const QString &text, QObject *parent = 0, const char *name = 0 );
+ DictLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 );
~DictLabelAction();
- virtual int plug( QWidget *widget, int index = -1 );
- virtual void unplug( QWidget *widget );
+ virtual int plug( TQWidget *widget, int index = -1 );
+ virtual void unplug( TQWidget *widget );
- void setBuddy(QWidget *buddy);
+ void setBuddy(TQWidget *buddy);
private:
- QGuardedPtr<QLabel> m_label;
+ TQGuardedPtr<TQLabel> m_label;
};
@@ -94,18 +94,18 @@ class DictButtonAction : public KAction
Q_OBJECT
public:
- DictButtonAction( const QString& text, QObject* receiver,
- const char* slot, QObject* parent, const char* name );
+ DictButtonAction( const TQString& text, TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name );
~DictButtonAction();
- virtual int plug( QWidget *w, int index = -1 );
- virtual void unplug( QWidget *w );
+ virtual int plug( TQWidget *w, int index = -1 );
+ virtual void unplug( TQWidget *w );
int widthHint();
void setWidth(int width);
private:
- QGuardedPtr<QPushButton> m_button;
+ TQGuardedPtr<TQPushButton> m_button;
};
#endif
diff --git a/kdict/applet/kdictapplet.cpp b/kdict/applet/kdictapplet.cpp
index ad907864..6e45de52 100644
--- a/kdict/applet/kdictapplet.cpp
+++ b/kdict/applet/kdictapplet.cpp
@@ -17,11 +17,11 @@
------------------------------------------------------------- */
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kconfig.h>
#include <kcombobox.h>
@@ -36,7 +36,7 @@
//********* PopupBox ********************************************
PopupBox::PopupBox()
- : QHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true)
+ : TQHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true)
{
}
@@ -56,11 +56,11 @@ bool PopupBox::showBox()
}
-void PopupBox::hideEvent(QHideEvent *)
+void PopupBox::hideEvent(TQHideEvent *)
{
emit(hidden());
popupEnabled = false;
- QTimer::singleShot(100, this, SLOT(enablePopup()));
+ TQTimer::singleShot(100, this, TQT_SLOT(enablePopup()));
}
@@ -74,7 +74,7 @@ void PopupBox::enablePopup()
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kdictapplet");
return new DictApplet(configFile, KPanelApplet::Stretch, 0, parent, "kdictapplet");
@@ -82,56 +82,56 @@ extern "C"
}
-DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name)
+DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name), waiting(0)
{
// first the widgets for a horizontal panel
- baseWidget = new QWidget(this);
- QGridLayout *baseLay = new QGridLayout(baseWidget,2,6,0,1);
+ baseWidget = new TQWidget(this);
+ TQGridLayout *baseLay = new TQGridLayout(baseWidget,2,6,0,1);
- textLabel = new QLabel(i18n("Dictionary:"), baseWidget);
+ textLabel = new TQLabel(i18n("Dictionary:"), baseWidget);
textLabel->setBackgroundOrigin(AncestorOrigin);
- QFont f(textLabel->font());
+ TQFont f(textLabel->font());
f.setPixelSize(12);
textLabel->setFont(f);
baseLay->addWidget(textLabel,0,1);
- QToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict"));
+ TQToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict"));
- iconLabel = new QLabel(baseWidget);
+ iconLabel = new TQLabel(baseWidget);
iconLabel->setBackgroundOrigin(AncestorOrigin);
- QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true);
+ 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->setFixedWidth(pm.width()+4);
- QToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
+ TQToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
f.setPixelSize(10);
- clipboardBtn = new QPushButton(i18n("C"),baseWidget);
+ clipboardBtn = new TQPushButton(i18n("C"),baseWidget);
clipboardBtn->setBackgroundOrigin(AncestorOrigin);
clipboardBtn->setFont(f);
clipboardBtn->setFixedSize(16,16);
- connect(clipboardBtn, SIGNAL(clicked()), SLOT(queryClipboard()));
+ connect(clipboardBtn, TQT_SIGNAL(clicked()), TQT_SLOT(queryClipboard()));
baseLay->addWidget(clipboardBtn,0,3);
- QToolTip::add(clipboardBtn,i18n("Define selected text"));
+ TQToolTip::add(clipboardBtn,i18n("Define selected text"));
- defineBtn = new QPushButton(i18n("D"),baseWidget);
+ defineBtn = new TQPushButton(i18n("D"),baseWidget);
defineBtn->setBackgroundOrigin(AncestorOrigin);
defineBtn->setFont(f);
defineBtn->setFixedSize(16,16);
defineBtn->setEnabled(false);
- connect(defineBtn, SIGNAL(clicked()), SLOT(startDefine()));
+ connect(defineBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startDefine()));
baseLay->addWidget(defineBtn,0,4);
- QToolTip::add(defineBtn,i18n("Define word/phrase"));
+ TQToolTip::add(defineBtn,i18n("Define word/phrase"));
- matchBtn = new QPushButton(i18n("M"),baseWidget);
+ matchBtn = new TQPushButton(i18n("M"),baseWidget);
matchBtn->setBackgroundOrigin(AncestorOrigin);
matchBtn->setFont(f);
matchBtn->setFixedSize(16,16);
matchBtn->setEnabled(false);
- connect(matchBtn, SIGNAL(clicked()), SLOT(startMatch()));
+ connect(matchBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startMatch()));
baseLay->addWidget(matchBtn,0,5);
- QToolTip::add(matchBtn,i18n("Find matching definitions"));
+ TQToolTip::add(matchBtn,i18n("Find matching definitions"));
completionObject = new KCompletion();
@@ -141,37 +141,37 @@ DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidge
internalCombo->setFocus();
internalCombo->clearEdit();
internalCombo->lineEdit()->installEventFilter( this );
- connect(internalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&)));
- connect(internalCombo, SIGNAL(textChanged(const QString&)), SLOT(comboTextChanged(const QString&)));
- QToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict"));
+ connect(internalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
+ connect(internalCombo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(comboTextChanged(const TQString&)));
+ TQToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict"));
baseLay->addMultiCellWidget(internalCombo,1,1,1,5);
baseLay->setColStretch(2,1);
// widgets for a vertical panel
- verticalBtn = new QPushButton(this);
- connect(verticalBtn, SIGNAL(pressed()), SLOT(showExternalCombo()));
- QToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict"));
+ verticalBtn = new TQPushButton(this);
+ connect(verticalBtn, TQT_SIGNAL(pressed()), TQT_SLOT(showExternalCombo()));
+ TQToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict"));
popupBox = new PopupBox();
popupBox->setFixedSize(160, 22);
- connect(popupBox, SIGNAL(hidden()), SLOT(externalComboHidden()));
+ connect(popupBox, TQT_SIGNAL(hidden()), TQT_SLOT(externalComboHidden()));
externalCombo = new KHistoryCombo(popupBox);
externalCombo->setCompletionObject(completionObject);
- connect(externalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&)));
+ connect(externalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
externalCombo->setFixedSize(160, externalCombo->sizeHint().height());
- connect(internalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(updateCompletionMode(KGlobalSettings::Completion)));
- connect(externalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(updateCompletionMode(KGlobalSettings::Completion)));
+ connect(internalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
+ connect(externalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
// restore history and completion list
KConfig *c = config();
c->setGroup("General");
- QStringList list = c->readListEntry("Completion list");
+ TQStringList list = c->readListEntry("Completion list");
completionObject->setItems(list);
int mode = c->readNumEntry("Completion mode",
KGlobalSettings::completionMode());
@@ -190,7 +190,7 @@ DictApplet::~DictApplet()
KConfig *c = config();
c->setGroup("General");
- QStringList list = completionObject->items();
+ TQStringList list = completionObject->items();
c->writeEntry("Completion list", list);
c->writeEntry("Completion mode", (int) internalCombo->completionMode());
@@ -217,7 +217,7 @@ int DictApplet::heightForWidth(int width) const
}
-void DictApplet::resizeEvent(QResizeEvent*)
+void DictApplet::resizeEvent(TQResizeEvent*)
{
if (orientation() == Horizontal) {
verticalBtn->hide();
@@ -252,22 +252,22 @@ void DictApplet::resizeEvent(QResizeEvent*)
verticalBtn->setFixedSize(width(),width());
KIcon::StdSizes sz = width() < 32 ? KIcon::SizeSmall : (width() < 48 ? KIcon::SizeMedium : KIcon::SizeLarge);
- QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true);
+ TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true);
verticalBtn->setPixmap(pm);
}
}
-bool DictApplet::eventFilter( QObject *o, QEvent * e)
+bool DictApplet::eventFilter( TQObject *o, TQEvent * e)
{
- if (e->type() == QEvent::MouseButtonRelease)
+ if (e->type() == TQEvent::MouseButtonRelease)
emit requestFocus();
return KPanelApplet::eventFilter(o, e);
}
-void DictApplet::sendCommand(const QCString &fun, const QString &data)
+void DictApplet::sendCommand(const TQCString &fun, const TQString &data)
{
if (waiting > 0) {
waiting = 1;
@@ -282,7 +282,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data)
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
} else {
QCStringList list = client->remoteObjects("kdict");
@@ -290,7 +290,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data)
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
}
}
@@ -309,13 +309,13 @@ void DictApplet::sendDelayedCommand()
DCOPClient *client = kapp->dcopClient();
if (!client->isApplicationRegistered("kdict")) {
waiting++;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
} else {
QCStringList list = client->remoteObjects("kdict");
if (list.findIndex("KDictIface")==-1) {
waiting++;
- QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
+ TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
}
}
@@ -325,9 +325,9 @@ void DictApplet::sendDelayedCommand()
}
-void DictApplet::startQuery(const QString &s)
+void DictApplet::startQuery(const TQString &s)
{
- QString query = s.stripWhiteSpace();
+ TQString query = s.stripWhiteSpace();
if (query.isEmpty())
return;
@@ -336,14 +336,14 @@ void DictApplet::startQuery(const QString &s)
internalCombo->clearEdit();
externalCombo->clearEdit();
- sendCommand("definePhrase(QString)",query);
+ sendCommand("definePhrase(TQString)",query);
if (orientation() == Vertical)
popupBox->hide();
}
-void DictApplet::comboTextChanged(const QString &s)
+void DictApplet::comboTextChanged(const TQString &s)
{
defineBtn->setEnabled(!s.isEmpty());
matchBtn->setEnabled(!s.isEmpty());
@@ -352,7 +352,7 @@ void DictApplet::comboTextChanged(const QString &s)
void DictApplet::queryClipboard()
{
- sendCommand("defineClipboardContent()",QString::null);
+ sendCommand("defineClipboardContent()",TQString::null);
}
@@ -364,23 +364,23 @@ void DictApplet::startDefine()
void DictApplet::startMatch()
{
- QString query = internalCombo->currentText().stripWhiteSpace();
+ TQString query = internalCombo->currentText().stripWhiteSpace();
internalCombo->addToHistory(query);
externalCombo->addToHistory(query);
internalCombo->clearEdit();
externalCombo->clearEdit();
- sendCommand("matchPhrase(QString)",query);
+ sendCommand("matchPhrase(TQString)",query);
}
void DictApplet::showExternalCombo()
{
- QPoint p;
+ TQPoint p;
if (position() == pLeft)
- p = mapToGlobal(QPoint(-popupBox->width()-1, 0));
+ p = mapToGlobal(TQPoint(-popupBox->width()-1, 0));
else
- p = mapToGlobal(QPoint(width()+1, 0));
+ p = mapToGlobal(TQPoint(width()+1, 0));
popupBox->move(p);
if (popupBox->showBox())
externalCombo->setFocus();
diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h
index a9738148..99a7cec4 100644
--- a/kdict/applet/kdictapplet.h
+++ b/kdict/applet/kdictapplet.h
@@ -20,7 +20,7 @@
#ifndef _DICTAPPLET_H_
#define _DICTAPPLET_H_
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kpanelapplet.h>
class QLabel;
@@ -47,7 +47,7 @@ public slots:
void enablePopup();
protected:
- void hideEvent(QHideEvent *);
+ void hideEvent(TQHideEvent *);
private:
bool popupEnabled;
@@ -61,22 +61,22 @@ class DictApplet : public KPanelApplet
Q_OBJECT
public:
- DictApplet(const QString& configFile, Type t = Stretch, int actions = 0, QWidget *parent = 0, const char *name = 0);
+ DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *parent = 0, const char *name = 0);
virtual ~DictApplet();
int widthForHeight(int height) const;
int heightForWidth(int width) const;
protected:
- void resizeEvent(QResizeEvent*);
- bool eventFilter( QObject *, QEvent * );
+ void resizeEvent(TQResizeEvent*);
+ bool eventFilter( TQObject *, TQEvent * );
- void sendCommand(const QCString &fun, const QString &data);
+ void sendCommand(const TQCString &fun, const TQString &data);
protected slots:
void sendDelayedCommand();
- void startQuery(const QString&);
- void comboTextChanged(const QString&);
+ void startQuery(const TQString&);
+ void comboTextChanged(const TQString&);
void queryClipboard();
void startDefine();
void startMatch();
@@ -87,14 +87,14 @@ protected slots:
private:
KHistoryCombo *internalCombo, *externalCombo;
KCompletion *completionObject;
- QLabel *textLabel, *iconLabel;
- QPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn;
- QWidget *baseWidget;
+ TQLabel *textLabel, *iconLabel;
+ TQPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn;
+ TQWidget *baseWidget;
PopupBox *popupBox;
int waiting;
- QCString delayedFunc;
- QString delayedData;
+ TQCString delayedFunc;
+ TQString delayedData;
};
diff --git a/kdict/application.cpp b/kdict/application.cpp
index 28e3a398..b4239929 100644
--- a/kdict/application.cpp
+++ b/kdict/application.cpp
@@ -48,10 +48,10 @@ int Application::newInstance()
{
if (args->count()>0)
{
- QString phrase;
+ TQString phrase;
for (int i=0;i<args->count();i++)
{
- phrase += QString::fromLocal8Bit(args->arg(i));
+ phrase += TQString::fromLocal8Bit(args->arg(i));
if (i+1 < args->count())
phrase += " ";
}
diff --git a/kdict/application.h b/kdict/application.h
index eddb7f44..e5d46c67 100644
--- a/kdict/application.h
+++ b/kdict/application.h
@@ -13,7 +13,7 @@
#define APPLICATION_H
#include <kuniqueapplication.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#define KDICT_VERSION "0.6"
@@ -32,7 +32,7 @@ class Application : public KUniqueApplication
int newInstance();
private:
- QGuardedPtr<TopLevel> m_mainWindow;
+ TQGuardedPtr<TopLevel> m_mainWindow;
};
diff --git a/kdict/dcopinterface.h b/kdict/dcopinterface.h
index f088a842..347a2e15 100644
--- a/kdict/dcopinterface.h
+++ b/kdict/dcopinterface.h
@@ -17,7 +17,7 @@
#define _DCOPINTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KDictIface : virtual public DCOPObject
{
@@ -30,20 +30,20 @@ k_dcop:
virtual void makeActiveWindow() = 0;
/** define/match a word/phrase **/
- virtual void definePhrase(QString phrase) = 0;
- virtual void matchPhrase(QString phrase) = 0;
+ virtual void definePhrase(TQString phrase) = 0;
+ virtual void matchPhrase(TQString phrase) = 0;
virtual void defineClipboardContent() = 0;
virtual void matchClipboardContent() = 0;
/** get info **/
- virtual QStringList getDatabases() = 0;
- virtual QString currentDatabase() = 0;
- virtual QStringList getStrategies() = 0;
- virtual QString currentStrategy() = 0;
+ virtual TQStringList getDatabases() = 0;
+ virtual TQString currentDatabase() = 0;
+ virtual TQStringList getStrategies() = 0;
+ virtual TQString currentStrategy() = 0;
/** set current database/strategy (returns true on success) **/
- virtual bool setDatabase(QString db) = 0;
- virtual bool setStrategy(QString strategy) = 0;
+ virtual bool setDatabase(TQString db) = 0;
+ virtual bool setStrategy(TQString strategy) = 0;
/** navigate in history **/
virtual bool historyGoBack() = 0;
diff --git a/kdict/dict.cpp b/kdict/dict.cpp
index b36f1ac1..74395d4a 100644
--- a/kdict/dict.cpp
+++ b/kdict/dict.cpp
@@ -22,8 +22,8 @@
#include "options.h"
#include "dict.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <klocale.h>
#include <kdebug.h>
@@ -41,9 +41,9 @@
//********* JobData ******************************************
-JobData::JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport,
- int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled,
- QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout)
+JobData::JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport,
+ int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled,
+ TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout)
: type(Ntype), error(ErrNoErr), canceled(false), numFetched(0), newServer(NnewServer),server(Nserver), port(Nport),
timeout(Ntimeout), pipeSize(NpipeSize), idleHold(NidleHold), encoding(Nencoding), authEnabled(NAuthEnabled),
user(Nuser), secret(Nsecret), headLayout(NheadLayout)
@@ -133,7 +133,7 @@ void DictAsyncClient::waitForWork()
if ((tcpSocket!=-1)&&(job->newServer))
doQuit();
- codec = QTextCodec::codecForName(job->encoding.latin1());
+ codec = TQTextCodec::codecForName(job->encoding.latin1());
input[0] = 0; //terminate string
thisLine = input;
nextLine = input;
@@ -181,10 +181,10 @@ void DictAsyncClient::waitForWork()
void DictAsyncClient::define()
{
- QString command;
+ TQString command;
job->defines.clear();
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = job->databases.begin(); it != job->databases.end(); ++it) {
command = "define ";
command += *it;
@@ -201,7 +201,7 @@ void DictAsyncClient::define()
job->strategy = ".";
if (!match())
return;
- job->result = QString::null;
+ job->result = TQString::null;
if (job->numFetched == 0) {
resultAppend("<body>\n<p class=\"heading\">\n");
resultAppend(i18n("No definitions found for \'%1'.").arg(job->query));
@@ -212,8 +212,8 @@ void DictAsyncClient::define()
resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").arg(job->query));
resultAppend("</p>\n<table width=\"100%\" cols=2>\n");
- QString lastDb;
- QStringList::iterator it;
+ TQString lastDb;
+ TQStringList::iterator it;
for (it = job->matches.begin(); it != job->matches.end(); ++it) {
int pos = (*it).find(' ');
if (pos != -1) {
@@ -241,10 +241,10 @@ void DictAsyncClient::define()
}
-QString htmlString(const QString &raw)
+TQString htmlString(const TQString &raw)
{
unsigned int len=raw.length();
- QString ret;
+ TQString ret;
for (unsigned int i=0; i<len; i++) {
switch (raw[i]) {
@@ -259,13 +259,13 @@ QString htmlString(const QString &raw)
}
-QString generateDefineLink(const QString &raw)
+TQString generateDefineLink(const TQString &raw)
{
- QRegExp http("http://[^\\s<>()\"|\\[\\]{}]+");
- QRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+");
+ TQRegExp http("http://[^\\s<>()\"|\\[\\]{}]+");
+ TQRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+");
int matchPos=0, matchLen=0;
bool httpMatch=false;
- QString ret;
+ TQString ret;
matchPos = http.search(raw);
matchLen = http.matchedLength();
@@ -305,8 +305,8 @@ QString generateDefineLink(const QString &raw)
bool DictAsyncClient::getDefinitions()
{
- QCString lastDb,bracketBuff;
- QStrList hashList;
+ TQCString lastDb,bracketBuff;
+ TQStrList hashList;
char *s;
int defCount,response;
@@ -317,7 +317,7 @@ bool DictAsyncClient::getDefinitions()
defCount = 0;
cmdBuffer = "";
do {
- QStringList::iterator it = job->defines.begin();
+ TQStringList::iterator it = job->defines.begin();
cmdBuffer += codec->fromUnicode(*it);
defCount++;
job->defines.remove(it);
@@ -352,7 +352,7 @@ bool DictAsyncClient::getDefinitions()
}
} else {
job->error = JobData::ErrServerError;
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(thisLine);
doQuit();
return false;
@@ -390,7 +390,7 @@ bool DictAsyncClient::getDefinitions()
bodyDone = true;
}
if (!bodyDone) {
- context.update(QCString(line));
+ context.update(TQCString(line));
if (!bracketBuff.isEmpty()) {
s = strchr(line,'}');
if (!s)
@@ -461,7 +461,7 @@ bool DictAsyncClient::getDefinitions()
bool DictAsyncClient::match()
{
- QStringList::iterator it = job->databases.begin();
+ TQStringList::iterator it = job->databases.begin();
int response;
cmdBuffer = "";
@@ -792,13 +792,13 @@ void DictAsyncClient::openConnection()
if (ks.status() == IO_LookupError)
job->error = JobData::ErrBadHost;
else if (ks.status() == IO_ConnectError) {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrConnect;
} else if (ks.status() == IO_TimeOutError)
job->error = JobData::ErrTimeout;
else {
- job->result = QString::null;
+ job->result = TQString::null;
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrCommunication;
}
@@ -827,7 +827,7 @@ void DictAsyncClient::openConnection()
}
KMD5 context;
- context.update(QCString(msgId));
+ context.update(TQCString(msgId));
context.update(job->secret.local8Bit());
cmdBuffer += "auth " + job->user.local8Bit() + " ";
@@ -898,7 +898,7 @@ bool DictAsyncClient::waitForRead()
if (ret == -1) { // select failed
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
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 = QString::null;
+ job->result = TQString::null;
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -930,7 +930,7 @@ bool DictAsyncClient::waitForRead()
}
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -961,7 +961,7 @@ bool DictAsyncClient::waitForWrite()
if (ret == -1) { // select failed
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
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 = QString::null;
+ job->result = TQString::null;
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -992,7 +992,7 @@ bool DictAsyncClient::waitForWrite()
return true;
}
if (job) {
- job->result = QString::null;
+ job->result = TQString::null;
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 = QString::null;
+ job->result = TQString::null;
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 = QString::null;
+ job->result = TQString::null;
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 = QString::null;
+ job->result = TQString::null;
resultAppend(codec->toUnicode(thisLine,len));
switch (strtol(thisLine,0L,0)) {
@@ -1167,7 +1167,7 @@ void DictAsyncClient::resultAppend(const char* str)
}
-void DictAsyncClient::resultAppend(QString str)
+void DictAsyncClient::resultAppend(TQString str)
{
if (job)
job->result += str;
@@ -1203,8 +1203,8 @@ DictInterface::DictInterface()
kapp->exit(1);
}
- notifier = new QSocketNotifier(fdPipeIn[0],QSocketNotifier::Read,this);
- connect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone()));
+ notifier = new TQSocketNotifier(fdPipeIn[0],TQSocketNotifier::Read,this);
+ connect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone()));
// initialize the KSocks stuff in the main thread, otherwise we get
// strange effects on FreeBSD
@@ -1222,7 +1222,7 @@ DictInterface::DictInterface()
DictInterface::~DictInterface()
{
- disconnect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone()));
+ disconnect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone()));
if (0!=pthread_cancel(threadID))
kdWarning() << "pthread_cancel failed!" << endl;
@@ -1271,7 +1271,7 @@ void DictInterface::stop()
}
-void DictInterface::define(const QString &query)
+void DictInterface::define(const TQString &query)
{
JobData *newJob = generateQuery(JobData::TDefine,query);
if (newJob)
@@ -1279,7 +1279,7 @@ void DictInterface::define(const QString &query)
}
-void DictInterface::getDefinitions(QStringList query)
+void DictInterface::getDefinitions(TQStringList query)
{
JobData *newjob = new JobData(JobData::TGetDefinitions,newServer,global->server,global->port,
global->idleHold,global->timeout,global->pipeSize, global->encoding,global->authEnabled,
@@ -1290,7 +1290,7 @@ void DictInterface::getDefinitions(QStringList query)
}
-void DictInterface::match(const QString &query)
+void DictInterface::match(const TQString &query)
{
JobData *newJob = generateQuery(JobData::TMatch,query);
@@ -1306,9 +1306,9 @@ void DictInterface::match(const QString &query)
// fetch detailed db info
-void DictInterface::showDbInfo(const QString &db)
+void DictInterface::showDbInfo(const TQString &db)
{
- QString ndb = db.simplifyWhiteSpace(); // cleanup query string
+ TQString ndb = db.simplifyWhiteSpace(); // cleanup query string
if (ndb.isEmpty())
return;
if (ndb.length()>100) // shorten if necessary
@@ -1362,7 +1362,7 @@ void DictInterface::updateServer()
// client-thread ended
void DictInterface::clientDone()
{
- QString message;
+ TQString message;
cleanPipes(); // read from pipe so that notifier doesn´t fire again
@@ -1372,7 +1372,7 @@ void DictInterface::clientDone()
}
clientDoneInProgress = true;
- QStringList::iterator it;
+ TQStringList::iterator it;
JobData* job = jobList.getFirst();
if (!job->canceled) { // non-interupted job?
if (JobData::ErrNoErr == job->error) {
@@ -1444,7 +1444,7 @@ void DictInterface::clientDone()
emit resultReady(job->result, job->query);
}
} else {
- QString errMsg;
+ TQString errMsg;
switch (job->error) {
case JobData::ErrCommunication:
errMsg = i18n("Communication error:\n\n");
@@ -1514,14 +1514,14 @@ void DictInterface::clientDone()
}
-JobData* DictInterface::generateQuery(JobData::QueryType type, QString query)
+JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
{
query = query.simplifyWhiteSpace(); // cleanup query string
if (query.isEmpty())
return 0L;
if (query.length()>300) // shorten if necessary
query.truncate(300);
- query = query.replace(QRegExp("[\"\\]"), ""); // remove remaining illegal chars...
+ query = query.replace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
if (query.isEmpty())
return 0L;
@@ -1579,7 +1579,7 @@ void DictInterface::startClient()
if (::write(fdPipeOut[1],&buf,1) == -1)
::perror( "startClient()" );
- QString message;
+ TQString message;
switch (jobList.getFirst()->type) {
case JobData::TDefine:
case JobData::TGetDefinitions:
diff --git a/kdict/dict.h b/kdict/dict.h
index adb87ed9..53e5db3d 100644
--- a/kdict/dict.h
+++ b/kdict/dict.h
@@ -20,8 +20,8 @@
#define _DICT_H_
#include <pthread.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
class QSocketNotifier;
struct in_addr;
@@ -65,29 +65,29 @@ public:
ErrMsgTooLong
};
- JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport,
- int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled,
- QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout);
+ JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport,
+ int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled,
+ TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout);
QueryType type;
ErrType error;
bool canceled;
int numFetched;
- QString result;
- QStringList matches;
+ TQString result;
+ TQStringList matches;
- QString query;
- QStringList defines;
+ TQString query;
+ TQStringList defines;
bool newServer;
- QString server;
+ TQString server;
int port, timeout, pipeSize, idleHold;
- QString encoding;
+ TQString encoding;
bool authEnabled;
- QString user, secret;
- QStringList databases,strategies;
- QString strategy;
+ TQString user, secret;
+ TQStringList databases,strategies;
+ TQString strategy;
unsigned int headLayout;
};
@@ -134,16 +134,16 @@ private:
void handleErrors();
void resultAppend(const char* str);
- void resultAppend(QString str);
+ void resultAppend(TQString str);
JobData *job;
char *input;
- QCString cmdBuffer;
+ TQCString cmdBuffer;
const unsigned int inputSize;
char *thisLine, *nextLine, *inputEnd;
int fdPipeIn,fdPipeOut; //IPC-Pipes to/from async thread
int tcpSocket,timeout,idleHold;
- QTextCodec *codec;
+ TQTextCodec *codec;
};
@@ -163,10 +163,10 @@ public slots:
void serverChanged(); // inform the client when server settings get changed
void stop(); // cancel all pending jobs
- void define(const QString &query);
- void getDefinitions(QStringList query);
- void match(const QString &query);
- void showDbInfo(const QString &db); // fetch detailed db info
+ void define(const TQString &query);
+ void getDefinitions(TQStringList query);
+ void match(const TQString &query);
+ void showDbInfo(const TQString &db); // fetch detailed db info
void showDatabases(); // fetch misc. info...
void showStrategies();
void showInfo();
@@ -175,10 +175,10 @@ public slots:
signals:
void infoReady(); // updateServer done
- void resultReady(const QString &result, const QString &query); // define done
- void matchReady(const QStringList &result); // match done
- void started(const QString &message); // Client is active now, activate indicator
- void stopped(const QString &message); // Client is now halted, deactivate indicator
+ void resultReady(const TQString &result, const TQString &query); // define done
+ void matchReady(const TQStringList &result); // match done
+ void started(const TQString &message); // Client is active now, activate indicator
+ void stopped(const TQString &message); // Client is now halted, deactivate indicator
private slots:
@@ -186,16 +186,16 @@ private slots:
private:
- JobData* generateQuery(JobData::QueryType type, QString query);
+ JobData* generateQuery(JobData::QueryType type, TQString query);
void insertJob(JobData* job); // insert in job list, if nesscary cancel/remove previous jobs
void startClient(); // send start signal
void cleanPipes(); // empty the pipes, so that notifier stops firing
- QSocketNotifier *notifier;
+ TQSocketNotifier *notifier;
int fdPipeIn[2],fdPipeOut[2]; //IPC-Pipes to/from async thread
pthread_t threadID;
DictAsyncClient *client;
- QPtrList<JobData> jobList;
+ TQPtrList<JobData> jobList;
bool newServer,clientDoneInProgress;
};
diff --git a/kdict/matchview.cpp b/kdict/matchview.cpp
index 32cd04dd..869ea383 100644
--- a/kdict/matchview.cpp
+++ b/kdict/matchview.cpp
@@ -13,13 +13,13 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqclipboard.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <klocale.h>
@@ -35,26 +35,26 @@
//********* MatchViewItem ********************************************
-MatchViewItem::MatchViewItem(QListView *view, const QString &text)
- : QListViewItem(view,text)
+MatchViewItem::MatchViewItem(TQListView *view, const TQString &text)
+ : TQListViewItem(view,text)
{
}
-MatchViewItem::MatchViewItem(QListView *view,QListViewItem *after,const QString &text)
- : QListViewItem(view,after,text)
+MatchViewItem::MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text)
+ : TQListViewItem(view,after,text)
{
}
-MatchViewItem::MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr)
-: QListViewItem(item,text), command(commandStr)
+MatchViewItem::MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr)
+: TQListViewItem(item,text), command(commandStr)
{
}
-MatchViewItem::MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr)
-: QListViewItem(item,after,text), command(commandStr)
+MatchViewItem::MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr)
+: TQListViewItem(item,after,text), command(commandStr)
{
}
@@ -70,9 +70,9 @@ void MatchViewItem::setOpen(bool o)
listView()->setUpdatesEnabled(false);
MatchViewItem *sub=0;
- QString command, label;
- QRegExp exp("\"*\"", true, true);
- QStringList::iterator it;
+ TQString command, label;
+ TQRegExp exp("\"*\"", true, true);
+ TQStringList::iterator it;
for (it = subEntrys.begin(); it != subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -92,71 +92,71 @@ void MatchViewItem::setOpen(bool o)
}
if (childCount())
- QListViewItem::setOpen(o);
+ TQListViewItem::setOpen(o);
}
-void MatchViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
if(command.isEmpty()) {
- QFont font=p->font();
+ TQFont font=p->font();
font.setBold(true);
p->setFont(font);
}
- QListViewItem::paintCell(p,cg,column,width,alignment);
+ TQListViewItem::paintCell(p,cg,column,width,alignment);
}
//********* MatchView ******************************************
-MatchView::MatchView(QWidget *parent, const char *name)
- : QWidget(parent,name),getOn(false),getAllOn(false)
+MatchView::MatchView(TQWidget *parent, const char *name)
+ : TQWidget(parent,name),getOn(false),getAllOn(false)
{
setCaption(kapp->makeStdCaption(i18n("Match List")));
- QVBoxLayout * boxLayout = new QVBoxLayout(this, 1, 0);
+ TQVBoxLayout * boxLayout = new TQVBoxLayout(this, 1, 0);
boxLayout->addSpacing(1);
- w_strat = new QComboBox(false,this);
+ w_strat = new TQComboBox(false,this);
w_strat->setFixedHeight(w_strat->sizeHint().height());
- connect(w_strat,SIGNAL(activated(int)),this,SLOT(strategySelected(int)));
+ connect(w_strat,TQT_SIGNAL(activated(int)),this,TQT_SLOT(strategySelected(int)));
boxLayout->addWidget(w_strat,0);
boxLayout->addSpacing(1);
- w_list = new QListView(this);
- w_list->setFocusPolicy(QWidget::StrongFocus);
+ w_list = new TQListView(this);
+ w_list->setFocusPolicy(TQWidget::StrongFocus);
w_list->header()->hide();
w_list->addColumn("foo");
- w_list->setColumnWidthMode(0,QListView::Maximum);
+ w_list->setColumnWidthMode(0,TQListView::Maximum);
w_list->setColumnWidth(0,0);
- w_list->setSelectionMode(QListView::Extended);
+ w_list->setSelectionMode(TQListView::Extended);
w_list->setTreeStepSize(18);
w_list->setSorting(-1); // disable sorting
w_list->setMinimumHeight(w_strat->sizeHint().height());
- connect(w_list,SIGNAL(selectionChanged()),SLOT(enableGetButton()));
- connect(w_list,SIGNAL(returnPressed(QListViewItem *)),SLOT(returnPressed(QListViewItem *)));
- connect(w_list,SIGNAL(doubleClicked(QListViewItem *)),SLOT(getOneItem(QListViewItem *)));
- connect(w_list,SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)),
- SLOT(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)));
- connect(w_list,SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),SLOT(buildPopupMenu(QListViewItem *,const QPoint &,int)));
+ 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 *)));
+ connect(w_list,TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)));
+ connect(w_list,TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)),TQT_SLOT(buildPopupMenu(TQListViewItem *,const TQPoint &,int)));
boxLayout->addWidget(w_list,1);
boxLayout->addSpacing(1);
- w_get = new QPushButton(i18n("&Get Selected"),this);
+ 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->setEnabled(false);
- connect(w_get, SIGNAL(clicked()), this, SLOT(getSelected()));
+ connect(w_get, TQT_SIGNAL(clicked()), this, TQT_SLOT(getSelected()));
boxLayout->addWidget(w_get,0);
- w_getAll = new QPushButton(i18n("Get &All"),this);
+ 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->setEnabled(false);
- connect(w_getAll, SIGNAL(clicked()), this, SLOT(getAll()));
+ connect(w_getAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(getAll()));
boxLayout->addWidget(w_getAll,0);
- connect(interface,SIGNAL(matchReady(const QStringList &)),this,SLOT(newList(const QStringList &)));
+ connect(interface,TQT_SIGNAL(matchReady(const TQStringList &)),this,TQT_SLOT(newList(const TQStringList &)));
rightBtnMenu = new KPopupMenu();
}
@@ -174,7 +174,7 @@ void MatchView::updateStrategyCombo()
}
-bool MatchView::selectStrategy(const QString &strategy) const
+bool MatchView::selectStrategy(const TQString &strategy) const
{
int newCurrent = global->strategies.findIndex(strategy);
if (newCurrent == -1)
@@ -187,13 +187,13 @@ bool MatchView::selectStrategy(const QString &strategy) const
}
-void MatchView::match(const QString &query)
+void MatchView::match(const TQString &query)
{
interface->match(query.utf8());
}
-void MatchView::closeEvent ( QCloseEvent * e )
+void MatchView::closeEvent ( TQCloseEvent * e )
{
e->accept(); // hides the widget
emit(windowClosed());
@@ -215,22 +215,22 @@ void MatchView::enableGetButton()
}
-void MatchView::mouseButtonPressed(int button, QListViewItem *, const QPoint &, int)
+void MatchView::mouseButtonPressed(int button, TQListViewItem *, const TQPoint &, int)
{
if (button == MidButton)
emit(clipboardRequested());
}
-void MatchView::returnPressed(QListViewItem *)
+void MatchView::returnPressed(TQListViewItem *)
{
getSelected();
}
-void MatchView::getOneItem(QListViewItem *i)
+void MatchView::getOneItem(TQListViewItem *i)
{
- QStringList defines;
+ TQStringList defines;
if ((!i->childCount())&&(i->parent()))
defines.append(((MatchViewItem *)(i))->command);
@@ -248,14 +248,14 @@ void MatchView::getOneItem(QListViewItem *i)
void MatchView::getSelected()
{
- QStringList defines;
+ TQStringList defines;
MatchViewItem *top = static_cast<MatchViewItem*>(w_list->firstChild());
MatchViewItem *sub;
while (top) {
if (top->isSelected()&&(!top->subEntrys.isEmpty())) {
- QString command;
- QStringList::iterator it;
+ TQString command;
+ TQStringList::iterator it;
for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -278,14 +278,14 @@ void MatchView::getSelected()
void MatchView::getAll()
{
- QStringList defines;
+ TQStringList defines;
MatchViewItem *top = static_cast<MatchViewItem*>(w_list->firstChild());
MatchViewItem *sub;
while (top) {
if (!top->subEntrys.isEmpty()) {
- QString command;
- QStringList::iterator it;
+ TQString command;
+ TQStringList::iterator it;
for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) {
command = "define ";
command += (*it);
@@ -305,7 +305,7 @@ void MatchView::getAll()
}
-void MatchView::doGet(QStringList &defines)
+void MatchView::doGet(TQStringList &defines)
{
if (defines.count() > 0) {
if (defines.count() > global->maxDefinitions) {
@@ -319,7 +319,7 @@ void MatchView::doGet(QStringList &defines)
}
-void MatchView::newList(const QStringList &matches)
+void MatchView::newList(const TQStringList &matches)
{
MatchViewItem *top=0;
bool initialOpen = (matches.count()<200);
@@ -342,9 +342,9 @@ void MatchView::newList(const QStringList &matches)
w_list->setRootIsDecorated(true);
w_getAll->setEnabled(true);
getAllOn = true;
- QString lastDb, db, match;
+ TQString lastDb, db, match;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = matches.begin(); it != matches.end(); ++it) {
db = (*it).section(' ', 0, 0);
@@ -374,42 +374,42 @@ void MatchView::newList(const QStringList &matches)
// construct the right-mouse-button-popup-menu on demand
-void MatchView::buildPopupMenu(QListViewItem *i, const QPoint &_point, int)
+void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int)
{
rightBtnMenu->clear();
if ((i!=0L)&&(i->isExpandable()||i->parent())) {
popupCurrent = (MatchViewItem *)(i);
- rightBtnMenu->insertItem(i18n("&Get"),this,SLOT(popupGetCurrent()));
+ rightBtnMenu->insertItem(i18n("&Get"),this,TQT_SLOT(popupGetCurrent()));
if (!i->isExpandable()) { // toplevel item -> only "get"
- rightBtnMenu->insertItem(i18n("&Match"),this,SLOT(popupMatchCurrent()));
- rightBtnMenu->insertItem(i18n("&Define"),this,SLOT(popupDefineCurrent()));
+ rightBtnMenu->insertItem(i18n("&Match"),this,TQT_SLOT(popupMatchCurrent()));
+ rightBtnMenu->insertItem(i18n("&Define"),this,TQT_SLOT(popupDefineCurrent()));
}
rightBtnMenu->insertSeparator();
}
kapp->clipboard()->setSelectionMode(false);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(true);
text = kapp->clipboard()->text();
}
if (!text.isEmpty()) {
popupClip = kapp->clipboard()->text();
- rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,SLOT(popupMatchClip()));
- rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,SLOT(popupDefineClip()));
+ 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();
}
- int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,SLOT(getSelected()));
+ int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,TQT_SLOT(getSelected()));
rightBtnMenu->setItemEnabled(ID,getOn);
- ID = rightBtnMenu->insertItem(i18n("Get &All"),this,SLOT(getAll()));
+ ID = rightBtnMenu->insertItem(i18n("Get &All"),this,TQT_SLOT(getAll()));
rightBtnMenu->setItemEnabled(ID,getAllOn);
if (w_list->childCount()) {
rightBtnMenu->insertSeparator();
- rightBtnMenu->insertItem(i18n("E&xpand List"),this,SLOT(expandList()));
- rightBtnMenu->insertItem(i18n("C&ollapse List"),this,SLOT(collapseList()));
+ rightBtnMenu->insertItem(i18n("E&xpand List"),this,TQT_SLOT(expandList()));
+ rightBtnMenu->insertItem(i18n("C&ollapse List"),this,TQT_SLOT(collapseList()));
}
rightBtnMenu->popup(_point);
@@ -448,7 +448,7 @@ void MatchView::popupMatchClip()
void MatchView::expandList()
{
- QListViewItem *top = w_list->firstChild();
+ TQListViewItem *top = w_list->firstChild();
while (top) {
w_list->setOpen(top,true);
@@ -460,7 +460,7 @@ void MatchView::expandList()
void MatchView::collapseList()
{
w_list->setCurrentItem(w_list->firstChild());
- QListViewItem *top = w_list->firstChild();
+ TQListViewItem *top = w_list->firstChild();
while (top) {
w_list->setOpen(top,false);
diff --git a/kdict/matchview.h b/kdict/matchview.h
index f619820e..7248c35c 100644
--- a/kdict/matchview.h
+++ b/kdict/matchview.h
@@ -17,7 +17,7 @@
#ifndef _MATCHVIEW_H_
#define _MATCHVIEW_H_
-#include <qlistview.h>
+#include <tqlistview.h>
class KPopupMenu;
@@ -28,17 +28,17 @@ class MatchViewItem : public QListViewItem
public:
- MatchViewItem(QListView *view,const QString &text);
- MatchViewItem(QListView *view,QListViewItem *after,const QString &text);
- MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr);
- MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr);
+ MatchViewItem(TQListView *view,const TQString &text);
+ MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text);
+ MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr);
+ MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr);
~MatchViewItem();
void setOpen(bool o);
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
- QString command;
- QStringList subEntrys;
+ TQString command;
+ TQStringList subEntrys;
};
@@ -51,36 +51,36 @@ class MatchView : public QWidget
public:
- MatchView(QWidget *parent=0,const char *name=0);
+ MatchView(TQWidget *parent=0,const char *name=0);
~MatchView();
void updateStrategyCombo();
- bool selectStrategy(const QString &strategy) const;
- void match(const QString &query);
+ bool selectStrategy(const TQString &strategy) const;
+ void match(const TQString &query);
signals:
- void defineRequested(const QString &query);
- void matchRequested(const QString &query);
+ void defineRequested(const TQString &query);
+ void matchRequested(const TQString &query);
void clipboardRequested();
void windowClosed();
protected:
- void closeEvent ( QCloseEvent * e );
+ void closeEvent ( TQCloseEvent * e );
private slots:
void strategySelected(int num);
void enableGetButton();
- void mouseButtonPressed(int, QListViewItem *, const QPoint &, int);
- void returnPressed(QListViewItem *i);
- void getOneItem(QListViewItem *i);
+ void mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int);
+ void returnPressed(TQListViewItem *i);
+ void getOneItem(TQListViewItem *i);
void getSelected();
void getAll();
- void doGet(QStringList &defines);
- void newList(const QStringList &matches);
- void buildPopupMenu(QListViewItem *, const QPoint &, int);
+ void doGet(TQStringList &defines);
+ void newList(const TQStringList &matches);
+ void buildPopupMenu(TQListViewItem *, const TQPoint &, int);
void popupGetCurrent();
void popupDefineCurrent();
void popupMatchCurrent();
@@ -91,15 +91,15 @@ private slots:
private:
- QComboBox *w_strat;
- QListView *w_list;
- QPushButton *w_get,*w_getAll;
+ TQComboBox *w_strat;
+ TQListView *w_list;
+ TQPushButton *w_get,*w_getAll;
bool getOn, getAllOn;
KPopupMenu *rightBtnMenu;
MatchViewItem *popupCurrent;
- QString popupClip; // needed for rightbtn-popup menu
+ TQString popupClip; // needed for rightbtn-popup menu
};
#endif
diff --git a/kdict/options.cpp b/kdict/options.cpp
index a157fbf5..3220b07c 100644
--- a/kdict/options.cpp
+++ b/kdict/options.cpp
@@ -17,14 +17,14 @@
------------------------------------------------------------- */
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qpainter.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqpainter.h>
#include <kcolordialog.h>
#include <kconfig.h>
@@ -67,7 +67,7 @@ void GlobalData::read()
config->setGroup("Colors");
useCustomColors=config->readBoolEntry("customColors", false);
- QColor defCol=KGlobalSettings::textColor();
+ TQColor defCol=KGlobalSettings::textColor();
c_olors[Ctext]=config->readColorEntry("textColor",&defCol);
c_olorNames[Ctext]=i18n("Text");
@@ -95,7 +95,7 @@ void GlobalData::read()
config->setGroup("Fonts");
useCustomFonts=config->readBoolEntry("customFonts", false);
- QFont defFont=KGlobalSettings::generalFont();
+ TQFont defFont=KGlobalSettings::generalFont();
f_onts[Ftext]=config->readFontEntry("textFont",&defFont);
f_ontNames[Ftext]=i18n("Text");
@@ -106,7 +106,7 @@ void GlobalData::read()
// geometry...
config->setGroup("Geometry");
- QSize invalid(-1,-1);
+ TQSize invalid(-1,-1);
optSize = config->readSizeEntry("Opt_Size",&invalid);
setsSize = config->readSizeEntry("Sets_Size",&invalid);
matchSize = config->readSizeEntry("Match_Size",&invalid);
@@ -157,10 +157,10 @@ void GlobalData::read()
config->setGroup("Database_Sets");
databaseSets.setAutoDelete(true);
int num = config->readNumEntry("Num_Sets",0);
- QStringList* temp;
- QString strNum;
+ TQStringList* temp;
+ TQString strNum;
while (num > 0) {
- temp = new QStringList();
+ temp = new TQStringList();
strNum.setNum(num);
*temp = config->readListEntry(strNum);
if (!temp->isEmpty()) {
@@ -217,7 +217,7 @@ void GlobalData::write()
config->writeEntry("Completion_mode", (int)queryComboCompletionMode);
config->setGroup("Query_History");
- QStringList copy;
+ TQStringList copy;
if (saveHistory)
copy = queryHistory;
config->writeEntry("History",copy);
@@ -239,13 +239,13 @@ void GlobalData::write()
config->setGroup("Database_Sets");
config->writeEntry("Num_Sets",databaseSets.count());
- QString strNum;
+ TQString strNum;
for (unsigned int i = 0;i<databaseSets.count();i++)
config->writeEntry(strNum.setNum(i+1),*databaseSets.at(i));
}
-QColor GlobalData::defaultColor(int i)
+TQColor GlobalData::defaultColor(int i)
{
switch(i) {
case Ctext:
@@ -278,7 +278,7 @@ QColor GlobalData::defaultColor(int i)
}
-QColor GlobalData::textColor()
+TQColor GlobalData::textColor()
{
if(useCustomColors)
return c_olors[Ctext];
@@ -287,7 +287,7 @@ QColor GlobalData::textColor()
}
-QColor GlobalData::backgroundColor()
+TQColor GlobalData::backgroundColor()
{
if(useCustomColors)
return c_olors[Cbackground];
@@ -296,7 +296,7 @@ QColor GlobalData::backgroundColor()
}
-QColor GlobalData::headingsTextColor()
+TQColor GlobalData::headingsTextColor()
{
if(useCustomColors)
return c_olors[CheadingsText];
@@ -305,7 +305,7 @@ QColor GlobalData::headingsTextColor()
}
-QColor GlobalData::headingsBackgroundColor()
+TQColor GlobalData::headingsBackgroundColor()
{
if(useCustomColors)
return c_olors[CheadingsBackground];
@@ -314,7 +314,7 @@ QColor GlobalData::headingsBackgroundColor()
}
-QColor GlobalData::linksColor()
+TQColor GlobalData::linksColor()
{
if(useCustomColors)
return c_olors[Clinks];
@@ -323,7 +323,7 @@ QColor GlobalData::linksColor()
}
-QColor GlobalData::visitedLinksColor()
+TQColor GlobalData::visitedLinksColor()
{
if(useCustomColors)
return c_olors[CvisitedLinks];
@@ -332,9 +332,9 @@ QColor GlobalData::visitedLinksColor()
}
-QFont GlobalData::defaultFont(int i)
+TQFont GlobalData::defaultFont(int i)
{
- QFont font = KGlobalSettings::generalFont();
+ TQFont font = KGlobalSettings::generalFont();
if (font.pointSize() < 5)
font.setPointSize(12);
@@ -346,7 +346,7 @@ QFont GlobalData::defaultFont(int i)
}
-QFont GlobalData::textFont()
+TQFont GlobalData::textFont()
{
if(useCustomFonts)
return f_onts[Ftext];
@@ -355,7 +355,7 @@ QFont GlobalData::textFont()
}
-QFont GlobalData::headingsFont()
+TQFont GlobalData::headingsFont()
{
if(useCustomFonts)
return f_onts[Fheadings];
@@ -365,10 +365,10 @@ QFont GlobalData::headingsFont()
// simple password scrambling...
-QString GlobalData::encryptStr(const QString& aStr)
+TQString GlobalData::encryptStr(const TQString& aStr)
{
uint i,val,len = aStr.length();
- QString result;
+ TQString result;
for (i=0; i<len; i++)
{
@@ -384,8 +384,8 @@ QString GlobalData::encryptStr(const QString& aStr)
//********* OptionsDialog::DialogListBox *****************************
-OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, QWidget * parent, const char * name)
- : QListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
+OptionsDialog::DialogListBox::DialogListBox(bool alwaysIgnore, TQWidget * parent, const char * name)
+ : TQListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
{
}
@@ -395,20 +395,20 @@ OptionsDialog::DialogListBox::~DialogListBox()
}
-void OptionsDialog::DialogListBox::keyPressEvent(QKeyEvent *e)
+void OptionsDialog::DialogListBox::keyPressEvent(TQKeyEvent *e)
{
if ((a_lwaysIgnore || !(hasFocus()&&isVisible()))&&((e->key()==Key_Enter)||(e->key()==Key_Return)))
e->ignore();
else
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
//********* OptionsDialog::ColorListItem *****************************
-OptionsDialog::ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxText(text), mColor( color )
+OptionsDialog::ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxText(text), mColor( color )
{
}
@@ -418,9 +418,9 @@ OptionsDialog::ColorListItem::~ColorListItem()
}
-void OptionsDialog::ColorListItem::paint( QPainter *p )
+void OptionsDialog::ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( 30+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -431,13 +431,13 @@ void OptionsDialog::ColorListItem::paint( QPainter *p )
}
-int OptionsDialog::ColorListItem::height(const QListBox *lb ) const
+int OptionsDialog::ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int OptionsDialog::ColorListItem::width(const QListBox *lb ) const
+int OptionsDialog::ColorListItem::width(const TQListBox *lb ) const
{
return( 30 + lb->fontMetrics().width( text() ) + 6 );
}
@@ -446,10 +446,10 @@ int OptionsDialog::ColorListItem::width(const QListBox *lb ) const
//********* OptionsDialog::FontListItem *****************************
-OptionsDialog::FontListItem::FontListItem( const QString &name, const QFont &font )
- : QListBoxText(name), f_ont(font)
+OptionsDialog::FontListItem::FontListItem( const TQString &name, const TQFont &font )
+ : TQListBoxText(name), f_ont(font)
{
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
@@ -458,28 +458,28 @@ OptionsDialog::FontListItem::~FontListItem()
}
-void OptionsDialog::FontListItem::setFont(const QFont &font)
+void OptionsDialog::FontListItem::setFont(const TQFont &font)
{
f_ont = font;
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
-void OptionsDialog::FontListItem::paint( QPainter *p )
+void OptionsDialog::FontListItem::paint( TQPainter *p )
{
- QFont fnt = p->font();
- fnt.setWeight(QFont::Bold);
+ TQFont fnt = p->font();
+ fnt.setWeight(TQFont::Bold);
p->setFont(fnt);
int fontInfoWidth = p->fontMetrics().width(fontInfo);
int h = p->fontMetrics().ascent() + p->fontMetrics().leading()/2;
p->drawText(2, h, fontInfo );
- fnt.setWeight(QFont::Normal);
+ fnt.setWeight(TQFont::Normal);
p->setFont(fnt);
p->drawText(5 + fontInfoWidth, h, text() );
}
-int OptionsDialog::FontListItem::width(const QListBox *lb ) const
+int OptionsDialog::FontListItem::width(const TQListBox *lb ) const
{
return( lb->fontMetrics().width(fontInfo) + lb->fontMetrics().width(text()) + 20 );
}
@@ -488,90 +488,90 @@ int OptionsDialog::FontListItem::width(const QListBox *lb ) const
//********* OptionsDialog ******************************************
-OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
+OptionsDialog::OptionsDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList, i18n("Configure"), Help|Default|Ok|Apply|Cancel, Ok, parent, name, false, true)
{
//******** Server ************************************
serverTab = addPage(i18n("Server"),i18n("DICT Server Configuration"), BarIcon("network", KIcon::SizeMedium ));
- QGridLayout* grid = new QGridLayout(serverTab,10,3,0,spacingHint());
+ TQGridLayout* grid = new TQGridLayout(serverTab,10,3,0,spacingHint());
w_server = new KLineEdit(serverTab);
w_server->setText(global->server);
- QLabel *l = new QLabel(w_server, i18n("Host&name:"), serverTab);
+ TQLabel *l = new TQLabel(w_server, i18n("Host&name:"), serverTab);
grid->addWidget(l,0,0);
grid->addMultiCellWidget(w_server,0,0,1,2);
- connect( w_server, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_server, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_port = new KLineEdit(serverTab);
w_port->setValidator(new KIntValidator(0,65536,this));
- w_port->setText(QString::number(global->port));
- l = new QLabel(w_port, i18n("&Port:"), serverTab);
+ w_port->setText(TQString::number(global->port));
+ l = new TQLabel(w_port, i18n("&Port:"), serverTab);
grid->addWidget(l,1,0);
grid->addWidget(w_port,1,1);
- connect( w_port, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_port, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_idleHold = new KIntSpinBox(0,300,5,0,10,serverTab);
w_idleHold->setSuffix(i18n(" sec"));
w_idleHold->setValue(global->idleHold);
- l = new QLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab);
+ l = new TQLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab);
grid->addWidget(l,2,0);
grid->addWidget(w_idleHold,2,1);
- connect( w_idleHold, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_idleHold, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
w_timeout = new KIntSpinBox(5,600,5,5,10,serverTab);
w_timeout->setSuffix(i18n(" sec"));
w_timeout->setValue(global->timeout);
- l = new QLabel(w_timeout, i18n("T&imeout:"), serverTab);
+ l = new TQLabel(w_timeout, i18n("T&imeout:"), serverTab);
grid->addWidget(l,3,0);
grid->addWidget(w_timeout,3,1);
- connect( w_timeout, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_timeout, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
w_pipesize = new KIntSpinBox(100,5000,2,2,10,serverTab);
w_pipesize->setSuffix(i18n(" bytes"));
w_pipesize->setValue(global->pipeSize);
- l = new QLabel(w_pipesize, i18n("Command &buffer:"), serverTab);
+ l = new TQLabel(w_pipesize, i18n("Command &buffer:"), serverTab);
grid->addWidget(l,4,0);
grid->addWidget(w_pipesize,4,1);
- connect( w_pipesize, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
+ connect( w_pipesize, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
- QStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
+ TQStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
int i=0,x=0;
- for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
+ for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
if (KGlobal::charsets()->encodingForName(*it)==global->encoding) {
x = i;
break;
}
i++;
}
- w_encoding = new QComboBox(serverTab);
+ w_encoding = new TQComboBox(serverTab);
w_encoding->insertStringList(encodingNames);
w_encoding->setCurrentItem(x);
- l = new QLabel(w_encoding, i18n("Encod&ing:"), serverTab);
+ l = new TQLabel(w_encoding, i18n("Encod&ing:"), serverTab);
grid->addWidget(l,5,0);
grid->addMultiCellWidget(w_encoding,5,5,1,2);
- connect( w_encoding, SIGNAL( activated(int) ), this, SLOT( slotChanged() ) );
+ connect( w_encoding, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotChanged() ) );
- w_auth = new QCheckBox(i18n("Server requires a&uthentication"),serverTab);
+ w_auth = new TQCheckBox(i18n("Server requires a&uthentication"),serverTab);
w_auth->setChecked(global->authEnabled);
grid->addMultiCellWidget(w_auth,6,6,0,2);
- connect( w_auth, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(w_auth,SIGNAL(toggled(bool)),SLOT(slotAuthRequiredToggled(bool)));
+ connect( w_auth, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(w_auth,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotAuthRequiredToggled(bool)));
w_user = new KLineEdit(serverTab);
w_user->setText(global->user);
- l_user = new QLabel(w_user, i18n("U&ser:"),serverTab);
+ l_user = new TQLabel(w_user, i18n("U&ser:"),serverTab);
grid->addWidget(l_user,7,0);
grid->addMultiCellWidget(w_user,7,7,1,2);
- connect( w_user, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_user, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
w_secret = new KLineEdit(serverTab);
- w_secret->setEchoMode(QLineEdit::Password);
+ w_secret->setEchoMode(TQLineEdit::Password);
w_secret->setText(global->secret);
- l_secret = new QLabel(w_secret, i18n("Pass&word:"), serverTab);
+ l_secret = new TQLabel(w_secret, i18n("Pass&word:"), serverTab);
grid->addWidget(l_secret,8,0);
grid->addMultiCellWidget(w_secret,8,8,1,2);
- connect( w_secret, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect( w_secret, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
slotAuthRequiredToggled( w_auth->isChecked() );
@@ -581,53 +581,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Appearance ***************************
appTab = addPage(i18n("Appearance"),i18n("Customize Visual Appearance"), BarIcon("appearance", KIcon::SizeMedium ));
- QGridLayout *topL=new QGridLayout(appTab, 8, 3, 0, spacingHint());
+ TQGridLayout *topL=new TQGridLayout(appTab, 8, 3, 0, spacingHint());
//color-list
c_List = new DialogListBox(false, appTab);
topL->addMultiCellWidget(c_List,1,3,0,1);
- connect(c_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotColItemSelected(QListBoxItem*)));
- connect(c_List, SIGNAL(selectionChanged()), SLOT(slotColSelectionChanged()));
+ connect(c_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotColItemSelected(TQListBoxItem*)));
+ connect(c_List, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotColSelectionChanged()));
- c_olorCB = new QCheckBox(i18n("&Use custom colors"),appTab);
+ c_olorCB = new TQCheckBox(i18n("&Use custom colors"),appTab);
topL->addWidget(c_olorCB,0,0);
- connect(c_olorCB, SIGNAL(toggled(bool)), this, SLOT(slotColCheckBoxToggled(bool)));
- connect(c_olorCB, SIGNAL(toggled(bool) ), this, SLOT( slotChanged()));
+ connect(c_olorCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotColCheckBoxToggled(bool)));
+ connect(c_olorCB, TQT_SIGNAL(toggled(bool) ), this, TQT_SLOT( slotChanged()));
- c_olChngBtn=new QPushButton(i18n("Cha&nge..."), appTab);
- connect(c_olChngBtn, SIGNAL(clicked()), SLOT(slotColChangeBtnClicked()));
+ c_olChngBtn=new TQPushButton(i18n("Cha&nge..."), appTab);
+ connect(c_olChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColChangeBtnClicked()));
topL->addWidget(c_olChngBtn,1,2);
- c_olDefBtn=new QPushButton(i18n("Default&s"), appTab);
- connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotColDefaultBtnClicked()));
+ c_olDefBtn=new TQPushButton(i18n("Default&s"), appTab);
+ connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColDefaultBtnClicked()));
topL->addWidget(c_olDefBtn,2,2);
- connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotChanged()));
+ connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
//font-list
f_List = new DialogListBox(false, appTab);
topL->addMultiCellWidget(f_List,5,7,0,1);
- connect(f_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotFontItemSelected(QListBoxItem*)));
- connect(f_List, SIGNAL(selectionChanged()),SLOT(slotFontSelectionChanged()));
+ connect(f_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotFontItemSelected(TQListBoxItem*)));
+ connect(f_List, TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotFontSelectionChanged()));
- f_ontCB = new QCheckBox(i18n("Use custom &fonts"),appTab);
+ f_ontCB = new TQCheckBox(i18n("Use custom &fonts"),appTab);
topL->addWidget(f_ontCB,4,0);
- connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotFontCheckBoxToggled(bool)));
- connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFontCheckBoxToggled(bool)));
+ connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
- f_ntChngBtn=new QPushButton(i18n("Chang&e..."), appTab);
- connect(f_ntChngBtn, SIGNAL(clicked()), SLOT(slotFontChangeBtnClicked()));
+ f_ntChngBtn=new TQPushButton(i18n("Chang&e..."), appTab);
+ connect(f_ntChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontChangeBtnClicked()));
topL->addWidget(f_ntChngBtn,5,2);
- f_ntDefBtn=new QPushButton(i18n("Defaul&ts"), appTab);
- connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotFontDefaultBtnClicked()));
+ f_ntDefBtn=new TQPushButton(i18n("Defaul&ts"), appTab);
+ connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontDefaultBtnClicked()));
topL->addWidget(f_ntDefBtn,6,2);
- connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotChanged()));
+ connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
topL->setColStretch(1,2);
topL->setColStretch(2,0);
topL->setRowStretch(3,1);
topL->setRowStretch(7,1);
- topL->setResizeMode(QLayout::Minimum);
+ topL->setResizeMode(TQLayout::Minimum);
//init
c_olorCB->setChecked(global->useCustomColors);
@@ -643,24 +643,24 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Layout ***************************
layoutTab = addPage(i18n("Layout"),i18n("Customize Output Format"), BarIcon("text_left", KIcon::SizeMedium ));
- QVBoxLayout *vbox = new QVBoxLayout(layoutTab, 0, spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(layoutTab, 0, spacingHint());
- QButtonGroup *bGroup = new QButtonGroup(i18n("Headings"),layoutTab);
- QVBoxLayout *bvbox = new QVBoxLayout(bGroup,8,5);
+ TQButtonGroup *bGroup = new TQButtonGroup(i18n("Headings"),layoutTab);
+ TQVBoxLayout *bvbox = new TQVBoxLayout(bGroup,8,5);
bvbox->addSpacing(fontMetrics().lineSpacing()-4);
- w_layout[0] = new QRadioButton(i18n("O&ne heading for each database"),bGroup);
+ w_layout[0] = new TQRadioButton(i18n("O&ne heading for each database"),bGroup);
w_layout[0]->setChecked(global->headLayout == 0);
bvbox->addWidget(w_layout[0],1);
- w_layout[1] = new QRadioButton(i18n("A&s above, with separators between the definitions"),bGroup);
+ w_layout[1] = new TQRadioButton(i18n("A&s above, with separators between the definitions"),bGroup);
w_layout[1]->setChecked(global->headLayout == 1);
bvbox->addWidget(w_layout[1],1);
- w_layout[2] = new QRadioButton(i18n("A separate heading for &each definition"),bGroup);
+ w_layout[2] = new TQRadioButton(i18n("A separate heading for &each definition"),bGroup);
w_layout[2]->setChecked(global->headLayout == 2);
bvbox->addWidget(w_layout[2],1);
- connect(w_layout[0], SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(w_layout[1], SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(w_layout[2], SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_layout[0], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(w_layout[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(w_layout[2], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
vbox->addWidget(bGroup,0);
vbox->addStretch(1);
@@ -668,53 +668,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name)
//************ Other ***************************
otherTab = addPage(i18n("Miscellaneous"),i18n("Various Settings"), BarIcon("misc", KIcon::SizeMedium ));
- vbox = new QVBoxLayout(otherTab, 0, spacingHint());
+ vbox = new TQVBoxLayout(otherTab, 0, spacingHint());
- QGroupBox *group = new QGroupBox(i18n("Limits"),otherTab);
+ TQGroupBox *group = new TQGroupBox(i18n("Limits"),otherTab);
- grid = new QGridLayout(group,4,2,8,5);
+ grid = new TQGridLayout(group,4,2,8,5);
grid->addRowSpacing(0, fontMetrics().lineSpacing()-4);
w_MaxDefinitions = new KIntSpinBox(100,10000,100,100,10,group);
w_MaxDefinitions->setValue(global->maxDefinitions);
- l = new QLabel(w_MaxDefinitions, i18n("De&finitions:"), group);
+ l = new TQLabel(w_MaxDefinitions, i18n("De&finitions:"), group);
grid->addWidget(l,1,0);
grid->addWidget(w_MaxDefinitions,1,1);
- connect(w_MaxDefinitions, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_MaxDefinitions, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
w_Maxbrowse = new KIntSpinBox(1,100,1,1,10,group);
w_Maxbrowse->setValue(global->maxBrowseListEntrys);
- l = new QLabel(w_Maxbrowse, i18n("Cached &results:"), group);
+ l = new TQLabel(w_Maxbrowse, i18n("Cached &results:"), group);
grid->addWidget(l,2,0);
grid->addWidget(w_Maxbrowse,2,1);
- connect(w_Maxbrowse, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_Maxbrowse, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
w_Maxhist = new KIntSpinBox(10,5000,10,10,10,group);
w_Maxhist->setValue(global->maxHistEntrys);
- l = new QLabel(w_Maxhist, i18n("Hi&story entries:"), group);
+ l = new TQLabel(w_Maxhist, i18n("Hi&story entries:"), group);
grid->addWidget(l,3,0);
grid->addWidget(w_Maxhist,3,1);
- connect(w_Maxhist, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
+ connect(w_Maxhist, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
grid->setColStretch(1,1);
vbox->addWidget(group,0);
- group = new QGroupBox(i18n("Other"),otherTab);
+ group = new TQGroupBox(i18n("Other"),otherTab);
- QVBoxLayout *vbox2 = new QVBoxLayout(group, 8, 5);
+ TQVBoxLayout *vbox2 = new TQVBoxLayout(group, 8, 5);
vbox2->addSpacing(fontMetrics().lineSpacing()-4);
- w_Savehist = new QCheckBox(i18n("Sa&ve history on exit"),group);
+ w_Savehist = new TQCheckBox(i18n("Sa&ve history on exit"),group);
w_Savehist->setChecked(global->saveHistory);
vbox2->addWidget(w_Savehist,0);
- connect(w_Savehist, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_Savehist, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
- w_Clipboard = new QCheckBox(i18n("D&efine selected text on start"),group);
+ w_Clipboard = new TQCheckBox(i18n("D&efine selected text on start"),group);
w_Clipboard->setChecked(global->defineClipboard);
vbox2->addWidget(w_Clipboard,1);
- connect(w_Clipboard, SIGNAL(toggled(bool)), SLOT(slotChanged()));
+ connect(w_Clipboard, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
vbox->addWidget(group,0);
vbox->addStretch(2);
@@ -782,7 +782,7 @@ void OptionsDialog::slotOk()
void OptionsDialog::slotDefault()
{
- QStringList encodingNames;
+ TQStringList encodingNames;
int i=0,x=0;
switch(activePageIndex()) {
@@ -793,7 +793,7 @@ void OptionsDialog::slotDefault()
w_timeout->setValue(60);
w_pipesize->setValue(256);
encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
- for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
+ for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) {
if (KGlobal::charsets()->encodingForName(*it)=="utf8")
x = i;
i++;
@@ -845,11 +845,11 @@ void OptionsDialog::slotColCheckBoxToggled(bool b)
// show color dialog for the entry
-void OptionsDialog::slotColItemSelected(QListBoxItem *it)
+void OptionsDialog::slotColItemSelected(TQListBoxItem *it)
{
if (it) {
ColorListItem *colorItem = static_cast<ColorListItem*>(it);
- QColor col = colorItem->color();
+ TQColor col = colorItem->color();
int result = KColorDialog::getColor(col,this);
if (result == KColorDialog::Accepted) {
@@ -896,11 +896,11 @@ void OptionsDialog::slotFontCheckBoxToggled(bool b)
// show font dialog for the entry
-void OptionsDialog::slotFontItemSelected(QListBoxItem *it)
+void OptionsDialog::slotFontItemSelected(TQListBoxItem *it)
{
if (it) {
FontListItem *fontItem = static_cast<FontListItem*>(it);
- QFont font = fontItem->font();
+ TQFont font = fontItem->font();
int result = KFontDialog::getFont(font,false,this);
if (result == KFontDialog::Accepted) {
diff --git a/kdict/options.h b/kdict/options.h
index ecef7606..c37ee30e 100644
--- a/kdict/options.h
+++ b/kdict/options.h
@@ -18,7 +18,7 @@
#ifndef _KDICT_OPTIONS_H_
#define _KDICT_OPTIONS_H_
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kdialogbase.h>
#include <kglobalsettings.h>
@@ -49,57 +49,57 @@ public:
void write();
// colors...
- const QColor& color(int i) { return c_olors[i]; }
- const QString& colorName(int i) { return c_olorNames[i]; }
+ const TQColor& color(int i) { return c_olors[i]; }
+ const TQString& colorName(int i) { return c_olorNames[i]; }
int colorCount() const { return COL_CNT; }
- QColor defaultColor(int i);
+ TQColor defaultColor(int i);
bool useCustomColors;
- QColor textColor();
- QColor backgroundColor();
- QColor headingsTextColor();
- QColor headingsBackgroundColor();
- QColor linksColor();
- QColor visitedLinksColor();
+ TQColor textColor();
+ TQColor backgroundColor();
+ TQColor headingsTextColor();
+ TQColor headingsBackgroundColor();
+ TQColor linksColor();
+ TQColor visitedLinksColor();
// fonts...
- const QFont& font(int i) { return f_onts[i]; }
- const QString& fontName(int i) { return f_ontNames[i]; }
+ const TQFont& font(int i) { return f_onts[i]; }
+ const TQString& fontName(int i) { return f_ontNames[i]; }
int fontCount() const { return FNT_CNT; }
- QFont defaultFont(int);
+ TQFont defaultFont(int);
bool useCustomFonts;
- QFont textFont();
- QFont headingsFont();
+ TQFont textFont();
+ TQFont headingsFont();
- QString encryptStr(const QString& aStr);
+ TQString encryptStr(const TQString& aStr);
bool defineClipboard; // define clipboard content on startup?
- QSize optSize,setsSize,matchSize; // window geometry
+ TQSize optSize,setsSize,matchSize; // window geometry
bool showMatchList;
- QValueList<int> splitterSizes;
+ TQValueList<int> splitterSizes;
KGlobalSettings::Completion queryComboCompletionMode;
- QStringList queryHistory;
+ TQStringList queryHistory;
bool saveHistory; // save query history to disk on exit?
unsigned int maxHistEntrys, maxBrowseListEntrys, maxDefinitions;
int headLayout;
- QString server; // network client...
+ TQString server; // network client...
int port,timeout,pipeSize,idleHold;
- QString encoding;
+ TQString encoding;
bool authEnabled;
- QString user, secret;
- QStringList serverDatabases, databases, strategies;
- QPtrList<QStringList> databaseSets;
+ TQString user, secret;
+ TQStringList serverDatabases, databases, strategies;
+ TQPtrList<TQStringList> databaseSets;
unsigned int currentDatabase, currentStrategy;
- QColor c_olors[COL_CNT];
- QString c_olorNames[COL_CNT];
- QFont f_onts[FNT_CNT];
- QString f_ontNames[FNT_CNT];
+ TQColor c_olors[COL_CNT];
+ TQString c_olorNames[COL_CNT];
+ TQFont f_onts[FNT_CNT];
+ TQString f_ontNames[FNT_CNT];
- QWidget *topLevel;
+ TQWidget *topLevel;
};
extern GlobalData *global;
@@ -114,59 +114,59 @@ class OptionsDialog : public KDialogBase
public:
- OptionsDialog(QWidget *parent=0, const char *name=0);
+ OptionsDialog(TQWidget *parent=0, const char *name=0);
~OptionsDialog();
//===================================================================================
- class DialogListBox : public QListBox {
+ class DialogListBox : public TQListBox {
public:
// alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus
- DialogListBox(bool alwaysIgnore=false, QWidget * parent=0, const char * name=0);
+ DialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0);
~DialogListBox();
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
bool a_lwaysIgnore;
};
//===================================================================================
- class ColorListItem : public QListBoxText {
+ class ColorListItem : public TQListBoxText {
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
~ColorListItem();
- const QColor& color() { return mColor; }
- void setColor( const QColor &color ) { mColor = color; }
+ const TQColor& color() { return mColor; }
+ void setColor( const TQColor &color ) { mColor = color; }
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
};
//===================================================================================
- class FontListItem : public QListBoxText {
+ class FontListItem : public TQListBoxText {
public:
- FontListItem( const QString &name, const QFont & );
+ FontListItem( const TQString &name, const TQFont & );
~FontListItem();
- const QFont& font() { return f_ont; }
- void setFont( const QFont &);
+ const TQFont& font() { return f_ont; }
+ void setFont( const TQFont &);
protected:
- virtual void paint( QPainter * );
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int width( const TQListBox * ) const;
private:
- QFont f_ont;
- QString fontInfo;
+ TQFont f_ont;
+ TQString fontInfo;
};
//===================================================================================
@@ -186,42 +186,42 @@ protected slots:
//colors
void slotColCheckBoxToggled(bool b);
- void slotColItemSelected(QListBoxItem *); // show color dialog for the entry
+ void slotColItemSelected(TQListBoxItem *); // show color dialog for the entry
void slotColDefaultBtnClicked();
void slotColChangeBtnClicked();
void slotColSelectionChanged();
//fonts
void slotFontCheckBoxToggled(bool b);
- void slotFontItemSelected(QListBoxItem *); // show font dialog for the entry
+ void slotFontItemSelected(TQListBoxItem *); // show font dialog for the entry
void slotFontDefaultBtnClicked();
void slotFontChangeBtnClicked();
void slotFontSelectionChanged();
private:
- QFrame *serverTab;
- QLabel *l_user, *l_secret;
+ TQFrame *serverTab;
+ TQLabel *l_user, *l_secret;
KLineEdit *w_server, *w_user, *w_secret, *w_port;
- QComboBox *w_encoding;
- QCheckBox *w_auth;
+ TQComboBox *w_encoding;
+ TQCheckBox *w_auth;
KIntSpinBox *w_idleHold,*w_timeout,*w_pipesize;
- QFrame *appTab;
+ TQFrame *appTab;
DialogListBox *c_List,
*f_List;
- QCheckBox *c_olorCB,
+ TQCheckBox *c_olorCB,
*f_ontCB;
- QPushButton *c_olDefBtn,
+ TQPushButton *c_olDefBtn,
*c_olChngBtn,
*f_ntDefBtn,
*f_ntChngBtn;
- QFrame *layoutTab;
- QRadioButton *w_layout[3];
+ TQFrame *layoutTab;
+ TQRadioButton *w_layout[3];
- QFrame *otherTab;
- QCheckBox *w_Clipboard, *w_Savehist;
+ TQFrame *otherTab;
+ TQCheckBox *w_Clipboard, *w_Savehist;
KIntSpinBox *w_Maxhist, *w_Maxbrowse, *w_MaxDefinitions;
bool configChanged;
};
diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp
index a2674d68..045b4e49 100644
--- a/kdict/queryview.cpp
+++ b/kdict/queryview.cpp
@@ -15,8 +15,8 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
#include <kfiledialog.h>
#include <ktempfile.h>
@@ -38,9 +38,9 @@
//******** SaveHelper *******************************************
-QString SaveHelper::lastPath;
+TQString SaveHelper::lastPath;
-SaveHelper::SaveHelper(const QString &saveName, const QString &filter, QWidget *parent)
+SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent)
: p_arent(parent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
{
}
@@ -61,7 +61,7 @@ SaveHelper::~SaveHelper()
}
-QFile* SaveHelper::getFile(const QString &dialogTitle)
+TQFile* SaveHelper::getFile(const TQString &dialogTitle)
{
url = KFileDialog::getSaveURL(lastPath+s_aveName,f_ilter,p_arent,dialogTitle);
@@ -72,14 +72,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle)
lastPath.truncate(lastPath.length()-url.fileName().length());
if (url.isLocalFile()) {
- if (QFileInfo(url.path()).exists() &&
+ 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()),
dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
return 0;
}
- file = new QFile(url.path());
+ file = new TQFile(url.path());
if(!file->open(IO_WriteOnly)) {
KMessageBox::error(global->topLevel, i18n("Unable to save file."));
delete file;
@@ -102,14 +102,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle)
//**** BrowseData ****************************************************
-BrowseData::BrowseData(const QString &Nhtml, const QString &NqueryText)
+BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText)
: html(Nhtml),queryText(NqueryText),xPos(0),yPos(0)
{}
//********* DictHTMLPart ******************************************
-DictHTMLPart::DictHTMLPart(QWidget *parentWidget, const char *widgetname)
+DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname)
: KHTMLPart(parentWidget,widgetname)
{}
@@ -130,8 +130,8 @@ void DictHTMLPart::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event)
//********* QueryView ******************************************
-QueryView::QueryView(QWidget *_parent)
-: QVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false)
+QueryView::QueryView(TQWidget *_parent)
+: TQVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false)
{
browseList.setAutoDelete(true);
@@ -140,16 +140,16 @@ QueryView::QueryView(QWidget *_parent)
part->setJScriptEnabled(false);
part->setJavaEnabled(false);
part->setURLCursor(KCursor::handCursor());
- setFocusPolicy(QWidget::NoFocus);
- connect(part, SIGNAL(completed()), SLOT(partCompleted()));
- connect(part, SIGNAL(middleButtonClicked()), SLOT(middleButtonClicked()));
+ setFocusPolicy(TQWidget::NoFocus);
+ connect(part, TQT_SIGNAL(completed()), TQT_SLOT(partCompleted()));
+ connect(part, TQT_SIGNAL(middleButtonClicked()), TQT_SLOT(middleButtonClicked()));
rightBtnMenu = new KPopupMenu(this);
- connect(part,SIGNAL(popupMenu(const QString &, const QPoint &)),this,SLOT(buildPopupMenu(const QString &, const QPoint &)));
- connect(part->browserExtension(),SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)),
- this,SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &)));
- connect(part->browserExtension(),SIGNAL(enableAction(const char *,bool)),this,SLOT(enableAction(const char *,bool)));
- QTimer::singleShot( 0, this, SLOT(optionsChanged()) );
- connect(interface,SIGNAL(resultReady(const QString &, const QString &)), SLOT(resultReady(const QString &, const QString &)));
+ connect(part,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),this,TQT_SLOT(buildPopupMenu(const TQString &, const TQPoint &)));
+ connect(part->browserExtension(),TQT_SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)),
+ this,TQT_SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &)));
+ connect(part->browserExtension(),TQT_SIGNAL(enableAction(const char *,bool)),this,TQT_SLOT(enableAction(const char *,bool)));
+ TQTimer::singleShot( 0, this, TQT_SLOT(optionsChanged()) );
+ connect(interface,TQT_SIGNAL(resultReady(const TQString &, const TQString &)), TQT_SLOT(resultReady(const TQString &, const TQString &)));
}
@@ -160,9 +160,9 @@ QueryView::~QueryView()
void QueryView::setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo)
{
actBack = NactBack;
- connect(actBack->popupMenu(),SIGNAL(activated(int)),SLOT(browseBack(int)));
+ connect(actBack->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseBack(int)));
actForward = NactForward;
- connect(actForward->popupMenu(),SIGNAL(activated(int)),SLOT(browseForward(int)));
+ connect(actForward->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseForward(int)));
actQueryCombo = NactQueryCombo;
}
@@ -183,26 +183,26 @@ void QueryView::optionsChanged()
{
saveCurrentResultPos();
- currentHTMLHeader = QString("<html><head><style type=\"text/css\">\n");
- currentHTMLHeader += QString("body { background-color:%1; color:%2; }\n").arg(global->backgroundColor().name()).arg(global->textColor().name());
- currentHTMLHeader += QString("a:link, a:active { color:%1; text-decoration:none; }\n").arg(global->linksColor().name());
- currentHTMLHeader += QString("a:visited { color:%1; text-decoration:none; }\n").arg(global->visitedLinksColor().name());
- currentHTMLHeader += QString("a:hover { color:%1; text-decoration:underline; }\n").arg(global->linksColor().name());
- currentHTMLHeader += QString("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("<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());
if (global->headingsFont().italic())
- currentHTMLHeader += QString("font-style:italic; ");
+ currentHTMLHeader += TQString("font-style:italic; ");
if (global->headingsFont().bold())
- currentHTMLHeader += QString("font-weight:bold; ");
- currentHTMLHeader += QString("}\n");
- currentHTMLHeader += QString("p.definition { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += QString("table { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += QString("pre { font-family:%1; font-size:%2pt; ").arg(global->textFont().family()).arg(global->textFont().pointSize());
+ currentHTMLHeader += TQString("font-weight:bold; ");
+ 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());
if (global->textFont().italic())
- currentHTMLHeader += QString("font-style:italic; ");
+ currentHTMLHeader += TQString("font-style:italic; ");
if (global->textFont().bold())
- currentHTMLHeader += QString("font-weight:bold; ");
- currentHTMLHeader += QString("}\n");
- currentHTMLHeader += QString("</style></head>\n");
+ currentHTMLHeader += TQString("font-weight:bold; ");
+ currentHTMLHeader += TQString("}\n");
+ currentHTMLHeader += TQString("</style></head>\n");
showResult(); // apply changes directly
}
@@ -230,14 +230,14 @@ void QueryView::saveQuery()
{
if (!browseList.isEmpty()) {
BrowseData* brw = browseList.at(browsePos);
- QString fName = brw->queryText+".html";
- fName.replace(QRegExp("[\\s/]"),"_");
+ TQString fName = brw->queryText+".html";
+ fName.replace(TQRegExp("[\\s/]"),"_");
SaveHelper helper(fName,"*.html",global->topLevel);
- QFile *file = helper.getFile(QString::null);
+ TQFile *file = helper.getFile(TQString::null);
if (file) {
- QTextStream stream(file);
- stream.setEncoding(QTextStream::Locale);
+ TQTextStream stream(file);
+ stream.setEncoding(TQTextStream::Locale);
stream << currentHTMLHeader+brw->html;
}
}
@@ -288,14 +288,14 @@ void QueryView::showFindDialog()
}
-void QueryView::paletteChange ( const QPalette & )
+void QueryView::paletteChange ( const TQPalette & )
{
optionsChanged();
}
-void QueryView::fontChange ( const QFont & )
+void QueryView::fontChange ( const TQFont & )
{
optionsChanged();
}
@@ -331,7 +331,7 @@ void QueryView::showResult()
}
-void QueryView::resultReady(const QString &result, const QString &query)
+void QueryView::resultReady(const TQString &result, const TQString &query)
{
BrowseData* brw = new BrowseData(result,query);
@@ -370,8 +370,8 @@ void QueryView::partCompleted()
void QueryView::slotURLRequest (const KURL &url, const KParts::URLArgs &)
{
- QString type = url.host();
- QString urlText = url.prettyURL();
+ TQString type = url.host();
+ TQString urlText = url.prettyURL();
urlText.remove(0,8+type.length());
if (type.length()) { // valid url
@@ -394,40 +394,40 @@ void QueryView::middleButtonClicked()
// construct the right-mouse-button-popup-menu on demand
-void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
+void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
{
rightBtnMenu->clear();
if (!url.isEmpty()) { // menuitem if mouse is over link
KURL u(url);
- QString type = u.host();
+ TQString type = u.host();
popupLink = u.prettyURL();
popupLink.remove(0,8+type.length());
if (type.length()) { // valid url
if(type=="define") {
rightBtnMenu->insertItem(i18n("Define &Synonym"),
- this,SLOT(popupDefineLink()));
+ this,TQT_SLOT(popupDefineLink()));
rightBtnMenu->insertItem(i18n("M&atch Synonym"),
- this,SLOT(popupMatchLink()));
+ this,TQT_SLOT(popupMatchLink()));
rightBtnMenu->insertSeparator();
}
if(type=="dbinfo") {
- rightBtnMenu->insertItem(i18n("D&atabase Information"),this,SLOT(popupDbInfo()));
+ rightBtnMenu->insertItem(i18n("D&atabase Information"),this,TQT_SLOT(popupDbInfo()));
rightBtnMenu->insertSeparator();
}
if(type=="realhttp") {
popupLink.prepend("http://");
rightBtnMenu->insertItem(SmallIcon("fileopen"),
i18n("&Open Link"),
- this,SLOT(popupOpenLink()));
+ this,TQT_SLOT(popupOpenLink()));
rightBtnMenu->insertSeparator();
}
if(type=="realftp") {
popupLink.prepend("ftp://");
rightBtnMenu->insertItem(SmallIcon("fileopen"),
i18n("&Open Link"),
- this,SLOT(popupOpenLink()));
+ this,TQT_SLOT(popupOpenLink()));
rightBtnMenu->insertSeparator();
}
}
@@ -436,24 +436,24 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (part->hasSelection()) {
popupSelect = part->selectedText();
rightBtnMenu->insertItem(i18n("&Define Selection"),
- this,SLOT(popupDefineSelect()));
+ this,TQT_SLOT(popupDefineSelect()));
rightBtnMenu->insertItem(i18n("&Match Selection"),
- this,SLOT(popupMatchSelect()));
+ this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
} else {
kapp->clipboard()->setSelectionMode(false);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(true);
text = kapp->clipboard()->text();
}
if (!text.isEmpty()) {
- popupSelect = QApplication::clipboard()->text();
+ popupSelect = TQApplication::clipboard()->text();
rightBtnMenu->insertItem(SmallIcon("define_clip"),
i18n("&Define Clipboard Content"),
- this,SLOT(popupDefineSelect()));
+ this,TQT_SLOT(popupDefineSelect()));
rightBtnMenu->insertItem(i18n("&Match Clipboard Content"),
- this,SLOT(popupMatchSelect()));
+ this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
}
}
@@ -464,13 +464,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (browseList.at(browsePos-1)->queryText.isEmpty())
rightBtnMenu->insertItem(SmallIcon("back"),
i18n("&Back: Information"),
- this,SLOT(browseBack()));
+ this,TQT_SLOT(browseBack()));
else
rightBtnMenu->insertItem(SmallIcon("back"),
i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)),
- this,SLOT(browseBack()));
+ this,TQT_SLOT(browseBack()));
} else {
- ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, SLOT(browseBack()));
+ ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, TQT_SLOT(browseBack()));
rightBtnMenu->setItemEnabled(ID,false);
}
@@ -478,13 +478,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point)
if (browseList.at(browsePos+1)->queryText.isEmpty())
rightBtnMenu->insertItem(SmallIcon("forward"),
i18n("&Forward: Information"),
- this,SLOT(browseForward()));
+ this,TQT_SLOT(browseForward()));
else
rightBtnMenu->insertItem(SmallIcon("forward"),
i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)),
- this,SLOT(browseForward()));
+ this,TQT_SLOT(browseForward()));
} else {
- ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,SLOT(browseForward()));
+ ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,TQT_SLOT(browseForward()));
rightBtnMenu->setItemEnabled(ID,false);
}
@@ -544,7 +544,7 @@ void QueryView::browseBack(int index)
browsePos = x;
actQueryCombo->setEditText(browseList.at(browsePos)->queryText);
showResult();
- QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot
+ TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot
}
}
@@ -557,7 +557,7 @@ void QueryView::browseForward(int index)
browsePos = x;
actQueryCombo->setEditText(browseList.at(browsePos)->queryText);
showResult();
- QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot
+ TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot
}
}
@@ -574,7 +574,7 @@ void QueryView::updateBrowseActions()
actBack->popupMenu()->clear();
int i = browsePos-1;
int num = 1;
- QString s;
+ TQString s;
while ((i>=0)&&(num<=10)) {
s = browseList.at(i)->queryText;
if (s.isEmpty()) s = i18n("Information");
@@ -598,7 +598,7 @@ void QueryView::updateBrowseActions()
actForward->popupMenu()->clear();
int i = browsePos+1;
int num = 1;
- QString s;
+ TQString s;
while ((i<(int)(browseList.count()))&&(num<=10)) {
s = browseList.at(i)->queryText;
if (s.isEmpty()) s = i18n("Information");
diff --git a/kdict/queryview.h b/kdict/queryview.h
index e942d297..e87bd977 100644
--- a/kdict/queryview.h
+++ b/kdict/queryview.h
@@ -19,7 +19,7 @@
#ifndef _QUERYVIEW_H_
#define _QUERYVIEW_H_
-#include <qvbox.h>
+#include <tqvbox.h>
#include <khtml_part.h>
class QFile;
@@ -28,7 +28,7 @@ class KPopupMenu;
class DictComboAction;
-QString getShortString(QString str,unsigned int length);
+TQString getShortString(TQString str,unsigned int length);
//******** SaveHelper *******************************************
@@ -38,20 +38,20 @@ class SaveHelper {
public:
- SaveHelper(const QString &saveName, const QString &filter, QWidget *parent);
+ SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent);
~SaveHelper();
// returns a file open for writing
- QFile* getFile(const QString &dialogTitle);
+ TQFile* getFile(const TQString &dialogTitle);
private:
- QWidget *p_arent;
- QString s_aveName, f_ilter;
+ TQWidget *p_arent;
+ TQString s_aveName, f_ilter;
KURL url;
- QFile* file;
+ TQFile* file;
KTempFile* tmpFile;
- static QString lastPath;
+ static TQString lastPath;
};
@@ -64,10 +64,10 @@ class BrowseData
public:
- BrowseData(const QString &Nhtml, const QString &NqueryText);
+ BrowseData(const TQString &Nhtml, const TQString &NqueryText);
- QString html;
- QString queryText;
+ TQString html;
+ TQString queryText;
int xPos,yPos;
};
@@ -80,7 +80,7 @@ class DictHTMLPart : public KHTMLPart
public:
- DictHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0);
+ DictHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0);
~DictHTMLPart();
signals:
@@ -101,7 +101,7 @@ class QueryView : public QVBox
public:
- QueryView(QWidget *_parent = 0L);
+ QueryView(TQWidget *_parent = 0L);
~QueryView();
void setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo);
@@ -123,30 +123,30 @@ public slots:
signals:
- void defineRequested(const QString &query);
- void matchRequested(const QString &query);
+ void defineRequested(const TQString &query);
+ void matchRequested(const TQString &query);
void clipboardRequested();
void enableCopy(bool selected); // emited when the user selects/deselects text
void enablePrintSave();
void renderingStarted();
void renderingStopped();
- void newCaption(const QString&);
+ void newCaption(const TQString&);
protected:
- void paletteChange ( const QPalette & );
- void fontChange ( const QFont & );
+ void paletteChange ( const TQPalette & );
+ void fontChange ( const TQFont & );
void saveCurrentResultPos();
void showResult();
protected slots:
- void resultReady(const QString &result, const QString &query);
+ void resultReady(const TQString &result, const TQString &query);
void partCompleted();
void slotURLRequest (const KURL &url, const KParts::URLArgs &args);
void middleButtonClicked();
- void buildPopupMenu(const QString &url, const QPoint &point);
+ void buildPopupMenu(const TQString &url, const TQPoint &point);
void popupDefineLink();
void popupMatchLink();
void popupOpenLink();
@@ -166,11 +166,11 @@ private:
DictComboAction *actQueryCombo;
KPopupMenu *rightBtnMenu;
- QString popupLink,popupSelect; // needed for rightbtn-popup menu
+ TQString popupLink,popupSelect; // needed for rightbtn-popup menu
- QPtrList<BrowseData> browseList;
+ TQPtrList<BrowseData> browseList;
unsigned int browsePos; // position in browseList
- QString currentHTMLHeader;
+ TQString currentHTMLHeader;
bool isRendering;
};
diff --git a/kdict/sets.cpp b/kdict/sets.cpp
index 0a252cec..513106da 100644
--- a/kdict/sets.cpp
+++ b/kdict/sets.cpp
@@ -13,10 +13,10 @@
------------------------------------------------------------- */
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <kiconloader.h>
#include <kseparator.h>
@@ -29,44 +29,44 @@
//********* DbSetsDialog ******************************************
-DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
+DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name)
: KDialogBase(Plain, i18n("Database Sets"),Close | Help, Close, parent, name, false, true)
{
- QFrame* page=plainPage();
+ TQFrame* page=plainPage();
- QStringList sets;
+ TQStringList sets;
for(unsigned int i=1;i<global->databaseSets.count()+1;i++)
sets.append(global->databases[i]);
- QVBoxLayout * topLayout = new QVBoxLayout(page, 0, 0);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(page, 0, 0);
- QHBoxLayout * subLayout1 = new QHBoxLayout(5);
+ TQHBoxLayout * subLayout1 = new TQHBoxLayout(5);
topLayout->addLayout(subLayout1,0);
- w_set = new QComboBox(true,page);
+ w_set = new TQComboBox(true,page);
w_set->setFixedHeight(w_set->sizeHint().height());
- w_set->setInsertionPolicy (QComboBox::NoInsertion);
+ w_set->setInsertionPolicy (TQComboBox::NoInsertion);
w_set->insertStringList(sets);
- connect(w_set, SIGNAL(activated(int)),this, SLOT(activateSet(int)));
- QLabel *l = new QLabel(w_set, i18n("&Set:"),page);
+ 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());
subLayout1->addWidget(l,0);
subLayout1->addWidget(w_set,1);
subLayout1->addSpacing(8);
- w_save = new QPushButton(i18n("S&ave"),page);
- connect(w_save,SIGNAL(clicked()),this, SLOT(transferSet()));
+ w_save = new TQPushButton(i18n("S&ave"),page);
+ connect(w_save,TQT_SIGNAL(clicked()),this, TQT_SLOT(transferSet()));
subLayout1->addWidget(w_save,0);
- QPushButton *btn = new QPushButton(i18n("&New"),page);
+ TQPushButton *btn = new TQPushButton(i18n("&New"),page);
btn->setMinimumSize(btn->sizeHint());
- connect(btn, SIGNAL(clicked()),this, SLOT(newPressed()));
+ connect(btn, TQT_SIGNAL(clicked()),this, TQT_SLOT(newPressed()));
subLayout1->addWidget(btn,0);
- w_delete = new QPushButton(i18n("&Delete"),page);
+ w_delete = new TQPushButton(i18n("&Delete"),page);
w_delete->setMinimumSize(w_delete->sizeHint());
- connect(w_delete, SIGNAL(clicked()),this, SLOT(deletePressed()));
+ connect(w_delete, TQT_SIGNAL(clicked()),this, TQT_SLOT(deletePressed()));
subLayout1->addWidget(w_delete,0);
topLayout->addSpacing(8);
@@ -76,41 +76,41 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
topLayout->addSpacing(8);
- QGridLayout * subLayout2 = new QGridLayout(7,3,6);
+ TQGridLayout * subLayout2 = new TQGridLayout(7,3,6);
topLayout->addLayout(subLayout2,1);
- w_leftBox = new QListBox(page);
- connect(w_leftBox, SIGNAL(selected(int)),this, SLOT(leftSelected(int)));
- connect(w_leftBox, SIGNAL(highlighted(int)),this, SLOT(leftHighlighted(int)));
- QLabel *leftLabel = new QLabel(w_leftBox, i18n("S&elected databases:"),page);
+ w_leftBox = new TQListBox(page);
+ 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());
subLayout2->addWidget(leftLabel,0,0);
subLayout2->addMultiCellWidget(w_leftBox,1,6,0,0);
- w_allLeft = new QPushButton(page);
+ w_allLeft = new TQPushButton(page);
w_allLeft->setIconSet(BarIconSet("2leftarrow"));
- connect(w_allLeft, SIGNAL(clicked()),this, SLOT(allLeftPressed()));
+ connect(w_allLeft, TQT_SIGNAL(clicked()),this, TQT_SLOT(allLeftPressed()));
subLayout2->addWidget(w_allLeft,2,1);
- w_left = new QPushButton(page);
+ w_left = new TQPushButton(page);
w_left->setIconSet(BarIconSet("1leftarrow"));
- connect(w_left, SIGNAL(clicked()),this, SLOT(leftPressed()));
+ connect(w_left, TQT_SIGNAL(clicked()),this, TQT_SLOT(leftPressed()));
subLayout2->addWidget(w_left,3,1);
- w_right = new QPushButton(page);
+ w_right = new TQPushButton(page);
w_right->setIconSet(BarIconSet("1rightarrow"));
- connect(w_right, SIGNAL(clicked()),this, SLOT(rightPressed()));
+ connect(w_right, TQT_SIGNAL(clicked()),this, TQT_SLOT(rightPressed()));
subLayout2->addWidget(w_right,4,1);
- w_allRight = new QPushButton(page);
+ w_allRight = new TQPushButton(page);
w_allRight->setIconSet(BarIconSet("2rightarrow"));
- connect(w_allRight, SIGNAL(clicked()),this, SLOT(allRightPressed()));
+ connect(w_allRight, TQT_SIGNAL(clicked()),this, TQT_SLOT(allRightPressed()));
subLayout2->addWidget(w_allRight,5,1);
- w_rightBox = new QListBox(page);
- connect(w_rightBox, SIGNAL(selected(int)),this, SLOT(rightSelected(int)));
- connect(w_rightBox, SIGNAL(highlighted(int)),this, SLOT(rightHighlighted(int)));
- QLabel *rightLabel = new QLabel(w_rightBox, i18n("A&vailable databases:"),page);
+ w_rightBox = new TQListBox(page);
+ 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());
subLayout2->addWidget(rightLabel,0,2);
subLayout2->addMultiCellWidget(w_rightBox,1,6,2,2);
@@ -135,7 +135,7 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name)
}
-void DbSetsDialog::hideEvent(QHideEvent *)
+void DbSetsDialog::hideEvent(TQHideEvent *)
{
global->setsSize = size();
emit(dialogClosed());
@@ -144,14 +144,14 @@ void DbSetsDialog::hideEvent(QHideEvent *)
void DbSetsDialog::newPressed()
{
- QStringList *temp = new QStringList;
+ TQStringList *temp = new QStringList;
temp->append(i18n("New Set"));
global->databaseSets.append(temp);
global->databases.insert(global->databases.at(global->databaseSets.count()),i18n("New Set"));
if (global->currentDatabase >= global->databaseSets.count())
global->currentDatabase++;
- QStringList sets; // reread sets, because w_sets internal list is not correct in all cases
+ TQStringList sets; // reread sets, because w_sets internal list is not correct in all cases
for(unsigned int i=1;i<global->databaseSets.count()+1;i++)
sets.append(global->databases[i]);
w_set->clear();
diff --git a/kdict/sets.h b/kdict/sets.h
index 3e874a6e..64c75de6 100644
--- a/kdict/sets.h
+++ b/kdict/sets.h
@@ -30,7 +30,7 @@ class DbSetsDialog : public KDialogBase
public:
- DbSetsDialog(QWidget *parent=0, const char *name=0);
+ DbSetsDialog(TQWidget *parent=0, const char *name=0);
signals:
@@ -38,7 +38,7 @@ signals:
void dialogClosed();
protected:
- void hideEvent(QHideEvent *);
+ void hideEvent(TQHideEvent *);
private slots:
@@ -60,9 +60,9 @@ private:
void checkButtons();
- QComboBox *w_set;
- QListBox *w_leftBox, *w_rightBox;
- QPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight;
+ TQComboBox *w_set;
+ TQListBox *w_leftBox, *w_rightBox;
+ TQPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight;
};
#endif
diff --git a/kdict/toplevel.cpp b/kdict/toplevel.cpp
index ee334cbd..f0842512 100644
--- a/kdict/toplevel.cpp
+++ b/kdict/toplevel.cpp
@@ -14,7 +14,7 @@
------------------------------------------------------------- */
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include <kstdaccel.h>
#include <kstdaction.h>
@@ -35,8 +35,8 @@
#include "toplevel.h"
-// cut a QString and add "..."
-QString getShortString(QString str,unsigned int length)
+// cut a TQString and add "..."
+TQString getShortString(TQString str,unsigned int length)
{
if (str.length()>length) {
str.truncate(length-3);
@@ -50,7 +50,7 @@ DictInterface *interface;
GlobalData *global;
-TopLevel::TopLevel(QWidget* parent, const char* name)
+TopLevel::TopLevel(TQWidget* parent, const char* name)
: DCOPObject("KDictIface"), KMainWindow(parent, name, WType_TopLevel),
optDlg(0L), setsDlg(0L), stopRef(0)
{
@@ -61,26 +61,26 @@ TopLevel::TopLevel(QWidget* parent, const char* name)
global->topLevel = this;
global->read();
interface = new DictInterface();
- connect(interface,SIGNAL(infoReady()),SLOT(stratDbChanged()));
- connect(interface,SIGNAL(started(const QString&)),SLOT(clientStarted(const QString&)));
- connect(interface,SIGNAL(stopped(const QString&)),SLOT(clientStopped(const QString&)));
+ connect(interface,TQT_SIGNAL(infoReady()),TQT_SLOT(stratDbChanged()));
+ connect(interface,TQT_SIGNAL(started(const TQString&)),TQT_SLOT(clientStarted(const TQString&)));
+ connect(interface,TQT_SIGNAL(stopped(const TQString&)),TQT_SLOT(clientStopped(const TQString&)));
queryView = new QueryView(this);
- connect(queryView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&)));
- connect(queryView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&)));
- connect(queryView,SIGNAL(clipboardRequested()),SLOT(defineClipboard()));
- connect(queryView,SIGNAL(enableCopy(bool)),SLOT(enableCopy(bool)));
- connect(queryView,SIGNAL(enablePrintSave()),SLOT(enablePrintSave()));
- connect(queryView,SIGNAL(renderingStarted()),SLOT(renderingStarted()));
- connect(queryView,SIGNAL(renderingStopped()),SLOT(renderingStopped()));
- connect(queryView,SIGNAL(newCaption(const QString&)),SLOT(newCaption(const QString&)));
+ connect(queryView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&)));
+ connect(queryView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&)));
+ connect(queryView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(defineClipboard()));
+ connect(queryView,TQT_SIGNAL(enableCopy(bool)),TQT_SLOT(enableCopy(bool)));
+ connect(queryView,TQT_SIGNAL(enablePrintSave()),TQT_SLOT(enablePrintSave()));
+ connect(queryView,TQT_SIGNAL(renderingStarted()),TQT_SLOT(renderingStarted()));
+ connect(queryView,TQT_SIGNAL(renderingStopped()),TQT_SLOT(renderingStopped()));
+ connect(queryView,TQT_SIGNAL(newCaption(const TQString&)),TQT_SLOT(newCaption(const TQString&)));
matchView = new MatchView();
- connect(matchView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&)));
- connect(matchView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&)));
- connect(matchView,SIGNAL(clipboardRequested()),SLOT(matchClipboard()));
- connect(matchView,SIGNAL(windowClosed()),SLOT(toggleMatchListShow()));
- connect(&resetStatusbarTimer,SIGNAL(timeout()),SLOT(resetStatusbar()));
+ connect(matchView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&)));
+ connect(matchView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&)));
+ connect(matchView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(matchClipboard()));
+ connect(matchView,TQT_SIGNAL(windowClosed()),TQT_SLOT(toggleMatchListShow()));
+ connect(&resetStatusbarTimer,TQT_SIGNAL(timeout()),TQT_SLOT(resetStatusbar()));
setupStatusBar();
setupActions();
@@ -89,12 +89,12 @@ TopLevel::TopLevel(QWidget* parent, const char* name)
if (global->showMatchList)
{ // show splitter, html view & match list
- splitter = new QSplitter(QSplitter::Horizontal,this);
+ splitter = new TQSplitter(TQSplitter::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
queryView->reparent(splitter,0,queryView->pos(),true);
matchView->reparent(splitter,0,matchView->pos(),true);
setCentralWidget(splitter);
- splitter->setResizeMode(matchView,QSplitter::KeepSize);
+ splitter->setResizeMode(matchView,TQSplitter::KeepSize);
adjustMatchViewSize();
}
else
@@ -139,7 +139,7 @@ void TopLevel::makeActiveWindow()
}
-void TopLevel::definePhrase(QString phrase)
+void TopLevel::definePhrase(TQString phrase)
{
kdDebug(5004) << "*DCOP call* TopLevel::definePhrase()" << endl;
define(phrase);
@@ -147,7 +147,7 @@ void TopLevel::definePhrase(QString phrase)
}
-void TopLevel::matchPhrase(QString phrase)
+void TopLevel::matchPhrase(TQString phrase)
{
kdDebug(5004) << "*DCOP call* TopLevel::matchPhrase()" << endl;
match(phrase);
@@ -171,35 +171,35 @@ void TopLevel::matchClipboardContent()
}
-QStringList TopLevel::getDatabases()
+TQStringList TopLevel::getDatabases()
{
kdDebug(5004) << "*DCOP call* TopLevel::getDatabases()" << endl;
return global->databases;
}
-QString TopLevel::currentDatabase()
+TQString TopLevel::currentDatabase()
{
kdDebug(5004) << "*DCOP call* TopLevel::currentDatabase()" << endl;
return global->databases[global->currentDatabase];
}
-QStringList TopLevel::getStrategies()
+TQStringList TopLevel::getStrategies()
{
kdDebug(5004) << "*DCOP call* TopLevel::getStrategies()" << endl;
return global->strategies;
}
-QString TopLevel::currentStrategy()
+TQString TopLevel::currentStrategy()
{
kdDebug(5004) << "*DCOP call* TopLevel::currentStrategy()" << endl;
return global->strategies[global->currentStrategy];
}
-bool TopLevel::setDatabase(QString db)
+bool TopLevel::setDatabase(TQString db)
{
kdDebug(5004) << "*DCOP call* TopLevel::setDatabase()" << endl;
@@ -214,7 +214,7 @@ bool TopLevel::setDatabase(QString db)
}
-bool TopLevel::setStrategy(QString strategy)
+bool TopLevel::setStrategy(TQString strategy)
{
kdDebug(5004) << "*DCOP call* TopLevel::setStrategy()" << endl;
@@ -249,7 +249,7 @@ bool TopLevel::historyGoForward()
// *******************************************************************************
-void TopLevel::define(const QString &query)
+void TopLevel::define(const TQString &query)
{
kdDebug(5004) << "TopLevel::define()" << endl;
actQueryCombo->setEditText(query);
@@ -261,7 +261,7 @@ void TopLevel::defineClipboard()
{
kdDebug(5004) << "TopLevel::defineClipboard()" << endl;
kapp->clipboard()->setSelectionMode(true);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(false);
text = kapp->clipboard()->text();
@@ -270,7 +270,7 @@ void TopLevel::defineClipboard()
}
-void TopLevel::match(const QString &query)
+void TopLevel::match(const TQString &query)
{
kdDebug(5004) << "TopLevel::match()" << endl;
actQueryCombo->setEditText(query);
@@ -282,7 +282,7 @@ void TopLevel::matchClipboard()
{
kdDebug(5004) << "TopLevel::matchClipboard()" << endl;
kapp->clipboard()->setSelectionMode(true);
- QString text = kapp->clipboard()->text();
+ TQString text = kapp->clipboard()->text();
if (text.isEmpty()) {
kapp->clipboard()->setSelectionMode(false);
text = kapp->clipboard()->text();
@@ -308,80 +308,80 @@ bool TopLevel::queryClose()
void TopLevel::setupActions()
{
// file menu...
- actSave = KStdAction::save(queryView, SLOT(saveQuery()), actionCollection());
+ actSave = KStdAction::save(queryView, TQT_SLOT(saveQuery()), actionCollection());
actSave->setText(i18n("&Save As..."));
actSave->setEnabled(false);
- actPrint = KStdAction::print(queryView, SLOT(printQuery()), actionCollection());
+ actPrint = KStdAction::print(queryView, TQT_SLOT(printQuery()), actionCollection());
actPrint->setEnabled(false);
actStartQuery = new KAction(i18n("St&art Query"),"reload", 0 , this,
- SLOT(doDefine()), actionCollection(), "start_query");
+ TQT_SLOT(doDefine()), actionCollection(), "start_query");
actStopQuery = new KAction(i18n("St&op Query"),"stop", 0 , this,
- SLOT(stopClients()), actionCollection(), "stop_query");
+ TQT_SLOT(stopClients()), actionCollection(), "stop_query");
actStopQuery->setEnabled(false);
- KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
// edit menu...
- actCopy = KStdAction::copy(queryView, SLOT(copySelection()), actionCollection());
+ actCopy = KStdAction::copy(queryView, TQT_SLOT(copySelection()), actionCollection());
actCopy->setEnabled(false);
- KStdAction::selectAll(queryView, SLOT(selectAll()), actionCollection());
+ KStdAction::selectAll(queryView, TQT_SLOT(selectAll()), actionCollection());
new KAction(i18n("&Define Clipboard Content"), "define_clip", 0 , this,
- SLOT(defineClipboard()), actionCollection(), "define_clipboard");
+ TQT_SLOT(defineClipboard()), actionCollection(), "define_clipboard");
new KAction(i18n("&Match Clipboard Content"), 0 , this,
- SLOT(matchClipboard()), actionCollection(), "match_clipboard");
- KStdAction::find(queryView, SLOT(showFindDialog()), actionCollection());
+ TQT_SLOT(matchClipboard()), actionCollection(), "match_clipboard");
+ KStdAction::find(queryView, TQT_SLOT(showFindDialog()), actionCollection());
// history menu...
actBack = new KToolBarPopupAction(i18n("&Back"), "back", KStdAccel::shortcut(KStdAccel::Back),
- queryView, SLOT(browseBack()), actionCollection(),"browse_back");
+ 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, SLOT(browseForward()), actionCollection(),"browse_forward");
+ queryView, TQT_SLOT(browseForward()), actionCollection(),"browse_forward");
actForward->setDelayed(true);
actForward->setStickyMenu(false);
actForward->setEnabled(false);
new KAction(i18n("&Clear History"), 0 , this,
- SLOT(clearQueryHistory()), actionCollection(), "clear_history");
+ TQT_SLOT(clearQueryHistory()), actionCollection(), "clear_history");
// server menu...
new KAction(i18n("&Get Capabilities"), 0 , interface,
- SLOT(updateServer()), actionCollection(), "get_capabilities");
+ TQT_SLOT(updateServer()), actionCollection(), "get_capabilities");
new KAction(i18n("Edit &Database Sets..."), "edit", 0 , this,
- SLOT(showSetsDialog()), actionCollection(), "edit_sets");
+ TQT_SLOT(showSetsDialog()), actionCollection(), "edit_sets");
new KAction(i18n("&Summary"), 0 , interface,
- SLOT(showDatabases()), actionCollection(), "db_summary");
+ TQT_SLOT(showDatabases()), actionCollection(), "db_summary");
new KAction(i18n("S&trategy Information"), 0 , interface,
- SLOT(showStrategies()), actionCollection(), "strategy_info");
+ TQT_SLOT(showStrategies()), actionCollection(), "strategy_info");
new KAction(i18n("&Server Information"), 0 , interface,
- SLOT(showInfo()), actionCollection(), "server_info");
+ TQT_SLOT(showInfo()), actionCollection(), "server_info");
// settings menu...
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
actShowMatchList = new KToggleAction(i18n("Show &Match List"), 0 , this,
- SLOT(toggleMatchListShow()), actionCollection(), "show_match");
+ TQT_SLOT(toggleMatchListShow()), actionCollection(), "show_match");
actShowMatchList->setCheckedState(i18n("Hide &Match List"));
actShowMatchList->setChecked(global->showMatchList);
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection());
- KStdAction::preferences(this, SLOT(showOptionsDialog()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(showOptionsDialog()), actionCollection());
// toolbar...
new KAction(i18n("Clear Input Field"), "query_erase", 0 , this,
- SLOT(clearInput()), actionCollection(), "clear_query");
+ TQT_SLOT(clearInput()), actionCollection(), "clear_query");
actQueryLabel = new DictLabelAction(i18n("&Look for:"), actionCollection(), "look_label");
actQueryCombo = new DictComboAction(i18n("Query"), actionCollection(), "query_combo",true,true);
- connect(actQueryCombo,SIGNAL(activated(const QString &)), SLOT(define(const QString&)));
+ connect(actQueryCombo,TQT_SIGNAL(activated(const TQString &)), TQT_SLOT(define(const TQString&)));
actQueryCombo->setCompletionMode(global->queryComboCompletionMode);
actDbLabel = new DictLabelAction(i18n("&in"), actionCollection(), "in_label");
actDbCombo = new DictComboAction(i18n("Databases"), actionCollection(), "db_combo",false,false);
- connect(actDbCombo,SIGNAL(activated(int)),SLOT(databaseSelected(int)));
- actDefineBtn = new DictButtonAction(i18n("&Define"), this, SLOT(doDefine()), actionCollection(), "define_btn");
- actMatchBtn = new DictButtonAction(i18n("&Match"), this, SLOT(doMatch()), actionCollection(), "match_btn");
+ 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");
queryView->setActions(actBack,actForward,actQueryCombo);
}
@@ -392,13 +392,13 @@ void TopLevel::setupStatusBar()
statusBar()->insertItem(i18n(" Ready "),0,2);
statusBar()->setItemAlignment(0,AlignLeft | AlignVCenter);
- QString serverInfo;
+ TQString serverInfo;
if (global->authEnabled)
- serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50))
+ serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
.arg(getShortString(global->server,50))
.arg(global->port);
else
- serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50))
+ serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
.arg(global->port);
statusBar()->insertItem(serverInfo, 1,3);
statusBar()->setItemAlignment(1,AlignLeft | AlignVCenter);
@@ -429,7 +429,7 @@ void TopLevel::recreateGUI()
// add text in the query-combobox to the history
void TopLevel::addCurrentInputToHistory()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
// maintain queryHistory
global->queryHistory.remove(text); // no double entrys
@@ -455,7 +455,7 @@ void TopLevel::clearInput()
// define text in the combobox
void TopLevel::doDefine()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
if (!text.isEmpty())
{
@@ -468,7 +468,7 @@ void TopLevel::doDefine()
void TopLevel::doMatch()
{
- QString text(actQueryCombo->currentText());
+ TQString text(actQueryCombo->currentText());
if (!text.isEmpty())
{
@@ -503,8 +503,8 @@ 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, SLOT(queryHistMenu()),
- (QObject*)0, global->queryHistory[i].utf8().data()) );
+ historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, TQT_SLOT(queryHistMenu()),
+ (TQObject*)0, global->queryHistory[i].utf8().data()) );
i++;
}
@@ -515,9 +515,9 @@ void TopLevel::buildHistMenu()
// process a query via the history menu
void TopLevel::queryHistMenu()
{
- QCString name = sender()->name();
+ TQCString name = sender()->name();
if (!name.isEmpty())
- define(QString::fromUtf8(name));
+ define(TQString::fromUtf8(name));
}
@@ -542,8 +542,8 @@ void TopLevel::stratDbChanged()
dbActionList.clear();
for (unsigned int i=0;i<global->serverDatabases.count();i++)
- dbActionList.append( new KAction(global->serverDatabases[i], 0, this, SLOT(dbInfoMenuClicked()),
- (QObject*)0, global->serverDatabases[i].utf8().data()) );
+ dbActionList.append( new KAction(global->serverDatabases[i], 0, 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()
{
- QCString name = sender()->name();
+ TQCString name = sender()->name();
if (!name.isEmpty())
interface->showDbInfo(name);
}
@@ -576,7 +576,7 @@ void TopLevel::enablePrintSave()
}
-void TopLevel::clientStarted(const QString &message)
+void TopLevel::clientStarted(const TQString &message)
{
statusBar()->changeItem(message,0);
resetStatusbarTimer.stop();
@@ -586,7 +586,7 @@ void TopLevel::clientStarted(const QString &message)
}
-void TopLevel::clientStopped(const QString &message)
+void TopLevel::clientStopped(const TQString &message)
{
statusBar()->changeItem(message,0);
resetStatusbarTimer.start(4000);
@@ -621,7 +621,7 @@ void TopLevel::renderingStopped()
}
-void TopLevel::newCaption(const QString &s)
+void TopLevel::newCaption(const TQString &s)
{
setCaption(s);
}
@@ -641,13 +641,13 @@ void TopLevel::toggleMatchListShow()
else // list is not visible -> show it
{
global->showMatchList = true;
- splitter = new QSplitter(QSplitter::Horizontal,this);
+ splitter = new TQSplitter(TQSplitter::Horizontal,this);
splitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
setCentralWidget(splitter);
splitter->show();
queryView->reparent(splitter,0,queryView->pos(),true);
matchView->reparent(splitter,0,matchView->pos(),true);
- splitter->setResizeMode(matchView,QSplitter::KeepSize);
+ splitter->setResizeMode(matchView,TQSplitter::KeepSize);
adjustMatchViewSize();
}
@@ -677,7 +677,7 @@ void TopLevel::slotConfToolbar()
{
saveMainWindowSettings(KGlobal::config(),"toplevel_options");
KEditToolbar dlg(actionCollection(), "kdictui.rc");
- connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -695,8 +695,8 @@ void TopLevel::showSetsDialog()
{
if (!setsDlg) {
setsDlg = new DbSetsDialog(this);
- connect(setsDlg,SIGNAL(setsChanged()),this,SLOT(setsChanged()));
- connect(setsDlg,SIGNAL(dialogClosed()),this,SLOT(hideSetsDialog()));
+ connect(setsDlg,TQT_SIGNAL(setsChanged()),this,TQT_SLOT(setsChanged()));
+ connect(setsDlg,TQT_SIGNAL(dialogClosed()),this,TQT_SLOT(hideSetsDialog()));
setsDlg->show();
} else {
KWin::activateWindow(setsDlg->winId());
@@ -724,8 +724,8 @@ void TopLevel::showOptionsDialog()
{
if (!optDlg) {
optDlg = new OptionsDialog(this);
- connect(optDlg,SIGNAL(optionsChanged()),this,SLOT(optionsChanged()));
- connect(optDlg,SIGNAL(finished()),this,SLOT(hideOptionsDialog()));
+ connect(optDlg,TQT_SIGNAL(optionsChanged()),this,TQT_SLOT(optionsChanged()));
+ connect(optDlg,TQT_SIGNAL(finished()),this,TQT_SLOT(hideOptionsDialog()));
optDlg->show();
} else {
KWin::activateWindow(optDlg->winId());
@@ -744,13 +744,13 @@ void TopLevel::hideOptionsDialog()
void TopLevel::optionsChanged()
{
- QString serverInfo;
+ TQString serverInfo;
if (global->authEnabled)
- serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50))
+ serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50))
.arg(getShortString(global->server,50))
.arg(global->port);
else
- serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50))
+ serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50))
.arg(global->port);
statusBar()->changeItem(serverInfo,1);
interface->serverChanged(); // inform client
diff --git a/kdict/toplevel.h b/kdict/toplevel.h
index cd8fa25d..bc803f75 100644
--- a/kdict/toplevel.h
+++ b/kdict/toplevel.h
@@ -17,7 +17,7 @@
#ifndef _TOPLEVEL_H_
#define _TOPLEVEL_H_
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kmainwindow.h>
#include "dcopinterface.h"
@@ -43,7 +43,7 @@ class TopLevel : public KMainWindow, virtual public KDictIface
public:
- TopLevel(QWidget* parent = 0, const char* name = 0);
+ TopLevel(TQWidget* parent = 0, const char* name = 0);
~TopLevel();
void normalStartup(); // called when started without commandline parameters
@@ -51,25 +51,25 @@ public:
// DCOP-Interface...
void quit();
void makeActiveWindow();
- void definePhrase(QString phrase);
- void matchPhrase(QString phrase);
+ void definePhrase(TQString phrase);
+ void matchPhrase(TQString phrase);
void defineClipboardContent();
void matchClipboardContent();
- QStringList getDatabases();
- QString currentDatabase();
- QStringList getStrategies();
- QString currentStrategy();
- bool setDatabase(QString db);
- bool setStrategy(QString strategy);
+ TQStringList getDatabases();
+ TQString currentDatabase();
+ TQStringList getStrategies();
+ TQString currentStrategy();
+ bool setDatabase(TQString db);
+ bool setStrategy(TQString strategy);
bool historyGoBack();
bool historyGoForward();
public slots:
- void define(const QString &query);
+ void define(const TQString &query);
void defineClipboard();
- void match(const QString &query);
+ void match(const TQString &query);
void matchClipboard();
protected:
@@ -103,13 +103,13 @@ private slots:
void enableCopy(bool selected);
void enablePrintSave();
- void clientStarted(const QString &message);
- void clientStopped(const QString &message);
+ void clientStarted(const TQString &message);
+ void clientStopped(const TQString &message);
void resetStatusbar();
void renderingStarted();
void renderingStopped();
- void newCaption(const QString&);
+ void newCaption(const TQString&);
void toggleMatchListShow();
void saveMatchViewSize();
@@ -133,16 +133,16 @@ private:
DictLabelAction *actQueryLabel, *actDbLabel;
DictComboAction *actQueryCombo, *actDbCombo;
DictButtonAction *actDefineBtn, *actMatchBtn;
- QPtrList<KAction> historyActionList, dbActionList;
+ TQPtrList<KAction> historyActionList, dbActionList;
KToolBarPopupAction *actBack, *actForward;
- QSplitter *splitter; // widgets....
+ TQSplitter *splitter; // widgets....
QueryView *queryView;
MatchView *matchView;
OptionsDialog *optDlg;
DbSetsDialog *setsDlg;
- QTimer resetStatusbarTimer;
+ TQTimer resetStatusbarTimer;
int stopRef; // remember how many "clients" are running
};