summaryrefslogtreecommitdiffstats
path: root/src/qalculateexpressionedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qalculateexpressionedit.cpp')
-rw-r--r--src/qalculateexpressionedit.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/qalculateexpressionedit.cpp b/src/qalculateexpressionedit.cpp
index ab6a2cf..31ccecf 100644
--- a/src/qalculateexpressionedit.cpp
+++ b/src/qalculateexpressionedit.cpp
@@ -21,18 +21,18 @@
#include "qalculate_tde_utils.h"
#include "kqalculate.h"
-#include <kdeversion.h>
+#include <tdeversion.h>
#include <kcursor.h>
#include <tqstyle.h>
#include <tqpainter.h>
#include <tqapplication.h>
#include <tqfontmetrics.h>
#include <kstringhandler.h>
-#include <kpopupmenu.h>
+#include <tdepopupmenu.h>
#include <kxmlguifactory.h>
#include <kxmlguiclient.h>
-#include <kaction.h>
-#include <klocale.h>
+#include <tdeaction.h>
+#include <tdelocale.h>
#include <tqsimplerichtext.h>
extern vector<mode_struct> modes;
@@ -73,7 +73,7 @@ private:
QalculateExpressionEdit::QalculateExpressionEdit(bool connected_to_main_win, TQWidget *parent, const char *name) : KLineEdit(parent, name) {
qalculateCompletionBox = new QalculateExpressionEditCompletionBox(this);
- qalculateCompletion = new KCompletion();
+ qalculateCompletion = new TDECompletion();
setCompletionObject(qalculateCompletion);
pos_before_completion = 0;
@@ -83,7 +83,7 @@ QalculateExpressionEdit::QalculateExpressionEdit(bool connected_to_main_win, TQW
dont_change_index = false;
expression_history_index = -1;
- setCompletionMode(KGlobalSettings::CompletionPopup);
+ setCompletionMode(TDEGlobalSettings::CompletionPopup);
setKeyCompression(false);
@@ -128,13 +128,13 @@ void QalculateExpressionEdit::cancelCompletion(const TQString &str) {
}
void QalculateExpressionEdit::enableCompletion() {
- setCompletionMode(KGlobalSettings::CompletionPopup);
+ setCompletionMode(TDEGlobalSettings::CompletionPopup);
}
void QalculateExpressionEdit::disableCompletion() {
- setCompletionMode(KGlobalSettings::CompletionNone);
+ setCompletionMode(TDEGlobalSettings::CompletionNone);
}
bool QalculateExpressionEdit::completionEnabled() const {
- return completionMode() == KGlobalSettings::CompletionPopup;
+ return completionMode() == TDEGlobalSettings::CompletionPopup;
}
TQPopupMenu *QalculateExpressionEdit::createPopupMenu() {
@@ -143,7 +143,7 @@ TQPopupMenu *QalculateExpressionEdit::createPopupMenu() {
TQPopupMenu *menu = KLineEdit::createPopupMenu();
setCompletionObject(qalculateCompletion);
menu->insertSeparator();
- if(completionMode() == KGlobalSettings::CompletionPopup) menu->insertItem(i18n("Disable Completion"), this, SLOT(disableCompletion()));
+ if(completionMode() == TDEGlobalSettings::CompletionPopup) menu->insertItem(i18n("Disable Completion"), this, SLOT(disableCompletion()));
else menu->insertItem(i18n("Enable Completion"), this, SLOT(enableCompletion()));
if(b_main) {
menu->insertSeparator();
@@ -792,7 +792,7 @@ QalculateExpressionEditListBoxItem::QalculateExpressionEditListBoxItem(Expressio
QalculateExpressionEditListBoxItem::~QalculateExpressionEditListBoxItem() {
}
-#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
+#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
TQString rPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
@@ -838,7 +838,7 @@ void QalculateExpressionEditListBoxItem::paint(TQPainter *painter) {
if(rt.widthUsed() > nameWidth - 1) {
squeezedText = text();
if(italic_index > 0) squeezedText.truncate(italic_index);
-#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
+#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
squeezedText = rPixelSqueeze(squeezedText, listBox()->fontMetrics(), nameWidth);
#else
squeezedText = KStringHandler::rPixelSqueeze(squeezedText, listBox()->fontMetrics(), nameWidth);
@@ -850,14 +850,14 @@ void QalculateExpressionEditListBoxItem::paint(TQPainter *painter) {
rt.draw(painter, 1, 0, TQRect(0, 0, nameWidth - 1, itemHeight), cg, &painter->brush());
}
} else {
-#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
+#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
squeezedText = rPixelSqueeze(text(), listBox()->fontMetrics(), nameWidth);
#else
squeezedText = KStringHandler::rPixelSqueeze(text(), listBox()->fontMetrics(), nameWidth);
#endif
painter->drawText(0, 0, nameWidth, itemHeight, TQt::AlignLeft | TQt::AlignVCenter, squeezedText);
}
-#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
+#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
squeezedText = rPixelSqueeze(title, listBox()->fontMetrics(), titleWidth);
#else
squeezedText = KStringHandler::rPixelSqueeze(title, listBox()->fontMetrics(), titleWidth);
@@ -888,7 +888,7 @@ bool QalculateExpressionEditListBoxItem::reuse(ExpressionItem *newItem) {
return true;
}
-QalculateExpressionEditCompletionBox::QalculateExpressionEditCompletionBox(TQWidget *parent, const char *name) : KCompletionBox(parent, name) {
+QalculateExpressionEditCompletionBox::QalculateExpressionEditCompletionBox(TQWidget *parent, const char *name) : TDECompletionBox(parent, name) {
}
QalculateExpressionEditCompletionBox::~QalculateExpressionEditCompletionBox() {
}
@@ -941,7 +941,7 @@ void QalculateExpressionEditCompletionBox::setItems(const TQValueVector<Expressi
sort();
if(isVisible() && size().height() != sizeHint().height()) {
-#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
+#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
hide();
popup();
#else
@@ -951,9 +951,9 @@ void QalculateExpressionEditCompletionBox::setItems(const TQValueVector<Expressi
blockSignals(block);
- // Trigger d->down_workaround = true within KCompletionBox
+ // Trigger d->down_workaround = true within TDECompletionBox
TQStringList dummy;
- KCompletionBox::insertItems(dummy, 1);
+ TDECompletionBox::insertItems(dummy, 1);
}