summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/kenterscheduledlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/kenterscheduledlg.cpp')
-rw-r--r--kmymoney2/dialogs/kenterscheduledlg.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kmymoney2/dialogs/kenterscheduledlg.cpp b/kmymoney2/dialogs/kenterscheduledlg.cpp
index f39f003..47f881f 100644
--- a/kmymoney2/dialogs/kenterscheduledlg.cpp
+++ b/kmymoney2/dialogs/kenterscheduledlg.cpp
@@ -18,9 +18,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-#include <qwidgetlist.h>
-#include <qlabel.h>
+#include <tqtimer.h>
+#include <tqwidgetlist.h>
+#include <tqlabel.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -57,13 +57,13 @@ public:
MyMoneySchedule m_schedule;
KMyMoneyRegister::Transaction* m_item;
- QWidgetList m_tabOrderWidgets;
+ TQWidgetList m_tabOrderWidgets;
bool m_showWarningOnce;
KMyMoneyUtils::EnterScheduleResultCodeE m_extendedReturnCode;
};
-KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& schedule) :
- KEnterScheduleDlgDecl(parent, "kenterscheduledlg"),
+KEnterScheduleDlg::KEnterScheduleDlg(TQWidget *tqparent, const MyMoneySchedule& schedule) :
+ KEnterScheduleDlgDecl(tqparent, "kenterscheduledlg"),
d(new Private)
{
d->m_schedule = schedule;
@@ -76,7 +76,7 @@ KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& sch
buttonSkip->setHidden(true);
// make sure, we have a tabbar with the form
- KMyMoneyTransactionForm::TabBar* tabbar = m_form->tabBar(m_form->parentWidget());
+ KMyMoneyTransactionForm::TabBar* tabbar = m_form->tabBar(m_form->tqparentWidget());
// we never need to see the register
m_register->hide();
@@ -103,12 +103,12 @@ KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& sch
m_scheduleName->setText(d->m_schedule.name());
m_type->setText(KMyMoneyUtils::scheduleTypeToString(d->m_schedule.type()));
- connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotShowHelp()));
- connect(buttonIgnore, SIGNAL(clicked()), this, SLOT(slotIgnore()));
- connect(buttonSkip, SIGNAL(clicked()), this, SLOT(slotSkip()));
+ connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp()));
+ connect(buttonIgnore, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotIgnore()));
+ connect(buttonSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSkip()));
// force the initial height to be as small as possible
- QTimer::singleShot(0, this, SLOT(slotSetupSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSetupSize()));
}
KEnterScheduleDlg::~KEnterScheduleDlg()
@@ -118,7 +118,7 @@ KEnterScheduleDlg::~KEnterScheduleDlg()
KMyMoneyUtils::EnterScheduleResultCodeE KEnterScheduleDlg::resultCode(void) const
{
- if(result() == QDialog::Accepted)
+ if(result() == TQDialog::Accepted)
return d->m_extendedReturnCode;
return KMyMoneyUtils::Cancel;
}
@@ -147,7 +147,7 @@ MyMoneyTransaction KEnterScheduleDlg::transaction(void)
try {
if (d->m_schedule.type() == MyMoneySchedule::TYPE_LOANPAYMENT) {
- KMyMoneyUtils::calculateAutoLoan(d->m_schedule, t, QMap<QString, MyMoneyMoney>());
+ KMyMoneyUtils::calculateAutoLoan(d->m_schedule, t, TQMap<TQString, MyMoneyMoney>());
}
} catch (MyMoneyException* e) {
KMessageBox::detailedError(this, i18n("Unable to load schedule details"), e->what());
@@ -155,17 +155,17 @@ MyMoneyTransaction KEnterScheduleDlg::transaction(void)
}
t.clearId();
- t.setEntryDate(QDate());
+ t.setEntryDate(TQDate());
return t;
}
-QDate KEnterScheduleDlg::date(const QDate& _date) const
+TQDate KEnterScheduleDlg::date(const TQDate& _date) const
{
- QDate date(_date);
+ TQDate date(_date);
return d->m_schedule.adjustedDate(date, d->m_schedule.weekendOption());
}
-void KEnterScheduleDlg::resizeEvent(QResizeEvent* ev)
+void KEnterScheduleDlg::resizeEvent(TQResizeEvent* ev)
{
m_register->resize(KMyMoneyRegister::DetailColumn);
m_form->resize(KMyMoneyTransactionForm::ValueColumn1);
@@ -175,14 +175,14 @@ void KEnterScheduleDlg::resizeEvent(QResizeEvent* ev)
void KEnterScheduleDlg::slotSetupSize(void)
{
- resize(width(), minimumSizeHint().height());
+ resize(width(), tqminimumSizeHint().height());
}
int KEnterScheduleDlg::exec(void)
{
if(d->m_showWarningOnce) {
d->m_showWarningOnce = false;
- KMessageBox::information(this, QString("<qt>")+i18n("<p>Please check that all the details in the following dialog are correct and press OK.</p><p>Editable data can be changed and can either be applied to just this occurence or for all subsequent occurences for this schedule. (You will be asked what you intend after pressing OK in the following dialog)</p>")+QString("</qt>"), i18n("Enter scheduled transaction"), "EnterScheduleDlgInfo");
+ KMessageBox::information(this, TQString("<qt>")+i18n("<p>Please check that all the details in the following dialog are correct and press OK.</p><p>Editable data can be changed and can either be applied to just this occurence or for all subsequent occurences for this schedule. (You will be asked what you intend after pressing OK in the following dialog)</p>")+TQString("</qt>"), i18n("Enter scheduled transaction"), "EnterScheduleDlgInfo");
}
return KEnterScheduleDlgDecl::exec();
@@ -191,7 +191,7 @@ int KEnterScheduleDlg::exec(void)
TransactionEditor* KEnterScheduleDlg::startEdit(void)
{
KMyMoneyRegister::SelectedTransactions list(m_register);
- TransactionEditor* editor = d->m_item->createEditor(m_form, list, QDate());
+ TransactionEditor* editor = d->m_item->createEditor(m_form, list, TQDate());
// check that we use the same transaction commodity in all selected transactions
// if not, we need to update this in the editor's list. The user can also bail out
@@ -206,18 +206,18 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void)
}
if(editor) {
- connect(editor, SIGNAL(transactionDataSufficient(bool)), buttonOk, SLOT(setEnabled(bool)));
- connect(editor, SIGNAL(escapePressed()), buttonCancel, SLOT(animateClick()));
- connect(editor, SIGNAL(returnPressed()), buttonOk, SLOT(animateClick()));
-
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets()));
- // connect(editor, SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&)));
- connect(editor, SIGNAL(createPayee(const QString&, QString&)), kmymoney2, SLOT(slotPayeeNew(const QString&, QString&)));
- connect(editor, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&)));
- connect(editor, SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets()));
-
- // create the widgets, place them in the parent and load them with data
+ connect(editor, TQT_SIGNAL(transactionDataSufficient(bool)), buttonOk, TQT_SLOT(setEnabled(bool)));
+ connect(editor, TQT_SIGNAL(escapePressed()), buttonCancel, TQT_SLOT(animateClick()));
+ connect(editor, TQT_SIGNAL(returnPressed()), buttonOk, TQT_SLOT(animateClick()));
+
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets()));
+ // connect(editor, TQT_SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&)));
+ connect(editor, TQT_SIGNAL(createPayee(const TQString&, TQString&)), kmymoney2, TQT_SLOT(slotPayeeNew(const TQString&, TQString&)));
+ connect(editor, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(editor, TQT_SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets()));
+
+ // create the widgets, place them in the tqparent and load them with data
// setup tab order
d->m_tabOrderWidgets.clear();
KMyMoneyRegister::Action action = KMyMoneyRegister::ActionWithdrawal;
@@ -245,10 +245,10 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void)
// if it's not a check, then we need to clear
// a possibly assigned check number
- if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHEQUE) {
- QWidget* w = editor->haveWidget("number");
+ if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHETQUE) {
+ TQWidget* w = editor->haveWidget("number");
if(w)
- dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(QString());
+ dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(TQString());
}
Q_ASSERT(!d->m_tabOrderWidgets.isEmpty());
@@ -259,17 +259,17 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void)
d->m_tabOrderWidgets.append(buttonHelp);
// install event filter in all taborder widgets
- for(QWidget* w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) {
+ for(TQWidget* w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) {
w->installEventFilter(this);
w->installEventFilter(editor);
}
// Check if the editor has some preference on where to set the focus
// If not, set the focus to the first widget in the tab order
- QWidget* focusWidget = editor->firstWidget();
- if(!focusWidget)
- focusWidget = d->m_tabOrderWidgets.first();
- focusWidget->setFocus();
+ TQWidget* tqfocusWidget = editor->firstWidget();
+ if(!tqfocusWidget)
+ tqfocusWidget = d->m_tabOrderWidgets.first();
+ tqfocusWidget->setFocus();
// Make sure, we use the adjusted date
kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(editor->haveWidget("postdate"));
@@ -286,13 +286,13 @@ bool KEnterScheduleDlg::focusNextPrevChild(bool next)
bool rc = false;
// qDebug("KGlobalLedgerView::focusNextPrevChild(editmode=%s)", m_inEditMode ? "true" : "false");
- QWidget *w = 0;
- QWidget *currentWidget;
+ TQWidget *w = 0;
+ TQWidget *currentWidget;
- w = qApp->focusWidget();
- while(w && d->m_tabOrderWidgets.find(w) == -1) {
- // qDebug("'%s' not in list, use parent", w->className());
- w = w->parentWidget();
+ w = tqApp->tqfocusWidget();
+ while(w && d->m_tabOrderWidgets.tqfind(w) == -1) {
+ // qDebug("'%s' not in list, use tqparent", w->className());
+ w = w->tqparentWidget();
}
// if(w) qDebug("tab order is at '%s'", w->className());
currentWidget = d->m_tabOrderWidgets.current();
@@ -304,7 +304,7 @@ bool KEnterScheduleDlg::focusNextPrevChild(bool next)
}
if(w != currentWidget
- && ((w->focusPolicy() & TabFocus) == TabFocus)
+ && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus)
&& w->isVisible() && w->isEnabled()) {
// qDebug("Selecting '%s' as focus", w->className());
w->setFocus();