summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kmymoneylineedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/widgets/kmymoneylineedit.cpp')
-rw-r--r--kmymoney2/widgets/kmymoneylineedit.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kmymoney2/widgets/kmymoneylineedit.cpp b/kmymoney2/widgets/kmymoneylineedit.cpp
index 18e2e31..2250c30 100644
--- a/kmymoney2/widgets/kmymoneylineedit.cpp
+++ b/kmymoney2/widgets/kmymoneylineedit.cpp
@@ -20,9 +20,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qrect.h>
-#include <qpainter.h>
-#include <qpalette.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -35,11 +35,11 @@
#include "kmymoneylineedit.h"
-kMyMoneyLineEdit::kMyMoneyLineEdit(QWidget *w, const char* name, bool forceMonetaryDecimalSymbol, int alignment) :
+kMyMoneyLineEdit::kMyMoneyLineEdit(TQWidget *w, const char* name, bool forceMonetaryDecimalSymbol, int tqalignment) :
KLineEdit(w, name),
m_forceMonetaryDecimalSymbol(forceMonetaryDecimalSymbol)
{
- setAlignment(alignment);
+ tqsetAlignment(tqalignment);
}
kMyMoneyLineEdit::~kMyMoneyLineEdit()
@@ -51,13 +51,13 @@ void kMyMoneyLineEdit::resetText(void)
setText(m_text);
}
-void kMyMoneyLineEdit::loadText(const QString& text)
+void kMyMoneyLineEdit::loadText(const TQString& text)
{
m_text = text;
setText(text);
}
-void kMyMoneyLineEdit::focusOutEvent(QFocusEvent *ev)
+void kMyMoneyLineEdit::focusOutEvent(TQFocusEvent *ev)
{
// if the current text is not in the list of
// possible completions, we have a new payee
@@ -69,24 +69,24 @@ void kMyMoneyLineEdit::focusOutEvent(QFocusEvent *ev)
// force update of hint
if(text().isEmpty())
- repaint();
+ tqrepaint();
}
-void kMyMoneyLineEdit::keyReleaseEvent(QKeyEvent* k)
+void kMyMoneyLineEdit::keyReleaseEvent(TQKeyEvent* k)
{
if(m_forceMonetaryDecimalSymbol) {
- if(k->state() & Qt::Keypad) {
- if(k->key() == Qt::Key_Comma
- || k->key() == Qt::Key_Period) {
+ if(k->state() & TQt::Keypad) {
+ if(k->key() == TQt::Key_Comma
+ || k->key() == TQt::Key_Period) {
if(KGlobal::locale()->monetaryDecimalSymbol() == ",") {
- QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count());
+ TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count());
KLineEdit::keyReleaseEvent(&newk);
k->ignore();
return;
}
if(KGlobal::locale()->monetaryDecimalSymbol() == ".") {
- QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ".", k->isAutoRepeat(), k->count());
+ TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ".", k->isAutoRepeat(), k->count());
KLineEdit::keyReleaseEvent(&newk);
k->ignore();
return;
@@ -97,21 +97,21 @@ void kMyMoneyLineEdit::keyReleaseEvent(QKeyEvent* k)
KLineEdit::keyReleaseEvent(k);
}
-void kMyMoneyLineEdit::keyPressEvent(QKeyEvent* k)
+void kMyMoneyLineEdit::keyPressEvent(TQKeyEvent* k)
{
if(m_forceMonetaryDecimalSymbol) {
- if(k->state() & Qt::Keypad) {
- if(k->key() == Qt::Key_Comma
- || k->key() == Qt::Key_Period) {
+ if(k->state() & TQt::Keypad) {
+ if(k->key() == TQt::Key_Comma
+ || k->key() == TQt::Key_Period) {
if(KGlobal::locale()->monetaryDecimalSymbol() == ",") {
- QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count());
+ TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count());
KLineEdit::keyPressEvent(&newk);
k->ignore();
return;
}
if(KGlobal::locale()->monetaryDecimalSymbol() == ".") {
- QKeyEvent newk(k->type(), Qt::Key_Period, '.', k->state(), ".", k->isAutoRepeat(), k->count());
+ TQKeyEvent newk(k->type(), TQt::Key_Period, '.', k->state(), ".", k->isAutoRepeat(), k->count());
KLineEdit::keyPressEvent(&newk);
k->ignore();
return;
@@ -122,26 +122,26 @@ void kMyMoneyLineEdit::keyPressEvent(QKeyEvent* k)
KLineEdit::keyPressEvent(k);
}
-void kMyMoneyLineEdit::drawContents( QPainter *p)
+void kMyMoneyLineEdit::drawContents( TQPainter *p)
{
KLineEdit::drawContents(p);
if(text().isEmpty() && !m_hint.isEmpty() && !hasFocus()) {
const int innerMargin = 1;
- // the following 5 lines are taken from QLineEdit::drawContents()
- QRect cr = contentsRect();
- QFontMetrics fm = fontMetrics();
- QRect lineRect( cr.x() + innerMargin, cr.y() + (cr.height() - fm.height() + 1) / 2,
+ // the following 5 lines are taken from TQLineEdit::drawContents()
+ TQRect cr = contentsRect();
+ TQFontMetrics fm = fontMetrics();
+ TQRect lineRect( cr.x() + innerMargin, cr.y() + (cr.height() - fm.height() + 1) / 2,
cr.width() - 2*innerMargin, fm.height() );
- QPoint topLeft = lineRect.topLeft() - QPoint(0, -fm.ascent());
+ TQPoint topLeft = lineRect.topLeft() - TQPoint(0, -fm.ascent());
p->save();
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(true);
- f.setWeight(QFont::Light);
+ f.setWeight(TQFont::Light);
p->setFont(f);
- p->setPen(palette().disabled().text());
+ p->setPen(tqpalette().disabled().text());
p->drawText(topLeft, m_hint);