summaryrefslogtreecommitdiffstats
path: root/kdict/applet
diff options
context:
space:
mode:
Diffstat (limited to 'kdict/applet')
-rw-r--r--kdict/applet/kdictapplet.cpp32
-rw-r--r--kdict/applet/kdictapplet.h6
2 files changed, 20 insertions, 18 deletions
diff --git a/kdict/applet/kdictapplet.cpp b/kdict/applet/kdictapplet.cpp
index 6e45de52..eda347e4 100644
--- a/kdict/applet/kdictapplet.cpp
+++ b/kdict/applet/kdictapplet.cpp
@@ -74,16 +74,16 @@ void PopupBox::enablePopup()
extern "C"
{
- KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kdictapplet");
- return new DictApplet(configFile, KPanelApplet::Stretch, 0, parent, "kdictapplet");
+ return new DictApplet(configFile, KPanelApplet::Stretch, 0, tqparent, "kdictapplet");
}
}
-DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
- : KPanelApplet(configFile, type, actions, parent, name), waiting(0)
+DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name)
+ : KPanelApplet(configFile, type, actions, tqparent, name), waiting(0)
{
// first the widgets for a horizontal panel
baseWidget = new TQWidget(this);
@@ -102,7 +102,7 @@ DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWid
TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true);
iconLabel->setPixmap(pm);
baseLay->addWidget(iconLabel,1,0);
- iconLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
+ iconLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter);
iconLabel->setFixedWidth(pm.width()+4);
TQToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict"));
@@ -160,7 +160,7 @@ DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWid
externalCombo = new KHistoryCombo(popupBox);
externalCombo->setCompletionObject(completionObject);
connect(externalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&)));
- externalCombo->setFixedSize(160, externalCombo->sizeHint().height());
+ externalCombo->setFixedSize(160, externalCombo->tqsizeHint().height());
connect(internalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion)));
@@ -205,9 +205,9 @@ DictApplet::~DictApplet()
int DictApplet::widthForHeight(int height) const
{
if (height >= 38)
- return textLabel->sizeHint().width()+55;
+ return textLabel->tqsizeHint().width()+55;
else
- return textLabel->sizeHint().width()+25;
+ return textLabel->tqsizeHint().width()+25;
}
@@ -219,15 +219,15 @@ int DictApplet::heightForWidth(int width) const
void DictApplet::resizeEvent(TQResizeEvent*)
{
- if (orientation() == Horizontal) {
+ if (orientation() ==Qt::Horizontal) {
verticalBtn->hide();
baseWidget->show();
baseWidget->setFixedSize(width(),height());
- if (height() < internalCombo->sizeHint().height())
+ if (height() < internalCombo->tqsizeHint().height())
internalCombo->setFixedHeight(height());
else
- internalCombo->setFixedHeight(internalCombo->sizeHint().height());
+ internalCombo->setFixedHeight(internalCombo->tqsizeHint().height());
if (height() >= 38) {
textLabel->show();
@@ -246,7 +246,7 @@ void DictApplet::resizeEvent(TQResizeEvent*)
}
baseWidget->updateGeometry();
- } else { // orientation() == Vertical
+ } else { // orientation() ==Qt::Vertical
verticalBtn->show();
baseWidget->hide();
verticalBtn->setFixedSize(width(),width());
@@ -286,7 +286,7 @@ void DictApplet::sendCommand(const TQCString &fun, const TQString &data)
return;
} else {
QCStringList list = client->remoteObjects("kdict");
- if (list.findIndex("KDictIface")==-1) {
+ if (list.tqfindIndex("KDictIface")==-1) {
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
@@ -313,7 +313,7 @@ void DictApplet::sendDelayedCommand()
return;
} else {
QCStringList list = client->remoteObjects("kdict");
- if (list.findIndex("KDictIface")==-1) {
+ if (list.tqfindIndex("KDictIface")==-1) {
waiting++;
TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand()));
return;
@@ -338,7 +338,7 @@ void DictApplet::startQuery(const TQString &s)
sendCommand("definePhrase(TQString)",query);
- if (orientation() == Vertical)
+ if (orientation() ==Qt::Vertical)
popupBox->hide();
}
@@ -352,7 +352,7 @@ void DictApplet::comboTextChanged(const TQString &s)
void DictApplet::queryClipboard()
{
- sendCommand("defineClipboardContent()",TQString::null);
+ sendCommand("defineClipboardContent()",TQString());
}
diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h
index de5f469b..a79300af 100644
--- a/kdict/applet/kdictapplet.h
+++ b/kdict/applet/kdictapplet.h
@@ -30,9 +30,10 @@ class KHistoryCombo;
//********* PopupBox ********************************************
-class PopupBox : public QHBox
+class PopupBox : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
PopupBox();
@@ -59,9 +60,10 @@ private:
class DictApplet : public KPanelApplet
{
Q_OBJECT
+ TQ_OBJECT
public:
- DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *parent = 0, const char *name = 0);
+ DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *tqparent = 0, const char *name = 0);
virtual ~DictApplet();
int widthForHeight(int height) const;