summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kbudgetvalues.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/widgets/kbudgetvalues.cpp')
-rw-r--r--kmymoney2/widgets/kbudgetvalues.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kmymoney2/widgets/kbudgetvalues.cpp b/kmymoney2/widgets/kbudgetvalues.cpp
index 2d6c2d7..994eac6 100644
--- a/kmymoney2/widgets/kbudgetvalues.cpp
+++ b/kmymoney2/widgets/kbudgetvalues.cpp
@@ -18,14 +18,14 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,11 +43,11 @@
#include "kbudgetvalues.h"
#include <kmymoney/kmymoneyedit.h>
-KBudgetValues::KBudgetValues(QWidget* parent, const char* name) :
- KBudgetValuesDecl(parent, name),
+KBudgetValues::KBudgetValues(TQWidget* tqparent, const char* name) :
+ KBudgetValuesDecl(tqparent, name),
m_currentTab(m_monthlyButton)
{
- m_budgetDate = QDate(2007,1,1);
+ m_budgetDate = TQDate(2007,1,1);
m_field[0] = m_amount1;
m_field[1] = m_amount2;
@@ -79,26 +79,26 @@ KBudgetValues::KBudgetValues(QWidget* parent, const char* name) :
m_monthlyButton->setChecked(true);
slotChangePeriod(m_periodGroup->id(m_monthlyButton));
- // connect(m_budgetLevel, SIGNAL(currentChanged(QWidget*)), this, SIGNAL(valuesChanged()));
- connect(m_amountMonthly, SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate()));
- connect(m_amountYearly, SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate()));
+ // connect(m_budgetLevel, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SIGNAL(valuesChanged()));
+ connect(m_amountMonthly, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate()));
+ connect(m_amountYearly, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate()));
m_amountMonthly->installEventFilter(this);
m_amountYearly->installEventFilter(this);
for(int i=0; i < 12; ++i) {
- connect(m_field[i], SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate()));
+ connect(m_field[i], TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate()));
m_field[i]->installEventFilter(this);
}
- connect(m_clearButton, SIGNAL(clicked()), this, SLOT(slotClearAllValues()));
- connect(m_periodGroup, SIGNAL(clicked(int)), this, SLOT(slotChangePeriod(int)));
- connect(this, SIGNAL(valuesChanged()), this, SLOT(slotUpdateClearButton()));
+ connect(m_clearButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearAllValues()));
+ connect(m_periodGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotChangePeriod(int)));
+ connect(this, TQT_SIGNAL(valuesChanged()), this, TQT_SLOT(slotUpdateClearButton()));
KGuiItem clearItem(KStdGuiItem::clear());
m_clearButton->setGuiItem(clearItem);
m_clearButton->setText("");
- QToolTip::add(m_clearButton, clearItem.toolTip());
+ TQToolTip::add(m_clearButton, clearItem.toolTip());
}
@@ -106,22 +106,22 @@ KBudgetValues::~KBudgetValues()
{
}
-bool KBudgetValues::eventFilter(QObject* o, QEvent* e)
+bool KBudgetValues::eventFilter(TQObject* o, TQEvent* e)
{
bool rc = false;
if(o->isWidgetType()
- && (e->type() == QEvent::KeyPress)) {
- QKeyEvent* k = dynamic_cast<QKeyEvent*>(e);
- if((k->state() & Qt::KeyButtonMask) == 0) {
- QKeyEvent evt(e->type(),
- Qt::Key_Tab, 0, k->state(), QString::null,
+ && (e->type() == TQEvent::KeyPress)) {
+ TQKeyEvent* k = dynamic_cast<TQKeyEvent*>(e);
+ if((k->state() & TQt::KeyButtonMask) == 0) {
+ TQKeyEvent evt(e->type(),
+ TQt::Key_Tab, 0, k->state(), TQString(),
k->isAutoRepeat(), k->count());
switch(k->key()) {
- case Qt::Key_Return:
- case Qt::Key_Enter:
+ case TQt::Key_Return:
+ case TQt::Key_Enter:
// send out a TAB key event
- QApplication::sendEvent( o, &evt );
+ TQApplication::sendEvent( o, &evt );
// don't process this one any further
rc = true;
break;
@@ -145,7 +145,7 @@ void KBudgetValues::clear(void)
void KBudgetValues::slotClearAllValues(void)
{
- QWidget* tab = m_periodGroup->selected();
+ TQWidget* tab = m_periodGroup->selected();
if(tab == m_monthlyButton) {
m_amountMonthly->setValue(MyMoneyMoney());
} else if(tab == m_yearlyButton) {
@@ -166,7 +166,7 @@ void KBudgetValues::slotChangePeriod(int id)
return;
inside = true;
- QWidget *tab = m_periodGroup->find(id);
+ TQWidget *tab = m_periodGroup->tqfind(id);
fillMonthLabels();
MyMoneyMoney newValue;
@@ -184,7 +184,7 @@ void KBudgetValues::slotChangePeriod(int id)
newValue = (newValue / MyMoneyMoney(12, 1)).convert();
}
if(!newValue.isZero()) {
- if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in a monthly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in a monthly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
m_amountMonthly->setValue(newValue);
}
}
@@ -203,7 +203,7 @@ void KBudgetValues::slotChangePeriod(int id)
newValue += m_field[i]->value();
}
if(!newValue.isZero()) {
- if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in a yearly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in a yearly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
m_amountYearly->setValue(newValue);
}
}
@@ -222,7 +222,7 @@ void KBudgetValues::slotChangePeriod(int id)
}
if(!newValue.isZero()) {
- if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in an individual monthly budget of <b>%1</b>. Should this value be used to fill the monthly budgets?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in an individual monthly budget of <b>%1</b>. Should this value be used to fill the monthly budgets?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) {
for(int i=0; i < 12; ++i)
m_field[i]->setValue(newValue);
}
@@ -238,7 +238,7 @@ void KBudgetValues::slotChangePeriod(int id)
void KBudgetValues::slotNeedUpdate(void)
{
if(!signalsBlocked())
- QTimer::singleShot(0, this, SIGNAL(valuesChanged()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(valuesChanged()));
}
void KBudgetValues::enableMonths(bool enabled)
@@ -251,7 +251,7 @@ void KBudgetValues::enableMonths(bool enabled)
void KBudgetValues::fillMonthLabels(void)
{
- QDate date(m_budgetDate);
+ TQDate date(m_budgetDate);
for(int i = 0; i < 12; ++i) {
m_label[i]->setText(KGlobal::locale()->calendar()->monthName(date, true));
date = date.addMonths(1);
@@ -262,7 +262,7 @@ void KBudgetValues::setBudgetValues(const MyMoneyBudget& budget, const MyMoneyBu
{
MyMoneyBudget::PeriodGroup period;
m_budgetDate = budget.budgetStart();
- QDate date;
+ TQDate date;
// make sure all values are zero so that slotChangePeriod()
// doesn't check for anything.
@@ -300,7 +300,7 @@ void KBudgetValues::budgetValues(const MyMoneyBudget& budget, MyMoneyBudget::Acc
MyMoneyBudget::PeriodGroup period;
m_budgetDate = budget.budgetStart();
period.setStartDate(m_budgetDate);
- QDate date;
+ TQDate date;
budgetAccount.clearPeriods();
if(m_periodGroup->selected() == m_monthlyButton) {