diff options
Diffstat (limited to 'kmymoney2/dialogs/kmymoneysplittable.cpp')
-rw-r--r-- | kmymoney2/dialogs/kmymoneysplittable.cpp | 262 |
1 files changed, 131 insertions, 131 deletions
diff --git a/kmymoney2/dialogs/kmymoneysplittable.cpp b/kmymoney2/dialogs/kmymoneysplittable.cpp index 5b5f1af..d1182ec 100644 --- a/kmymoney2/dialogs/kmymoneysplittable.cpp +++ b/kmymoney2/dialogs/kmymoneysplittable.cpp @@ -25,13 +25,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qglobal.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qapplication.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qeventloop.h> +#include <tqglobal.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqapplication.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqeventloop.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,8 +62,8 @@ #include "../mymoney/mymoneyutils.h" -kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : - QTable(parent,name), +kMyMoneySplitTable::kMyMoneySplitTable(TQWidget *tqparent, const char *name ) : + TQTable(tqparent,name), m_currentRow(0), m_maxRows(0), m_editMode(false), @@ -78,7 +78,7 @@ kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : horizontalHeader()->setLabel(0, i18n("Category")); horizontalHeader()->setLabel(1, i18n("Memo")); horizontalHeader()->setLabel(2, i18n("Amount")); - setSelectionMode(QTable::NoSelection); + setSelectionMode(TQTable::NoSelection); setLeftMargin(0); verticalHeader()->hide(); setColumnStretchable(0, false); @@ -88,63 +88,63 @@ kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : horizontalHeader()->setMovingEnabled(false); horizontalHeader()->setFont(KMyMoneyGlobalSettings::listHeaderFont()); - setVScrollBarMode(QScrollView::AlwaysOn); + setVScrollBarMode(TQScrollView::AlwaysOn); // never show a horizontal scroll bar - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); // setup the context menu m_contextMenu = new KPopupMenu(this); KIconLoader *il = KGlobal::iconLoader(); m_contextMenu->insertTitle(il->loadIcon("transaction", KIcon::MainToolbar), i18n("Split Options")); - m_contextMenu->insertItem(il->loadIcon("edit", KIcon::Small), i18n("Edit..."), this, SLOT(slotStartEdit())); - m_contextMenuDuplicate = m_contextMenu->insertItem(il->loadIcon("editcopy", KIcon::Small), i18n("Duplicate"), this, SLOT(slotDuplicateSplit())); + m_contextMenu->insertItem(il->loadIcon("edit", KIcon::Small), i18n("Edit..."), this, TQT_SLOT(slotStartEdit())); + m_contextMenuDuplicate = m_contextMenu->insertItem(il->loadIcon("editcopy", KIcon::Small), i18n("Duplicate"), this, TQT_SLOT(slotDuplicateSplit())); m_contextMenuDelete = m_contextMenu->insertItem(il->loadIcon("delete", KIcon::Small), i18n("Delete ..."), - this, SLOT(slotDeleteSplit())); + this, TQT_SLOT(slotDeleteSplit())); - connect(this, SIGNAL(clicked(int, int, int, const QPoint&)), - this, SLOT(slotSetFocus(int, int, int, const QPoint&))); + connect(this, TQT_SIGNAL(clicked(int, int, int, const TQPoint&)), + this, TQT_SLOT(slotSetFocus(int, int, int, const TQPoint&))); - connect(this, SIGNAL(transactionChanged(const MyMoneyTransaction&)), - this, SLOT(slotUpdateData(const MyMoneyTransaction&))); + connect(this, TQT_SIGNAL(transactionChanged(const MyMoneyTransaction&)), + this, TQT_SLOT(slotUpdateData(const MyMoneyTransaction&))); } kMyMoneySplitTable::~kMyMoneySplitTable() { } -void kMyMoneySplitTable::setup(const QMap<QString, MyMoneyMoney>& priceInfo) +void kMyMoneySplitTable::setup(const TQMap<TQString, MyMoneyMoney>& priceInfo) { m_priceInfo = priceInfo; } -const QColor kMyMoneySplitTable::rowBackgroundColor(const int row) const +const TQColor kMyMoneySplitTable::rowBackgroundColor(const int row) const { return (row % 2) ? KMyMoneyGlobalSettings::listColor() : KMyMoneyGlobalSettings::listBGColor(); } -void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r, bool /*selected*/) +void kMyMoneySplitTable::paintCell(TQPainter *p, int row, int col, const TQRect& r, bool /*selected*/) { - QColorGroup g = colorGroup(); - QColor textColor; + TQColorGroup g = tqcolorGroup(); + TQColor textColor; - g.setColor(QColorGroup::Base, rowBackgroundColor(row)); + g.setColor(TQColorGroup::Base, rowBackgroundColor(row)); p->setFont(KMyMoneyGlobalSettings::listCellFont()); - QString firsttext = text(row, col); - QString qstringCategory; - QString qstringMemo; + TQString firsttext = text(row, col); + TQString qstringCategory; + TQString qstringMemo; - int intPos = firsttext.find("|"); + int intPos = firsttext.tqfind("|"); if(intPos > -1) { qstringCategory = firsttext.left(intPos); qstringMemo = firsttext.mid(intPos + 1); } - QRect rr = r; - QRect rr2 = r; + TQRect rr = r; + TQRect rr2 = r; rr.setX(0); rr.setY(0); rr.setWidth(columnWidth(col)); @@ -157,12 +157,12 @@ void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r if(row == m_currentRow) { - QBrush backgroundBrush(g.highlight()); + TQBrush backgroundBrush(g.highlight()); textColor = g.highlightedText(); p->fillRect(rr,backgroundBrush); } else { - QBrush backgroundBrush(g.base()); + TQBrush backgroundBrush(g.base()); textColor = g.text(); p->fillRect(rr,backgroundBrush); } @@ -178,17 +178,17 @@ void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r switch (col) { case 0: // category case 1: // memo - p->drawText(rr2, Qt::AlignLeft | Qt::AlignVCenter, text(row, col)); + p->drawText(rr2, TQt::AlignLeft | TQt::AlignVCenter, text(row, col)); break; case 2: // amount - p->drawText(rr2, Qt::AlignRight | Qt::AlignVCenter,firsttext); + p->drawText(rr2, TQt::AlignRight | TQt::AlignVCenter,firsttext); break; } } -/** Override the QTable member function to avoid display of focus */ -void kMyMoneySplitTable::paintFocus(QPainter * /* p */, const QRect & /*cr*/) +/** Override the TQTable member function to avoid display of focus */ +void kMyMoneySplitTable::paintFocus(TQPainter * /* p */, const TQRect & /*cr*/) { } @@ -198,42 +198,42 @@ void kMyMoneySplitTable::columnWidthChanged(int col) updateCell(i, col); } -/** Override the QTable member function to avoid confusion with our own functionality */ -void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/ ) +/** Override the TQTable member function to avoid confusion with our own functionality */ +void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/ ) { } -bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) +bool kMyMoneySplitTable::eventFilter(TQObject *o, TQEvent *e) { // MYMONEYTRACER(tracer); - QKeyEvent *k = static_cast<QKeyEvent *> (e); + TQKeyEvent *k = TQT_TQKEYEVENT (e); bool rc = false; int row = currentRow(); int lines = visibleHeight()/rowHeight(0); - QWidget* w; + TQWidget* w; - if(e->type() == QEvent::KeyPress && !isEditMode()) { + if(e->type() == TQEvent::KeyPress && !isEditMode()) { rc = true; switch(k->key()) { - case Qt::Key_Up: + case TQt::Key_Up: if(row) slotSetFocus(row-1); break; - case Qt::Key_Down: + case TQt::Key_Down: if(row < static_cast<int> (m_transaction.splits().count()-1)) slotSetFocus(row+1); break; - case Qt::Key_Home: + case TQt::Key_Home: slotSetFocus(0); break; - case Qt::Key_End: + case TQt::Key_End: slotSetFocus(m_transaction.splits().count()-1); break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: if(lines) { while(lines-- > 0 && row) row--; @@ -241,7 +241,7 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: if(row < static_cast<int> (m_transaction.splits().count()-1)) { while(lines-- > 0 && row < static_cast<int> (m_transaction.splits().count()-1)) row++; @@ -249,12 +249,12 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } break; - case Qt::Key_Delete: + case TQt::Key_Delete: slotDeleteSplit(); break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: if(row < static_cast<int> (m_transaction.splits().count()-1) && KMyMoneyGlobalSettings::enterMovesBetweenFields()) { slotStartEdit(); @@ -262,18 +262,18 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) emit returnPressed(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: emit escapePressed(); break; - case Qt::Key_F2: + case TQt::Key_F2: slotStartEdit(); break; default: rc = true; KShortcut copySplit(i18n("Duplicate split", "CTRL+c")); - KShortcut newSplit(QKeySequence(Qt::CTRL | Qt::Key_Insert)); + KShortcut newSplit(TQKeySequence(TQt::CTRL | TQt::Key_Insert)); if(copySplit.contains(KKey(k))) { slotDuplicateSplit(); @@ -284,26 +284,26 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } else if ( k->text()[ 0 ].isPrint() ) { w = slotStartEdit(); // make sure, the widget receives the key again - QApplication::sendEvent(w, e); + TQApplication::sendEvent(w, e); } break; } - } else if(e->type() == QEvent::KeyPress && isEditMode()) { + } else if(e->type() == TQEvent::KeyPress && isEditMode()) { bool terminate = true; rc = true; switch(k->key()) { // suppress the F2 functionality to start editing in inline edit mode - case Qt::Key_F2: + case TQt::Key_F2: // suppress the cursor movement in inline edit mode - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_PageUp: - case Qt::Key_PageDown: + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_PageUp: + case TQt::Key_PageDown: break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: // we cannot call the slot directly, as it destroys the caller of // this method :-( So we let the event handler take care of calling // the respective slot using a timeout. For a KLineEdit derived object @@ -322,38 +322,38 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) // in case we have the 'enter moves focus between fields', we need to simulate // a TAB key when the object 'o' points to the category or memo field. if(KMyMoneyGlobalSettings::enterMovesBetweenFields()) { - if(o == m_editCategory->lineEdit() || o == m_editMemo) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editCategory->lineEdit()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editMemo)) { terminate = false; - QKeyEvent evt(e->type(), - Key_Tab, 0, k->state(), QString::null, + TQKeyEvent evt(e->type(), + Key_Tab, 0, k->state(), TQString(), k->isAutoRepeat(), k->count()); - QApplication::sendEvent( o, &evt ); + TQApplication::sendEvent( o, &evt ); } } if(terminate) { - QTimer::singleShot(0, this, SLOT(slotEndEditKeyboard())); + TQTimer::singleShot(0, this, TQT_SLOT(slotEndEditKeyboard())); } break; - case Qt::Key_Escape: + case TQt::Key_Escape: // we cannot call the slot directly, as it destroys the caller of // this method :-( So we let the event handler take care of calling // the respective slot using a timeout. - QTimer::singleShot(0, this, SLOT(slotCancelEdit())); + TQTimer::singleShot(0, this, TQT_SLOT(slotCancelEdit())); break; default: rc = false; break; } - } else if(e->type() == QEvent::KeyRelease && !isEditMode()) { + } else if(e->type() == TQEvent::KeyRelease && !isEditMode()) { // for some reason, we only see a KeyRelease event of the Menu key // here. In other locations (e.g. Register::eventFilter()) we see // a KeyPress event. Strange. (ipwizard - 2008-05-10) switch(k->key()) { - case Qt::Key_Menu: + case TQt::Key_Menu: // if the very last entry is selected, the delete // operation is not available otherwise it is m_contextMenu->setItemEnabled(m_contextMenuDelete, @@ -361,7 +361,7 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) m_contextMenu->setItemEnabled(m_contextMenuDuplicate, row < static_cast<int> (m_transaction.splits().count()-1)); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); rc = true; break; default: @@ -372,16 +372,16 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) // if the event has not been processed here, forward it to // the base class implementation if it's not a key event if(rc == false) { - if(e->type() != QEvent::KeyPress - && e->type() != QEvent::KeyRelease) { - rc = QTable::eventFilter(o, e); + if(e->type() != TQEvent::KeyPress + && e->type() != TQEvent::KeyRelease) { + rc = TQTable::eventFilter(o, e); } } return rc; } -void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, const QPoint& /* point */) +void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, const TQPoint& /* point */) { MYMONEYTRACER(tracer); int row = realrow; @@ -422,22 +422,22 @@ void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, co m_contextMenu->setItemEnabled(m_contextMenuDuplicate, row < static_cast<int> (m_transaction.splits().count()-1)); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); } } } -void kMyMoneySplitTable::contentsMousePressEvent( QMouseEvent* e ) +void kMyMoneySplitTable::contentsMousePressEvent( TQMouseEvent* e ) { slotSetFocus( rowAt(e->pos().y()), columnAt(e->pos().x()), e->button(), e->pos() ); } -/* turn off QTable behaviour */ -void kMyMoneySplitTable::contentsMouseReleaseEvent( QMouseEvent* /* e */ ) +/* turn off TQTable behaviour */ +void kMyMoneySplitTable::contentsMouseReleaseEvent( TQMouseEvent* /* e */ ) { } -void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void kMyMoneySplitTable::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { MYMONEYTRACER(tracer); @@ -452,7 +452,7 @@ void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) break; case 2: - editWidget = dynamic_cast<KLineEdit*> (m_editAmount->focusWidget()); + editWidget = dynamic_cast<KLineEdit*> (m_editAmount->tqfocusWidget()); break; default: @@ -463,7 +463,7 @@ void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) editWidget->selectAll(); // we need to call setFocus on the edit widget from the // main loop again to get the keyboard focus to the widget also - QTimer::singleShot(0, editWidget, SLOT(setFocus())); + TQTimer::singleShot(0, editWidget, TQT_SLOT(setFocus())); } } @@ -474,8 +474,8 @@ void kMyMoneySplitTable::setCurrentCell(int row, int /* col */) if(row > m_maxRows) row = m_maxRows; m_currentRow = row; - QTable::setCurrentCell(row, 0); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQTable::setCurrentCell(row, 0); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(row < static_cast<int>(list.count())) m_split = list[row]; else @@ -484,16 +484,16 @@ void kMyMoneySplitTable::setCurrentCell(int row, int /* col */) void kMyMoneySplitTable::setNumRows(int irows) { - QTable::setNumRows(irows); + TQTable::setNumRows(irows); // determine row height according to the edit widgets // we use the category widget as the base - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); int height = fm.lineSpacing()+6; #if 0 // recalculate row height hint KMyMoneyCategory cat; - height = QMAX(cat.sizeHint().height(), height); + height = TQMAX(cat.tqsizeHint().height(), height); #endif verticalHeader()->setUpdatesEnabled(false); @@ -517,10 +517,10 @@ void kMyMoneySplitTable::setTransaction(const MyMoneyTransaction& t, const MyMon slotUpdateData(m_transaction); } -const QValueList<MyMoneySplit> kMyMoneySplitTable::getSplits(const MyMoneyTransaction& t) const +const TQValueList<MyMoneySplit> kMyMoneySplitTable::getSplits(const MyMoneyTransaction& t) const { - QValueList<MyMoneySplit> list; - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit> list; + TQValueList<MyMoneySplit>::Iterator it; // get list of splits list = t.splits(); @@ -541,14 +541,14 @@ void kMyMoneySplitTable::slotUpdateData(const MyMoneyTransaction& t) MYMONEYTRACER(tracer); unsigned long rowCount=0; - QValueList<MyMoneySplit> list = getSplits(t); + TQValueList<MyMoneySplit> list = getSplits(t); updateTransactionTableSize(); // fill the part that is used by transactions - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; kMyMoneyEdit* valfield = new kMyMoneyEdit(); for(it = list.begin(); it != list.end(); ++it) { - QString colText; + TQString colText; MyMoneyMoney value = (*it).value(); if(!(*it).accountId().isEmpty()) { try { @@ -558,17 +558,17 @@ void kMyMoneySplitTable::slotUpdateData(const MyMoneyTransaction& t) delete e; } } - QString amountTxt = value.formatMoney(m_account.fraction()); + TQString amountTxt = value.formatMoney(m_account.fraction()); if(value == MyMoneyMoney::autoCalc) { amountTxt = i18n("will be calculated"); } if(colText.isEmpty() && (*it).memo().isEmpty() && value.isZero()) - amountTxt = QString(); + amountTxt = TQString(); unsigned width = fontMetrics().width(amountTxt); valfield->setMinimumWidth(width); - width = valfield->minimumSizeHint().width(); + width = valfield->tqminimumSizeHint().width(); if(width > m_amountWidth) m_amountWidth = width; @@ -613,7 +613,7 @@ void kMyMoneySplitTable::updateTransactionTableSize(void) m_maxRows = splitCount; } -void kMyMoneySplitTable::resizeEvent(QResizeEvent* /* ev */) +void kMyMoneySplitTable::resizeEvent(TQResizeEvent* /* ev */) { int w = visibleWidth() - m_amountWidth; @@ -628,7 +628,7 @@ void kMyMoneySplitTable::resizeEvent(QResizeEvent* /* ev */) void kMyMoneySplitTable::slotDuplicateSplit(void) { MYMONEYTRACER(tracer); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(m_currentRow < static_cast<int> (list.count())) { MyMoneySplit split = list[m_currentRow]; split.clearId(); @@ -645,7 +645,7 @@ void kMyMoneySplitTable::slotDuplicateSplit(void) void kMyMoneySplitTable::slotDeleteSplit(void) { MYMONEYTRACER(tracer); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(m_currentRow < static_cast<int> (list.count())) { if(KMessageBox::warningContinueCancel (this, i18n("You are about to delete the selected split. " @@ -669,7 +669,7 @@ void kMyMoneySplitTable::slotDeleteSplit(void) } } -QWidget* kMyMoneySplitTable::slotStartEdit(void) +TQWidget* kMyMoneySplitTable::slotStartEdit(void) { MYMONEYTRACER(tracer); return createEditWidgets(); @@ -735,7 +735,7 @@ void kMyMoneySplitTable::endEdit(bool keyBoardDriven) fromValue = s1.value().abs(); // if we had a price info in the beginning, we use it here - if(m_priceInfo.find(cat.currencyId()) != m_priceInfo.end()) { + if(m_priceInfo.tqfind(cat.currencyId()) != m_priceInfo.end()) { toValue = (fromValue * m_priceInfo[cat.currencyId()]).convert(fract); } @@ -760,7 +760,7 @@ void kMyMoneySplitTable::endEdit(bool keyBoardDriven) fract, this, "currencyCalculator"); - if(calc.exec() == QDialog::Rejected) { + if(calc.exec() == TQDialog::Rejected) { return; } else { s1.setShares((s1.value() * calc.price()).convert(fract)); @@ -817,7 +817,7 @@ void kMyMoneySplitTable::destroyEditWidgets(void) { MYMONEYTRACER(tracer); - disconnect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadEditWidgets())); + disconnect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadEditWidgets())); clearCellWidget(m_currentRow, 0); clearCellWidget(m_currentRow, 1); @@ -825,14 +825,14 @@ void kMyMoneySplitTable::destroyEditWidgets(void) clearCellWidget(m_currentRow+1, 0); m_editMode = false; - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 100); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 100); } -QWidget* kMyMoneySplitTable::createEditWidgets(void) +TQWidget* kMyMoneySplitTable::createEditWidgets(void) { MYMONEYTRACER(tracer); - QFont cellFont = KMyMoneyGlobalSettings::listCellFont(); + TQFont cellFont = KMyMoneyGlobalSettings::listCellFont(); m_tabOrderWidgets.clear(); // create the widgets @@ -843,8 +843,8 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) m_editCategory = new KMyMoneyCategory(); m_editCategory->setHint(i18n("Category")); m_editCategory->setFont(cellFont); - connect(m_editCategory, SIGNAL(createItem(const QString&, QString&)), this, SIGNAL(createCategory(const QString&, QString&))); - connect(m_editCategory, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); + connect(m_editCategory, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SIGNAL(createCategory(const TQString&, TQString&))); + connect(m_editCategory, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); m_editMemo = new kMyMoneyLineEdit(0, 0, false, AlignLeft|AlignVCenter); m_editMemo->setHint(i18n("Memo")); @@ -852,22 +852,22 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // create buttons for the mouse users KIconLoader *il = KGlobal::iconLoader(); - m_registerButtonFrame = new QFrame(this, "buttonFrame"); - QPalette palette = m_registerButtonFrame->palette(); - palette.setColor(QColorGroup::Background, rowBackgroundColor(m_currentRow+1) ); + m_registerButtonFrame = new TQFrame(this, "buttonFrame"); + TQPalette palette = m_registerButtonFrame->palette(); + palette.setColor(TQColorGroup::Background, rowBackgroundColor(m_currentRow+1) ); m_registerButtonFrame->setPalette(palette); - QHBoxLayout* l = new QHBoxLayout(m_registerButtonFrame); - m_registerEnterButton = new KPushButton(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall), QString(), m_registerButtonFrame, "EnterButton"); + TQHBoxLayout* l = new TQHBoxLayout(m_registerButtonFrame); + m_registerEnterButton = new KPushButton(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall), TQString(), m_registerButtonFrame, "EnterButton"); - m_registerCancelButton = new KPushButton(il->loadIcon("button_cancel", KIcon::Small, KIcon::SizeSmall), QString(), m_registerButtonFrame, "CancelButton"); + m_registerCancelButton = new KPushButton(il->loadIcon("button_cancel", KIcon::Small, KIcon::SizeSmall), TQString(), m_registerButtonFrame, "CancelButton"); l->addWidget(m_registerEnterButton); l->addWidget(m_registerCancelButton); l->addStretch(2); - connect(m_registerEnterButton, SIGNAL(clicked()), this, SLOT(slotEndEdit())); - connect(m_registerCancelButton, SIGNAL(clicked()), this, SLOT(slotCancelEdit())); + connect(m_registerEnterButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEndEdit())); + connect(m_registerCancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancelEdit())); // setup tab order addToTabOrder(m_editCategory); @@ -882,8 +882,8 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // check if the transaction is balanced or not. If not, // assign the remainder to the amount. MyMoneyMoney diff; - QValueList<MyMoneySplit> list = m_transaction.splits(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit> list = m_transaction.splits(); + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if(!(*it_s).accountId().isEmpty()) diff += (*it_s).value(); @@ -906,10 +906,10 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // load e.g. the category widget with the account list slotLoadEditWidgets(); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadEditWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadEditWidgets())); // setup the keyboard filter for all widgets - for(QWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { + for(TQWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { w->installEventFilter(this); } @@ -923,7 +923,7 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) void kMyMoneySplitTable::slotLoadEditWidgets(void) { // reload category widget - QString categoryId = m_editCategory->selectedItem(); + TQString categoryId = m_editCategory->selectedItem(); AccountSet aSet; aSet.addAccountGroup(MyMoneyAccount::Asset); @@ -951,11 +951,11 @@ void kMyMoneySplitTable::slotLoadEditWidgets(void) } -void kMyMoneySplitTable::addToTabOrder(QWidget* w) +void kMyMoneySplitTable::addToTabOrder(TQWidget* w) { if(w) { while(w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); m_tabOrderWidgets.append(w); } } @@ -966,10 +966,10 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) bool rc = false; if(m_editCategory) { - QWidget *w = 0; - QWidget *currentWidget; + TQWidget *w = 0; + TQWidget *currentWidget; - m_tabOrderWidgets.find(qApp->focusWidget()); + m_tabOrderWidgets.tqfind(tqApp->tqfocusWidget()); currentWidget = m_tabOrderWidgets.current(); w = next ? m_tabOrderWidgets.next() : m_tabOrderWidgets.prev(); @@ -979,7 +979,7 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) } if(w != currentWidget - && ((w->focusPolicy() & TabFocus) == TabFocus) + && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus) && w->isVisible() && w->isEnabled()) { w->setFocus(); rc = true; @@ -989,7 +989,7 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) } while(w != currentWidget); } else - rc = QTable::focusNextPrevChild(next); + rc = TQTable::focusNextPrevChild(next); return rc; } |