summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/keditscheduledlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/keditscheduledlg.cpp')
-rw-r--r--kmymoney2/dialogs/keditscheduledlg.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/kmymoney2/dialogs/keditscheduledlg.cpp b/kmymoney2/dialogs/keditscheduledlg.cpp
index 635d564..559fddd 100644
--- a/kmymoney2/dialogs/keditscheduledlg.cpp
+++ b/kmymoney2/dialogs/keditscheduledlg.cpp
@@ -18,12 +18,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-#include <qwidgetlist.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvaluevector.h>
+#include <tqtimer.h>
+#include <tqwidgetlist.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvaluevector.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -55,13 +55,13 @@ class KEditScheduleDlg::Private {
public:
MyMoneySchedule m_schedule;
KMyMoneyRegister::Transaction* m_item;
- QWidgetList m_tabOrderWidgets;
+ TQWidgetList m_tabOrderWidgets;
TransactionEditor* m_editor;
kMandatoryFieldGroup* m_requiredFields;
};
-KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *parent, const char *name) :
- KEditScheduleDlgDecl(parent, name, true),
+KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, TQWidget *tqparent, const char *name) :
+ KEditScheduleDlgDecl(tqparent, name, true),
d(new Private)
{
d->m_schedule = schedule;
@@ -71,12 +71,12 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par
buttonCancel->setGuiItem(KStdGuiItem::cancel());
buttonHelp->setGuiItem(KStdGuiItem::help());
- d->m_requiredFields = new kMandatoryFieldGroup (this);
+ d->m_requiredFields = new kMandatoryFieldGroup (TQT_TQOBJECT(this));
d->m_requiredFields->setOkButton(buttonOk); // button to be enabled when all fields present
// make sure, we have a tabbar with the form
// insert it after the horizontal line
- m_paymentInformationLayout->insertWidget(2, m_form->tabBar(m_form->parentWidget()));
+ m_paymentInformationLayout->insertWidget(2, m_form->tabBar(m_form->tqparentWidget()));
// we never need to see the register
m_register->hide();
@@ -111,7 +111,7 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par
m_paymentMethodEdit->insertItem(i18n("Direct debit"), MyMoneySchedule::STYPE_DIRECTDEBIT);
m_paymentMethodEdit->insertItem(i18n("Standing order"), MyMoneySchedule::STYPE_STANDINGORDER);
m_paymentMethodEdit->insertItem(i18n("Bank transfer"), MyMoneySchedule::STYPE_BANKTRANSFER);
- m_paymentMethodEdit->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHEQUE);
+ m_paymentMethodEdit->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHETQUE);
m_paymentMethodEdit->insertItem(i18n("Other"), MyMoneySchedule::STYPE_OTHER);
MyMoneySchedule::paymentTypeE method = d->m_schedule.paymentType();
@@ -140,18 +140,18 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par
m_FinalPaymentEdit->setDate(d->m_schedule.endDate());
}
- connect(m_RemainingEdit, SIGNAL(valueChanged(int)),
- this, SLOT(slotRemainingChanged(int)));
- connect(m_FinalPaymentEdit, SIGNAL(dateChanged(const QDate&)),
- this, SLOT(slotEndDateChanged(const QDate&)));
- connect(m_frequencyEdit, SIGNAL(itemSelected(int)),
- this, SLOT(slotFrequencyChanged(int)));
- connect(m_frequencyNoEdit, SIGNAL(valueChanged(int)),
- this, SLOT(slotOccurenceMultiplierChanged(int)));
- connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotShowHelp()));
+ connect(m_RemainingEdit, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotRemainingChanged(int)));
+ connect(m_FinalPaymentEdit, TQT_SIGNAL(dateChanged(const TQDate&)),
+ this, TQT_SLOT(slotEndDateChanged(const TQDate&)));
+ connect(m_frequencyEdit, TQT_SIGNAL(itemSelected(int)),
+ this, TQT_SLOT(slotFrequencyChanged(int)));
+ connect(m_frequencyNoEdit, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotOccurenceMultiplierChanged(int)));
+ connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp()));
// force the initial height to be as small as possible
- QTimer::singleShot(0, this, SLOT(slotSetupSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSetupSize()));
// we just hide the variation field for now and enable the logic
// once we have a respective member in the MyMoneySchedule object
@@ -165,13 +165,13 @@ KEditScheduleDlg::~KEditScheduleDlg()
void KEditScheduleDlg::slotSetupSize(void)
{
- resize(width(), minimumSizeHint().height());
+ resize(width(), tqminimumSizeHint().height());
}
TransactionEditor* KEditScheduleDlg::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
@@ -186,18 +186,18 @@ TransactionEditor* KEditScheduleDlg::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;
@@ -216,7 +216,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void)
// into the transaction and determine the type. in case we don't have a transaction with splits
// we stick with the default action already set up
if(d->m_schedule.transaction().splits().count() > 0) {
- QValueList<MyMoneySplit>::const_iterator it_s;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
bool isDeposit = false;
bool isTransfer = false;
for(it_s = d->m_schedule.transaction().splits().begin(); it_s != d->m_schedule.transaction().splits().end(); ++it_s) {
@@ -241,10 +241,10 @@ TransactionEditor* KEditScheduleDlg::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());
@@ -268,7 +268,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void)
d->m_tabOrderWidgets.append(m_form);
// install event filter in all taborder widgets
- QWidget* w;
+ TQWidget* w;
for(w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) {
w->installEventFilter(this);
w->installEventFilter(editor);
@@ -277,7 +277,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void)
// connect the postdate modification signal to our update routine
kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(editor->haveWidget("postdate"));
if(dateEdit)
- connect(dateEdit, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotPostDateChanged(const QDate&)));
+ connect(dateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotPostDateChanged(const TQDate&)));
m_nameEdit->setFocus();
@@ -288,7 +288,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void)
d->m_requiredFields->add(editor->haveWidget("category"));
// fix labels
- QLabel* label = dynamic_cast<QLabel*>(editor->haveWidget("date-label"));
+ TQLabel* label = dynamic_cast<TQLabel*>(editor->haveWidget("date-label"));
if(label) {
label->setText(i18n("Next due date"));
}
@@ -296,7 +296,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void)
d->m_editor = editor;
slotSetPaymentMethod(d->m_schedule.paymentType());
- connect(m_paymentMethodEdit, SIGNAL(itemSelected(int)), this, SLOT(slotSetPaymentMethod(int)));
+ connect(m_paymentMethodEdit, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotSetPaymentMethod(int)));
}
return editor;
@@ -366,7 +366,7 @@ const MyMoneySchedule& KEditScheduleDlg::schedule(void) const
if(m_endSeriesEdit->isEnabled() && m_endSeriesEdit->isChecked()) {
d->m_schedule.setEndDate(m_FinalPaymentEdit->date());
} else {
- d->m_schedule.setEndDate(QDate());
+ d->m_schedule.setEndDate(TQDate());
}
}
return d->m_schedule;
@@ -381,7 +381,7 @@ MyMoneyTransaction KEditScheduleDlg::transaction(void) const
}
t.clearId();
- t.setEntryDate(QDate());
+ t.setEntryDate(TQDate());
return t;
}
@@ -390,13 +390,13 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next)
bool rc = false;
// qDebug("KEditScheduleDlg::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();
@@ -408,7 +408,7 @@ bool KEditScheduleDlg::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();
@@ -421,7 +421,7 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next)
return rc;
}
-void KEditScheduleDlg::resizeEvent(QResizeEvent* ev)
+void KEditScheduleDlg::resizeEvent(TQResizeEvent* ev)
{
m_register->resize(KMyMoneyRegister::DetailColumn);
m_form->resize(KMyMoneyTransactionForm::ValueColumn1);
@@ -444,7 +444,7 @@ void KEditScheduleDlg::slotRemainingChanged(int value)
}
}
-void KEditScheduleDlg::slotEndDateChanged(const QDate& date)
+void KEditScheduleDlg::slotEndDateChanged(const TQDate& date)
{
// Make sure the required fields are set
kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(d->m_editor->haveWidget("postdate"));
@@ -458,7 +458,7 @@ void KEditScheduleDlg::slotEndDateChanged(const QDate& date)
}
}
-void KEditScheduleDlg::slotPostDateChanged(const QDate& date)
+void KEditScheduleDlg::slotPostDateChanged(const TQDate& date)
{
if(d->m_schedule.nextDueDate() != date) {
if (m_endOptionsFrame->isEnabled()) {
@@ -475,13 +475,13 @@ void KEditScheduleDlg::slotSetPaymentMethod(int item)
{
kMyMoneyLineEdit* dateEdit = dynamic_cast<kMyMoneyLineEdit*>(d->m_editor->haveWidget("number"));
if(dateEdit) {
- dateEdit->setShown(item == MyMoneySchedule::STYPE_WRITECHEQUE);
+ dateEdit->setShown(item == MyMoneySchedule::STYPE_WRITECHETQUE);
// hiding the label does not work, because the label underneath will shine
// through. So we either write the label or a blank
- QLabel* label = dynamic_cast<QLabel *>(d->m_editor->haveWidget("number-label"));
+ TQLabel* label = dynamic_cast<TQLabel *>(d->m_editor->haveWidget("number-label"));
if(label) {
- label->setText((item == MyMoneySchedule::STYPE_WRITECHEQUE) ? i18n("Number") : " ");
+ label->setText((item == MyMoneySchedule::STYPE_WRITECHETQUE) ? i18n("Number") : " ");
}
}
}