summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/widgets')
-rw-r--r--kmymoney2/widgets/Makefile.am5
-rw-r--r--kmymoney2/widgets/kaccounttemplateselector.cpp124
-rw-r--r--kmymoney2/widgets/kaccounttemplateselector.h5
-rw-r--r--kmymoney2/widgets/kaccounttemplateselectordecl.cpp72
-rw-r--r--kmymoney2/widgets/kaccounttemplateselectordecl.ui16
-rw-r--r--kmymoney2/widgets/kbudgetvalues.cpp74
-rw-r--r--kmymoney2/widgets/kbudgetvalues.h15
-rw-r--r--kmymoney2/widgets/kbudgetvaluesdecl.cpp130
-rw-r--r--kmymoney2/widgets/kbudgetvaluesdecl.ui52
-rw-r--r--kmymoney2/widgets/kguiutils.cpp100
-rw-r--r--kmymoney2/widgets/kguiutils.h23
-rw-r--r--kmymoney2/widgets/klistviewsearchline.cpp142
-rw-r--r--kmymoney2/widgets/klistviewsearchline.h52
-rw-r--r--kmymoney2/widgets/kmymoney.widgets8
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcombo.cpp60
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcombo.h31
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcompletion.cpp28
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcompletion.h11
-rw-r--r--kmymoney2/widgets/kmymoneyaccountselector.cpp204
-rw-r--r--kmymoney2/widgets/kmymoneyaccountselector.h39
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttree.cpp46
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttree.h15
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreebase.cpp212
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreebase.h95
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreebudget.cpp14
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreebudget.h17
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp84
-rw-r--r--kmymoney2/widgets/kmymoneyaccounttreeforecast.h23
-rw-r--r--kmymoney2/widgets/kmymoneybriefschedule.cpp64
-rw-r--r--kmymoney2/widgets/kmymoneybriefschedule.h17
-rw-r--r--kmymoney2/widgets/kmymoneycalculator.cpp176
-rw-r--r--kmymoney2/widgets/kmymoneycalculator.h59
-rw-r--r--kmymoney2/widgets/kmymoneycalendar.cpp250
-rw-r--r--kmymoney2/widgets/kmymoneycalendar.h67
-rw-r--r--kmymoney2/widgets/kmymoneycategory.cpp64
-rw-r--r--kmymoney2/widgets/kmymoneycategory.h46
-rw-r--r--kmymoney2/widgets/kmymoneychecklistitem.cpp40
-rw-r--r--kmymoney2/widgets/kmymoneychecklistitem.h27
-rw-r--r--kmymoney2/widgets/kmymoneycombo.cpp278
-rw-r--r--kmymoney2/widgets/kmymoneycombo.h119
-rw-r--r--kmymoney2/widgets/kmymoneycompletion.cpp72
-rw-r--r--kmymoney2/widgets/kmymoneycompletion.h33
-rw-r--r--kmymoney2/widgets/kmymoneycurrencyselector.cpp46
-rw-r--r--kmymoney2/widgets/kmymoneycurrencyselector.h13
-rw-r--r--kmymoney2/widgets/kmymoneydateinput.cpp148
-rw-r--r--kmymoney2/widgets/kmymoneydateinput.h64
-rw-r--r--kmymoney2/widgets/kmymoneydatetbl.cpp212
-rw-r--r--kmymoney2/widgets/kmymoneydatetbl.h52
-rw-r--r--kmymoney2/widgets/kmymoneyedit.cpp190
-rw-r--r--kmymoney2/widgets/kmymoneyedit.h70
-rw-r--r--kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp26
-rw-r--r--kmymoney2/widgets/kmymoneyforecastlistviewitem.h10
-rw-r--r--kmymoney2/widgets/kmymoneygpgconfig.cpp14
-rw-r--r--kmymoney2/widgets/kmymoneygpgconfig.h7
-rw-r--r--kmymoney2/widgets/kmymoneygpgconfigdecl.ui34
-rw-r--r--kmymoney2/widgets/kmymoneylineedit.cpp58
-rw-r--r--kmymoney2/widgets/kmymoneylineedit.h37
-rw-r--r--kmymoney2/widgets/kmymoneylistviewitem.cpp32
-rw-r--r--kmymoney2/widgets/kmymoneylistviewitem.h23
-rw-r--r--kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp70
-rw-r--r--kmymoney2/widgets/kmymoneyonlinequoteconfig.h13
-rw-r--r--kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui30
-rw-r--r--kmymoney2/widgets/kmymoneypriceview.cpp58
-rw-r--r--kmymoney2/widgets/kmymoneypriceview.h13
-rw-r--r--kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui26
-rw-r--r--kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui44
-rw-r--r--kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui64
-rw-r--r--kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui32
-rw-r--r--kmymoney2/widgets/kmymoneyreportcontroldecl.ui32
-rw-r--r--kmymoney2/widgets/kmymoneyscheduledcalendar.cpp26
-rw-r--r--kmymoney2/widgets/kmymoneyscheduledcalendar.h9
-rw-r--r--kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp120
-rw-r--r--kmymoney2/widgets/kmymoneyscheduleddatetbl.h19
-rw-r--r--kmymoney2/widgets/kmymoneyselector.cpp294
-rw-r--r--kmymoney2/widgets/kmymoneyselector.h109
-rw-r--r--kmymoney2/widgets/kmymoneytitlelabel.cpp38
-rw-r--r--kmymoney2/widgets/kmymoneytitlelabel.h55
-rw-r--r--kmymoney2/widgets/kmymoneywizard.cpp134
-rw-r--r--kmymoney2/widgets/kmymoneywizard.h107
-rw-r--r--kmymoney2/widgets/kmymoneywizard_p.h11
-rw-r--r--kmymoney2/widgets/kschedulebriefwidget.ui56
-rw-r--r--kmymoney2/widgets/register.cpp472
-rw-r--r--kmymoney2/widgets/register.h183
-rw-r--r--kmymoney2/widgets/registeritem.cpp14
-rw-r--r--kmymoney2/widgets/registeritem.h50
-rw-r--r--kmymoney2/widgets/registersearchline.cpp66
-rw-r--r--kmymoney2/widgets/registersearchline.h22
-rw-r--r--kmymoney2/widgets/scheduledtransaction.cpp12
-rw-r--r--kmymoney2/widgets/scheduledtransaction.h18
-rw-r--r--kmymoney2/widgets/selectedtransaction.cpp2
-rw-r--r--kmymoney2/widgets/selectedtransaction.h8
-rw-r--r--kmymoney2/widgets/sortoptionlistitem.h10
-rw-r--r--kmymoney2/widgets/stdtransactiondownloaded.cpp20
-rw-r--r--kmymoney2/widgets/stdtransactiondownloaded.h42
-rw-r--r--kmymoney2/widgets/stdtransactionmatched.cpp56
-rw-r--r--kmymoney2/widgets/stdtransactionmatched.h32
-rw-r--r--kmymoney2/widgets/transaction.cpp580
-rw-r--r--kmymoney2/widgets/transaction.h162
-rw-r--r--kmymoney2/widgets/transactioneditorcontainer.h22
-rw-r--r--kmymoney2/widgets/transactionform.cpp170
-rw-r--r--kmymoney2/widgets/transactionform.h68
-rw-r--r--kmymoney2/widgets/transactionsortoption.ui66
-rw-r--r--kmymoney2/widgets/transactionsortoption.ui.h72
103 files changed, 3773 insertions, 3779 deletions
diff --git a/kmymoney2/widgets/Makefile.am b/kmymoney2/widgets/Makefile.am
index 51fa159..2d43022 100644
--- a/kmymoney2/widgets/Makefile.am
+++ b/kmymoney2/widgets/Makefile.am
@@ -14,7 +14,7 @@ selectedtransaction.cpp
#register.cpp registeritem.cpp transaction.cpp transactionform.cpp transactioneditor.cpp transactioneditorcontainer.cpp kmymoneychecklistitem.cpp kmymoneylistviewitem.cpp kmymoneyforecastlistviewitem.cpp kmymoneyselector.cpp \
#transactionsortoption.ui
-EXTRA_DIST = kmymoney.widgets kmymoneygpgconfigdecl.ui kmymoneyonlinequoteconfigdecl.ui kmymoneyreportconfigtab1decl.ui kmymoneyreportconfigtab2decl.ui kmymoneyreportconfigtab3decl.ui kmymoneyreportcontroldecl.ui kschedulebriefwidget.ui kmymoneyreportconfigtabchartdecl.ui transactionsortoption.ui transactionsortoption.ui.h sortoptionlistitem.h makekdewidgets.in kbudgetvaluesdecl.ui kaccounttemplateselectordecl.ui
+EXTRA_DIST = kmymoney.widgets kmymoneygpgconfigdecl.ui kmymoneyonlinequoteconfigdecl.ui kmymoneyreportconfigtab1decl.ui kmymoneyreportconfigtab2decl.ui kmymoneyreportconfigtab3decl.ui kmymoneyreportcontroldecl.ui kschedulebriefwidget.ui kmymoneyreportconfigtabchartdecl.ui transactionsortoption.ui transactionsortoption.ui.h sortoptionlistitem.h kbudgetvaluesdecl.ui kaccounttemplateselectordecl.ui
# include the widgets that are available to 3rd party sw (e.g. plugins or
# Qt designer) here
@@ -58,8 +58,7 @@ libkmymoney_la_SOURCES = kmmwidgets.cpp ../kmymoneysettings.cpp kmymoneycompleti
noinst_LTLIBRARIES = libkmymoney.la
kmmwidgets.cpp: $(srcdir)/kmymoney.widgets
- chmod +x makekdewidgets
- ./makekdewidgets -g KMyMoney -n CustomWidgetPlugin -o kmmwidgets.cpp -i kmymoney $(abs_srcdir)/kmymoney.widgets
+ $(MAKEKDEWIDGETS) -g KMyMoney -n CustomWidgetPlugin -o kmmwidgets.cpp $(abs_srcdir)/kmymoney.widgets
# make sure to compile the Qt designer version w/o the memory leak checker
# also we need a copy of the mymoneymoney.lo file which has been compiled
diff --git a/kmymoney2/widgets/kaccounttemplateselector.cpp b/kmymoney2/widgets/kaccounttemplateselector.cpp
index 8ba6f0a..1816fab 100644
--- a/kmymoney2/widgets/kaccounttemplateselector.cpp
+++ b/kmymoney2/widgets/kaccounttemplateselector.cpp
@@ -18,9 +18,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdir.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqheader.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -41,14 +41,14 @@
class KTemplateListItem : public KListViewItem
{
public:
- KTemplateListItem(QListViewItem* parent, const QString& text);
+ KTemplateListItem(TQListViewItem* tqparent, const TQString& text);
void setAvailable(void);
public:
bool m_isAvailable;
};
-KTemplateListItem::KTemplateListItem(QListViewItem* parent, const QString& text) :
- KListViewItem(parent, text),
+KTemplateListItem::KTemplateListItem(TQListViewItem* tqparent, const TQString& text) :
+ KListViewItem(tqparent, text),
m_isAvailable(false)
{
}
@@ -63,41 +63,41 @@ class KAccountTemplateSelector::Private
public:
Private(KAccountTemplateSelector* p) { m_parent = p; }
#ifndef KMM_DESIGNER
- QValueList<MyMoneyTemplate> selectedTemplates(void) const;
- QListViewItem* hierarchyItem(const QString& parent, const QString& name);
+ TQValueList<MyMoneyTemplate> selectedTemplates(void) const;
+ TQListViewItem* hierarchyItem(const TQString& tqparent, const TQString& name);
void loadHierarchy(void);
#endif
public:
KAccountTemplateSelector* m_parent;
- QMap<QString, QListViewItem*> m_templateHierarchy;
+ TQMap<TQString, TQListViewItem*> m_templateHierarchy;
#ifndef KMM_DESIGNER
- QMap<QString, MyMoneyTemplate> m_templates;
- QMap<QString, QString> countries;
- QMap<QString, QString>::iterator it_m;
- QStringList dirlist;
+ TQMap<TQString, MyMoneyTemplate> m_templates;
+ TQMap<TQString, TQString> countries;
+ TQMap<TQString, TQString>::iterator it_m;
+ TQStringList dirlist;
int id;
#endif
};
#ifndef KMM_DESIGNER
-QListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const QString& parent, const QString& name)
+TQListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const TQString& tqparent, const TQString& name)
{
- if(!m_templateHierarchy.contains(parent)
- || m_templateHierarchy[parent] == 0) {
- QRegExp exp("(.*):(.*)");
- if(exp.search(parent) != -1)
- m_templateHierarchy[parent] = hierarchyItem(exp.cap(1), exp.cap(2));
+ if(!m_templateHierarchy.tqcontains(tqparent)
+ || m_templateHierarchy[tqparent] == 0) {
+ TQRegExp exp("(.*):(.*)");
+ if(exp.search(tqparent) != -1)
+ m_templateHierarchy[tqparent] = hierarchyItem(exp.cap(1), exp.cap(2));
}
- return new KTemplateListItem(m_templateHierarchy[parent], name);
+ return new KTemplateListItem(m_templateHierarchy[tqparent], name);
}
void KAccountTemplateSelector::Private::loadHierarchy(void)
{
m_templateHierarchy.clear();
- QListViewItemIterator it(m_parent->m_groupList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_parent->m_groupList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
while((it_v = it.current()) != 0) {
m_templates[it_v->text(2)].hierarchy(m_templateHierarchy);
++it;
@@ -109,8 +109,8 @@ void KAccountTemplateSelector::Private::loadHierarchy(void)
#if 0
// add the hierarchy from the MyMoneyFile object
- QValueList<MyMoneyAccount> aList;
- QValueList<MyMoneyAccount>::const_iterator it_a;
+ TQValueList<MyMoneyAccount> aList;
+ TQValueList<MyMoneyAccount>::const_iterator it_a;
MyMoneyFile* file = MyMoneyFile::instance();
file->accountList(aList);
if(aList.count() > 0) {
@@ -127,9 +127,9 @@ void KAccountTemplateSelector::Private::loadHierarchy(void)
#endif
m_parent->m_accountList->clear();
- QMap<QString, QListViewItem*>::iterator it_m;
+ TQMap<TQString, TQListViewItem*>::iterator it_m;
- QRegExp exp("(.*):(.*)");
+ TQRegExp exp("(.*):(.*)");
for(it_m = m_templateHierarchy.begin(); it_m != m_templateHierarchy.end(); ++it_m) {
if(exp.search(it_m.key()) == -1) {
(*it_m) = new KListViewItem(m_parent->m_accountList, it_m.key());
@@ -145,11 +145,11 @@ void KAccountTemplateSelector::Private::loadHierarchy(void)
}
}
-QValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates(void) const
+TQValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates(void) const
{
- QValueList<MyMoneyTemplate> list;
- QListViewItemIterator it(m_parent->m_groupList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQValueList<MyMoneyTemplate> list;
+ TQListViewItemIterator it(m_parent->m_groupList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
while((it_v = it.current()) != 0) {
list << m_templates[it_v->text(2)];
++it;
@@ -159,15 +159,15 @@ QValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates
#endif
-KAccountTemplateSelector::KAccountTemplateSelector(QWidget* parent, const char* name) :
- KAccountTemplateSelectorDecl(parent, name),
+KAccountTemplateSelector::KAccountTemplateSelector(TQWidget* tqparent, const char* name) :
+ KAccountTemplateSelectorDecl(tqparent, name),
d(new Private(this))
{
m_accountList->header()->hide();
- connect(m_groupList, SIGNAL(selectionChanged()), this, SLOT(slotLoadHierarchy()));
+ connect(m_groupList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotLoadHierarchy()));
// kick off loading of account template data
- QTimer::singleShot(0, this, SLOT(slotLoadTemplateList()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotLoadTemplateList()));
}
KAccountTemplateSelector::~KAccountTemplateSelector()
@@ -178,40 +178,40 @@ KAccountTemplateSelector::~KAccountTemplateSelector()
void KAccountTemplateSelector::slotLoadTemplateList(void)
{
#ifndef KMM_DESIGNER
- QStringList dirs;
+ TQStringList dirs;
// get list of template subdirs and scan them for the list of subdirs
d->dirlist = KGlobal::dirs()->findDirs("appdata", "templates");
- QStringList::iterator it;
+ TQStringList::iterator it;
for(it = d->dirlist.begin(); it != d->dirlist.end(); ++it) {
- QDir dir(*it);
+ TQDir dir(*it);
// qDebug("Reading dir '%s' with %d entries", (*it).data(), dir.count());
- dirs = dir.entryList("*", QDir::Dirs);
- QStringList::iterator it_d;
+ dirs = dir.entryList("*", TQDir::Dirs);
+ TQStringList::iterator it_d;
for(it_d= dirs.begin(); it_d != dirs.end(); ++it_d) {
// we don't care about . and ..
if((*it_d) == ".." || (*it_d) == "." || (*it_d) == "C")
continue;
- QRegExp exp("(..)_(..)");
+ TQRegExp exp("(..)_(..)");
if(exp.search(*it_d) != -1) {
- QString country = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2));
+ TQString country = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2));
if(country.isEmpty())
country = exp.cap(2);
- QString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1));
- if(d->countries.contains(country)) {
+ TQString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1));
+ if(d->countries.tqcontains(country)) {
if(d->countries[country] != *it_d) {
- QString oName = d->countries[country];
+ TQString oName = d->countries[country];
exp.search(oName);
- QString oCountry = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2));
- QString oLang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1));
+ TQString oCountry = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2));
+ TQString oLang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1));
d->countries.remove(country);
- d->countries[QString("%1 (%2)").arg(oCountry).arg(oLang)] = oName;
- d->countries[QString("%1 (%2)").arg(country).arg(lang)] = *it_d;
+ d->countries[TQString("%1 (%2)").tqarg(oCountry).tqarg(oLang)] = oName;
+ d->countries[TQString("%1 (%2)").tqarg(country).tqarg(lang)] = *it_d;
}
} else {
d->countries[country] = *it_d;
}
} else if((*it_d).length() == 2) {
- QString country = KGlobal::locale()->twoAlphaToCountryName((*it_d).upper());
+ TQString country = KGlobal::locale()->twoAlphaToCountryName((*it_d).upper());
d->countries[country] = *it_d;
} else {
qDebug("'%s/%s' not scanned", (*it).data(), (*it_d).data());
@@ -225,7 +225,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void)
d->m_templates.clear();
d->it_m = d->countries.begin();
d->id = 1;
- QTimer::singleShot(0, this, SLOT(slotLoadCountry()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotLoadCountry()));
#endif
}
@@ -233,18 +233,18 @@ void KAccountTemplateSelector::slotLoadCountry(void)
{
#ifndef KMM_DESIGNER
- KListViewItem* parent = new KListViewItem(m_groupList, d->it_m.key());
- parent->setSelectable(false);
- QStringList::iterator it;
+ KListViewItem* tqparent = new KListViewItem(m_groupList, d->it_m.key());
+ tqparent->setSelectable(false);
+ TQStringList::iterator it;
for(it = d->dirlist.begin(); it != d->dirlist.end(); ++it) {
- QStringList::iterator it_f;
- QDir dir(QString("%1%2").arg(*it).arg(*(d->it_m)));
+ TQStringList::iterator it_f;
+ TQDir dir(TQString("%1%2").tqarg(*it).tqarg(*(d->it_m)));
if(dir.exists()) {
- QStringList files = dir.entryList("*", QDir::Files);
+ TQStringList files = dir.entryList("*", TQDir::Files);
for(it_f = files.begin(); it_f != files.end(); ++it_f) {
- MyMoneyTemplate templ(QString("%1/%2").arg(dir.canonicalPath()).arg(*it_f));
- d->m_templates[QString("%1").arg(d->id)] = templ;
- new KListViewItem(parent, templ.title(), templ.shortDescription(), QString("%1").arg(d->id));
+ MyMoneyTemplate templ(TQString("%1/%2").tqarg(dir.canonicalPath()).tqarg(*it_f));
+ d->m_templates[TQString("%1").tqarg(d->id)] = templ;
+ new KListViewItem(tqparent, templ.title(), templ.shortDescription(), TQString("%1").tqarg(d->id));
++d->id;
}
}
@@ -252,7 +252,7 @@ void KAccountTemplateSelector::slotLoadCountry(void)
++d->it_m;
if(d->it_m != d->countries.end())
- QTimer::singleShot(0, this, SLOT(slotLoadCountry()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotLoadCountry()));
else {
d->loadHierarchy();
}
@@ -267,12 +267,12 @@ void KAccountTemplateSelector::slotLoadHierarchy(void)
#endif
}
-QValueList<MyMoneyTemplate> KAccountTemplateSelector::selectedTemplates(void) const
+TQValueList<MyMoneyTemplate> KAccountTemplateSelector::selectedTemplates(void) const
{
#ifndef KMM_DESIGNER
return d->selectedTemplates();
#else
- return QValueList<MyMoneyTemplate>();
+ return TQValueList<MyMoneyTemplate>();
#endif
}
diff --git a/kmymoney2/widgets/kaccounttemplateselector.h b/kmymoney2/widgets/kaccounttemplateselector.h
index df2c3fd..859d08f 100644
--- a/kmymoney2/widgets/kaccounttemplateselector.h
+++ b/kmymoney2/widgets/kaccounttemplateselector.h
@@ -36,11 +36,12 @@ class MyMoneyTemplate;
class KAccountTemplateSelector : public KAccountTemplateSelectorDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KAccountTemplateSelector(QWidget* parent = 0, const char* name = 0);
+ KAccountTemplateSelector(TQWidget* tqparent = 0, const char* name = 0);
~KAccountTemplateSelector();
- QValueList<MyMoneyTemplate> selectedTemplates(void) const;
+ TQValueList<MyMoneyTemplate> selectedTemplates(void) const;
private slots:
void slotLoadHierarchy(void);
diff --git a/kmymoney2/widgets/kaccounttemplateselectordecl.cpp b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
index 8fed754..795ac29 100644
--- a/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
+++ b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
@@ -2,8 +2,8 @@
#include <klocale.h>
#ifndef KMM_I18N
#define KMM_I18N
-inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
-inline QString kmm_i18n(const char* msg) { return i18n(msg); }
+inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
+inline TQString kmm_i18n(const char* msg) { return i18n(msg); }
#endif
/****************************************************************************
** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kaccounttemplateselectordecl.ui'
@@ -15,75 +15,75 @@ inline QString kmm_i18n(const char* msg) { return i18n(msg); }
#include "kaccounttemplateselectordecl.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <klistview.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <ktextedit.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*
- * Constructs a KAccountTemplateSelectorDecl as a child of 'parent', with the
+ * Constructs a KAccountTemplateSelectorDecl as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
-KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "KAccountTemplateSelectorDecl" );
- KAccountTemplateSelectorDeclLayout = new QVBoxLayout( this, 0, 6, "KAccountTemplateSelectorDeclLayout");
+ KAccountTemplateSelectorDeclLayout = new TQVBoxLayout( this, 0, 6, "KAccountTemplateSelectorDeclLayout");
m_groupList = new KListView( this, "m_groupList" );
m_groupList->addColumn( kmm_i18n( "Account Types" ) );
m_groupList->addColumn( kmm_i18n( "Description" ) );
- m_groupList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) );
- m_groupList->setMinimumSize( QSize( 0, 150 ) );
+ m_groupList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) );
+ m_groupList->setMinimumSize( TQSize( 0, 150 ) );
m_groupList->setProperty( "selectionMode", "Extended" );
m_groupList->setAllColumnsShowFocus( TRUE );
m_groupList->setRootIsDecorated( TRUE );
m_groupList->setFullWidth( TRUE );
KAccountTemplateSelectorDeclLayout->addWidget( m_groupList );
- layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
+ tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3");
- groupBox1 = new QGroupBox( this, "groupBox1" );
- groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) );
+ groupBox1 = new TQGroupBox( this, "groupBox1" );
+ groupBox1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) );
groupBox1->setColumnLayout(0, Qt::Vertical );
- groupBox1->layout()->setSpacing( 6 );
- groupBox1->layout()->setMargin( 11 );
- groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
- groupBox1Layout->setAlignment( Qt::AlignTop );
+ groupBox1->tqlayout()->setSpacing( 6 );
+ groupBox1->tqlayout()->setMargin( 11 );
+ groupBox1Layout = new TQVBoxLayout( groupBox1->tqlayout() );
+ groupBox1Layout->tqsetAlignment( TQt::AlignTop );
m_description = new KTextEdit( groupBox1, "m_description" );
- m_description->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) );
+ m_description->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) );
m_description->setReadOnly( TRUE );
groupBox1Layout->addWidget( m_description );
- layout3->addWidget( groupBox1 );
+ tqlayout3->addWidget( groupBox1 );
- groupBox2 = new QGroupBox( this, "groupBox2" );
- groupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) );
+ groupBox2 = new TQGroupBox( this, "groupBox2" );
+ groupBox2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) );
groupBox2->setColumnLayout(0, Qt::Vertical );
- groupBox2->layout()->setSpacing( 6 );
- groupBox2->layout()->setMargin( 11 );
- groupBox2Layout = new QVBoxLayout( groupBox2->layout() );
- groupBox2Layout->setAlignment( Qt::AlignTop );
+ groupBox2->tqlayout()->setSpacing( 6 );
+ groupBox2->tqlayout()->setMargin( 11 );
+ groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() );
+ groupBox2Layout->tqsetAlignment( TQt::AlignTop );
m_accountList = new KListView( groupBox2, "m_accountList" );
m_accountList->addColumn( kmm_i18n( "Name" ) );
- m_accountList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) );
- m_accountList->setMinimumSize( QSize( 0, 150 ) );
+ m_accountList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) );
+ m_accountList->setMinimumSize( TQSize( 0, 150 ) );
m_accountList->setProperty( "selectionMode", "NoSelection" );
m_accountList->setAllColumnsShowFocus( TRUE );
m_accountList->setRootIsDecorated( TRUE );
m_accountList->setFullWidth( TRUE );
groupBox2Layout->addWidget( m_accountList );
- layout3->addWidget( groupBox2 );
- KAccountTemplateSelectorDeclLayout->addLayout( layout3 );
+ tqlayout3->addWidget( groupBox2 );
+ KAccountTemplateSelectorDeclLayout->addLayout( tqlayout3 );
languageChange();
- resize( QSize(546, 346).expandedTo(minimumSizeHint()) );
+ resize( TQSize(546, 346).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@@ -92,7 +92,7 @@ KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( QWidget* parent, con
*/
KAccountTemplateSelectorDecl::~KAccountTemplateSelectorDecl()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
diff --git a/kmymoney2/widgets/kaccounttemplateselectordecl.ui b/kmymoney2/widgets/kaccounttemplateselectordecl.ui
index 6ed4b6d..f4f2e55 100644
--- a/kmymoney2/widgets/kaccounttemplateselectordecl.ui
+++ b/kmymoney2/widgets/kaccounttemplateselectordecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KAccountTemplateSelectorDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KAccountTemplateSelectorDecl</cstring>
</property>
@@ -53,7 +53,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>150</height>
@@ -72,15 +72,15 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -117,7 +117,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -159,7 +159,7 @@
<verstretch>3</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>150</height>
@@ -184,5 +184,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
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) {
diff --git a/kmymoney2/widgets/kbudgetvalues.h b/kmymoney2/widgets/kbudgetvalues.h
index 5b8c2cc..e2e7a09 100644
--- a/kmymoney2/widgets/kbudgetvalues.h
+++ b/kmymoney2/widgets/kbudgetvalues.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdatetime.h>
-class QLabel;
+#include <tqdatetime.h>
+class TQLabel;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -40,8 +40,9 @@ class kMyMoneyEdit;
class KBudgetValues : public KBudgetValuesDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KBudgetValues(QWidget* parent = 0, const char* name = 0);
+ KBudgetValues(TQWidget* tqparent = 0, const char* name = 0);
~KBudgetValues();
void setBudgetValues(const MyMoneyBudget& budget, const MyMoneyBudget::AccountGroup& budgetAccount);
@@ -69,13 +70,13 @@ class KBudgetValues : public KBudgetValuesDecl
void slotUpdateClearButton(void);
protected:
- bool eventFilter(QObject* o, QEvent* e);
+ bool eventFilter(TQObject* o, TQEvent* e);
private:
kMyMoneyEdit* m_field[12];
- QLabel* m_label[12];
- QWidget* m_currentTab;
- QDate m_budgetDate;
+ TQLabel* m_label[12];
+ TQWidget* m_currentTab;
+ TQDate m_budgetDate;
signals:
void valuesChanged(void);
diff --git a/kmymoney2/widgets/kbudgetvaluesdecl.cpp b/kmymoney2/widgets/kbudgetvaluesdecl.cpp
index 43d71f5..ac2e9f7 100644
--- a/kmymoney2/widgets/kbudgetvaluesdecl.cpp
+++ b/kmymoney2/widgets/kbudgetvaluesdecl.cpp
@@ -2,8 +2,8 @@
#include <klocale.h>
#ifndef KMM_I18N
#define KMM_I18N
-inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
-inline QString kmm_i18n(const char* msg) { return i18n(msg); }
+inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
+inline TQString kmm_i18n(const char* msg) { return i18n(msg); }
#endif
/****************************************************************************
** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kbudgetvaluesdecl.ui'
@@ -15,190 +15,190 @@ inline QString kmm_i18n(const char* msg) { return i18n(msg); }
#include "kbudgetvaluesdecl.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kmymoney/kmymoneyedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqwidgetstack.h>
#include <kpushbutton.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*
- * Constructs a KBudgetValuesDecl as a child of 'parent', with the
+ * Constructs a KBudgetValuesDecl as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
-KBudgetValuesDecl::KBudgetValuesDecl( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+KBudgetValuesDecl::KBudgetValuesDecl( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "KBudgetValuesDecl" );
- KBudgetValuesDeclLayout = new QGridLayout( this, 1, 1, 0, 6, "KBudgetValuesDeclLayout");
+ KBudgetValuesDeclLayout = new TQGridLayout( this, 1, 1, 0, 6, "KBudgetValuesDeclLayout");
m_amount10 = new kMyMoneyEdit( this, "m_amount10" );
- m_amount10->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount10->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount10, 3, 5 );
m_amount6 = new kMyMoneyEdit( this, "m_amount6" );
- m_amount6->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount6->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount6, 5, 3 );
m_amount5 = new kMyMoneyEdit( this, "m_amount5" );
- m_amount5->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount5->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount5, 4, 3 );
- m_label6 = new QLabel( this, "m_label6" );
+ m_label6 = new TQLabel( this, "m_label6" );
KBudgetValuesDeclLayout->addWidget( m_label6, 5, 2 );
- m_label8 = new QLabel( this, "m_label8" );
+ m_label8 = new TQLabel( this, "m_label8" );
KBudgetValuesDeclLayout->addWidget( m_label8, 1, 4 );
m_amount9 = new kMyMoneyEdit( this, "m_amount9" );
- m_amount9->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount9->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount9, 2, 5 );
m_amount11 = new kMyMoneyEdit( this, "m_amount11" );
- m_amount11->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount11->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount11, 4, 5 );
- m_label12 = new QLabel( this, "m_label12" );
+ m_label12 = new TQLabel( this, "m_label12" );
KBudgetValuesDeclLayout->addWidget( m_label12, 5, 4 );
- m_label10 = new QLabel( this, "m_label10" );
+ m_label10 = new TQLabel( this, "m_label10" );
KBudgetValuesDeclLayout->addWidget( m_label10, 3, 4 );
- m_label7 = new QLabel( this, "m_label7" );
+ m_label7 = new TQLabel( this, "m_label7" );
KBudgetValuesDeclLayout->addWidget( m_label7, 0, 4 );
m_amount3 = new kMyMoneyEdit( this, "m_amount3" );
- m_amount3->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount3->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount3, 2, 3 );
- m_label4 = new QLabel( this, "m_label4" );
+ m_label4 = new TQLabel( this, "m_label4" );
KBudgetValuesDeclLayout->addWidget( m_label4, 3, 2 );
m_amount12 = new kMyMoneyEdit( this, "m_amount12" );
- m_amount12->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount12->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount12, 5, 5 );
- m_label3 = new QLabel( this, "m_label3" );
+ m_label3 = new TQLabel( this, "m_label3" );
KBudgetValuesDeclLayout->addWidget( m_label3, 2, 2 );
- m_label1 = new QLabel( this, "m_label1" );
+ m_label1 = new TQLabel( this, "m_label1" );
KBudgetValuesDeclLayout->addWidget( m_label1, 0, 2 );
- m_label2 = new QLabel( this, "m_label2" );
+ m_label2 = new TQLabel( this, "m_label2" );
KBudgetValuesDeclLayout->addWidget( m_label2, 1, 2 );
- m_label5 = new QLabel( this, "m_label5" );
+ m_label5 = new TQLabel( this, "m_label5" );
KBudgetValuesDeclLayout->addWidget( m_label5, 4, 2 );
- m_label11 = new QLabel( this, "m_label11" );
+ m_label11 = new TQLabel( this, "m_label11" );
KBudgetValuesDeclLayout->addWidget( m_label11, 4, 4 );
m_amount4 = new kMyMoneyEdit( this, "m_amount4" );
- m_amount4->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount4->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount4, 3, 3 );
- m_label9 = new QLabel( this, "m_label9" );
+ m_label9 = new TQLabel( this, "m_label9" );
KBudgetValuesDeclLayout->addWidget( m_label9, 2, 4 );
m_amount8 = new kMyMoneyEdit( this, "m_amount8" );
- m_amount8->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount8->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount8, 1, 5 );
m_amount2 = new kMyMoneyEdit( this, "m_amount2" );
- m_amount2->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount2->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount2, 1, 3 );
m_amount7 = new kMyMoneyEdit( this, "m_amount7" );
- m_amount7->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount7->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
KBudgetValuesDeclLayout->addWidget( m_amount7, 0, 5 );
- m_firstItemStack = new QWidgetStack( this, "m_firstItemStack" );
+ m_firstItemStack = new TQWidgetStack( this, "m_firstItemStack" );
- m_monthlyPage = new QWidget( m_firstItemStack, "m_monthlyPage" );
- m_monthlyPageLayout = new QHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout");
+ m_monthlyPage = new TQWidget( m_firstItemStack, "m_monthlyPage" );
+ m_monthlyPageLayout = new TQHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout");
m_amountMonthly = new kMyMoneyEdit( m_monthlyPage, "m_amountMonthly" );
- m_amountMonthly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amountMonthly->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
m_monthlyPageLayout->addWidget( m_amountMonthly );
m_firstItemStack->addWidget( m_monthlyPage, 0 );
- m_yearlyPage = new QWidget( m_firstItemStack, "m_yearlyPage" );
- m_yearlyPageLayout = new QHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout");
+ m_yearlyPage = new TQWidget( m_firstItemStack, "m_yearlyPage" );
+ m_yearlyPageLayout = new TQHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout");
m_amountYearly = new kMyMoneyEdit( m_yearlyPage, "m_amountYearly" );
- m_amountYearly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amountYearly->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
m_yearlyPageLayout->addWidget( m_amountYearly );
m_firstItemStack->addWidget( m_yearlyPage, 1 );
- m_individualPage = new QWidget( m_firstItemStack, "m_individualPage" );
- m_individualPageLayout = new QHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout");
+ m_individualPage = new TQWidget( m_firstItemStack, "m_individualPage" );
+ m_individualPageLayout = new TQHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout");
m_amount1 = new kMyMoneyEdit( m_individualPage, "m_amount1" );
- m_amount1->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) );
+ m_amount1->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) );
m_individualPageLayout->addWidget( m_amount1 );
m_firstItemStack->addWidget( m_individualPage, 2 );
KBudgetValuesDeclLayout->addWidget( m_firstItemStack, 0, 3 );
- layout12 = new QVBoxLayout( 0, 0, 6, "layout12");
+ tqlayout12 = new TQVBoxLayout( 0, 0, 6, "tqlayout12");
m_clearButton = new KPushButton( this, "m_clearButton" );
- layout12->addWidget( m_clearButton );
- spacer7 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding );
- layout12->addItem( spacer7 );
+ tqlayout12->addWidget( m_clearButton );
+ spacer7 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ tqlayout12->addItem( spacer7 );
- KBudgetValuesDeclLayout->addMultiCellLayout( layout12, 0, 5, 1, 1 );
+ KBudgetValuesDeclLayout->addMultiCellLayout( tqlayout12, 0, 5, 1, 1 );
- m_periodGroup = new QButtonGroup( this, "m_periodGroup" );
+ m_periodGroup = new TQButtonGroup( this, "m_periodGroup" );
m_periodGroup->setColumnLayout(0, Qt::Vertical );
- m_periodGroup->layout()->setSpacing( 6 );
- m_periodGroup->layout()->setMargin( 11 );
- m_periodGroupLayout = new QVBoxLayout( m_periodGroup->layout() );
- m_periodGroupLayout->setAlignment( Qt::AlignTop );
+ m_periodGroup->tqlayout()->setSpacing( 6 );
+ m_periodGroup->tqlayout()->setMargin( 11 );
+ m_periodGroupLayout = new TQVBoxLayout( m_periodGroup->tqlayout() );
+ m_periodGroupLayout->tqsetAlignment( TQt::AlignTop );
- m_monthlyButton = new QRadioButton( m_periodGroup, "m_monthlyButton" );
+ m_monthlyButton = new TQRadioButton( m_periodGroup, "m_monthlyButton" );
m_periodGroupLayout->addWidget( m_monthlyButton );
- m_yearlyButton = new QRadioButton( m_periodGroup, "m_yearlyButton" );
+ m_yearlyButton = new TQRadioButton( m_periodGroup, "m_yearlyButton" );
m_periodGroupLayout->addWidget( m_yearlyButton );
- m_individualButton = new QRadioButton( m_periodGroup, "m_individualButton" );
+ m_individualButton = new TQRadioButton( m_periodGroup, "m_individualButton" );
m_periodGroupLayout->addWidget( m_individualButton );
- spacer10 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer10 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
m_periodGroupLayout->addItem( spacer10 );
KBudgetValuesDeclLayout->addMultiCellWidget( m_periodGroup, 0, 5, 0, 0 );
languageChange();
- resize( QSize(553, 188).expandedTo(minimumSizeHint()) );
+ resize( TQSize(553, 188).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// tab order
@@ -226,7 +226,7 @@ KBudgetValuesDecl::KBudgetValuesDecl( QWidget* parent, const char* name, WFlags
*/
KBudgetValuesDecl::~KBudgetValuesDecl()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
@@ -247,7 +247,7 @@ void KBudgetValuesDecl::languageChange()
m_label5->setText( kmm_i18n( "xxx" ) );
m_label11->setText( kmm_i18n( "xxx" ) );
m_label9->setText( kmm_i18n( "xxx" ) );
- m_clearButton->setText( QString::null );
+ m_clearButton->setText( TQString() );
m_periodGroup->setTitle( kmm_i18n( "Period" ) );
m_monthlyButton->setText( kmm_i18n( "Monthly" ) );
m_yearlyButton->setText( kmm_i18n( "Yearly" ) );
diff --git a/kmymoney2/widgets/kbudgetvaluesdecl.ui b/kmymoney2/widgets/kbudgetvaluesdecl.ui
index 6870d64..bfc2d1d 100644
--- a/kmymoney2/widgets/kbudgetvaluesdecl.ui
+++ b/kmymoney2/widgets/kbudgetvaluesdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KBudgetValuesDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KBudgetValuesDecl</cstring>
</property>
@@ -43,7 +43,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="5" column="2">
+ <widget class="TQLabel" row="5" column="2">
<property name="name">
<cstring>m_label6</cstring>
</property>
@@ -51,7 +51,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="4">
+ <widget class="TQLabel" row="1" column="4">
<property name="name">
<cstring>m_label8</cstring>
</property>
@@ -75,7 +75,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="5" column="4">
+ <widget class="TQLabel" row="5" column="4">
<property name="name">
<cstring>m_label12</cstring>
</property>
@@ -83,7 +83,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="4">
+ <widget class="TQLabel" row="3" column="4">
<property name="name">
<cstring>m_label10</cstring>
</property>
@@ -91,7 +91,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="4">
+ <widget class="TQLabel" row="0" column="4">
<property name="name">
<cstring>m_label7</cstring>
</property>
@@ -107,7 +107,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="3" column="2">
+ <widget class="TQLabel" row="3" column="2">
<property name="name">
<cstring>m_label4</cstring>
</property>
@@ -123,7 +123,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>m_label3</cstring>
</property>
@@ -131,7 +131,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>m_label1</cstring>
</property>
@@ -139,7 +139,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>m_label2</cstring>
</property>
@@ -147,7 +147,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="2">
+ <widget class="TQLabel" row="4" column="2">
<property name="name">
<cstring>m_label5</cstring>
</property>
@@ -155,7 +155,7 @@
<string>xxx</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="4">
+ <widget class="TQLabel" row="4" column="4">
<property name="name">
<cstring>m_label11</cstring>
</property>
@@ -171,7 +171,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="4">
+ <widget class="TQLabel" row="2" column="4">
<property name="name">
<cstring>m_label9</cstring>
</property>
@@ -203,11 +203,11 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QWidgetStack" row="0" column="3">
+ <widget class="TQWidgetStack" row="0" column="3">
<property name="name">
<cstring>m_firstItemStack</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_monthlyPage</cstring>
</property>
@@ -231,7 +231,7 @@
</widget>
</hbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_yearlyPage</cstring>
</property>
@@ -255,7 +255,7 @@
</widget>
</hbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_individualPage</cstring>
</property>
@@ -280,9 +280,9 @@
</hbox>
</widget>
</widget>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="6" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="1" rowspan="6" colspan="1">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
@@ -306,7 +306,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -315,7 +315,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QButtonGroup" row="0" column="0" rowspan="6" colspan="1">
+ <widget class="TQButtonGroup" row="0" column="0" rowspan="6" colspan="1">
<property name="name">
<cstring>m_periodGroup</cstring>
</property>
@@ -326,7 +326,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_monthlyButton</cstring>
</property>
@@ -334,7 +334,7 @@
<string>Monthly</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_yearlyButton</cstring>
</property>
@@ -342,7 +342,7 @@
<string>Yearly</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_individualButton</cstring>
</property>
@@ -360,7 +360,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -396,5 +396,5 @@
<includes>
<include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kguiutils.cpp b/kmymoney2/widgets/kguiutils.cpp
index c6157f9..f0e1d91 100644
--- a/kmymoney2/widgets/kguiutils.cpp
+++ b/kmymoney2/widgets/kguiutils.cpp
@@ -17,16 +17,16 @@
// ----------------------------------------------------------------------------
// QT Includes
- // No need for QDateEdit, QSpinBox, etc., since these always return values
+ // No need for TQDateEdit, TQSpinBox, etc., since these always return values
-#include <qcheckbox.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqspinbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -40,46 +40,46 @@
/**************************************************************************
* *
* The MandatoryFieldGroup code is courtesy of *
- * Mark Summerfield in Qt Quarterly *
+ * Mark Summerfield in TQt Quarterly *
* http://doc.trolltech.com/qq/qq11-mandatoryfields.html *
* *
* Enhanced by Thomas Baumgart to support the lineedit field of a *
- * a QComboBox. *
+ * a TQComboBox. *
* *
**************************************************************************/
-void kMandatoryFieldGroup::add(QWidget *widget)
+void kMandatoryFieldGroup::add(TQWidget *widget)
{
- if (!widgets.contains(widget)) {
- if (widget->inherits("QCheckBox"))
- connect((QCheckBox*)widget->qt_cast("QCheckBox"),
- SIGNAL(clicked()),
- this, SLOT(changed()));
-
- else if (widget->inherits("QComboBox")) {
- QComboBox* combo = (QComboBox*)widget->qt_cast("QComboBox");
- QLineEdit* lineedit = combo->lineEdit();
+ if (!widgets.tqcontains(widget)) {
+ if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING))
+ connect((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING),
+ TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(changed()));
+
+ else if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
+ TQComboBox* combo = (TQComboBox*)widget->qt_cast(TQCOMBOBOX_OBJECT_NAME_STRING);
+ TQLineEdit* lineedit = combo->lineEdit();
if(lineedit) {
- connect(lineedit, SIGNAL(textChanged(const QString&)), this, SLOT(changed()));
+ connect(lineedit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed()));
} else {
- connect(combo, SIGNAL(highlighted(int)), this, SLOT(changed()));
+ connect(combo, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(changed()));
}
}
- else if (widget->inherits("QLineEdit"))
- connect((QLineEdit*)widget->qt_cast("QLineEdit"),
- SIGNAL(textChanged(const QString&)),
- this, SLOT(changed()));
+ else if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
+ connect((TQLineEdit*)widget->qt_cast(TQLINEEDIT_OBJECT_NAME_STRING),
+ TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(changed()));
- else if (widget->inherits("QSpinBox"))
- connect((QSpinBox*)widget->qt_cast("QSpinBox"),
- SIGNAL(valueChanged(const QString&)),
- this, SLOT(changed()));
+ else if (widget->inherits(TQSPINBOX_OBJECT_NAME_STRING))
+ connect((TQSpinBox*)widget->qt_cast(TQSPINBOX_OBJECT_NAME_STRING),
+ TQT_SIGNAL(valueChanged(const TQString&)),
+ this, TQT_SLOT(changed()));
- else if (widget->inherits("QListBox"))
- connect((QListBox*)widget->qt_cast("QListBox"),
- SIGNAL(selectionChanged()),
- this, SLOT(changed()));
+ else if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
+ connect((TQListBox*)widget->qt_cast(TQLISTBOX_OBJECT_NAME_STRING),
+ TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(changed()));
else {
qWarning("MandatoryFieldGroup: unsupported class %s",
@@ -94,15 +94,15 @@ void kMandatoryFieldGroup::add(QWidget *widget)
}
-void kMandatoryFieldGroup::remove(QWidget *widget)
+void kMandatoryFieldGroup::remove(TQWidget *widget)
{
- widget->setPaletteBackgroundColor(widget->colorGroup().background());
+ widget->setPaletteBackgroundColor(widget->tqcolorGroup().background());
widgets.remove(widget);
changed();
}
-void kMandatoryFieldGroup::setOkButton(QPushButton *button)
+void kMandatoryFieldGroup::setOkButton(TQPushButton *button)
{
if (okButton && okButton != button)
okButton->setEnabled(true);
@@ -114,36 +114,36 @@ void kMandatoryFieldGroup::setOkButton(QPushButton *button)
void kMandatoryFieldGroup::changed(void)
{
bool enable = true;
- QValueList<QWidget *>::ConstIterator i;
+ TQValueList<TQWidget *>::ConstIterator i;
for (i = widgets.begin(); i != widgets.end(); ++i) {
- QWidget *widget = *i;
+ TQWidget *widget = *i;
// disabled widgets don't count
if(!(widget->isEnabled())) {
continue;
}
- if (widget->inherits("QCheckBox")) {
- if (((QCheckBox*)widget->qt_cast("QCheckBox"))->state() == QButton::NoChange) {
+ if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) {
+ if (((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING))->state() == TQButton::NoChange) {
enable = false;
break;
} else
continue;
}
- if (widget->inherits("QComboBox")) {
- if (((QComboBox*)widget->qt_cast("QComboBox"))->currentText().isEmpty()) {
+ if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
+ if (((TQComboBox*)widget->qt_cast(TQCOMBOBOX_OBJECT_NAME_STRING))->currentText().isEmpty()) {
enable = false;
break;
} else
continue;
}
- if (widget->inherits("QLineEdit")) {
- if (((QLineEdit*)widget->qt_cast("QLineEdit"))->text().isEmpty()) {
+ if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) {
+ if (((TQLineEdit*)widget->qt_cast(TQLINEEDIT_OBJECT_NAME_STRING))->text().isEmpty()) {
enable = false;
break;
} else
continue;
}
- if (widget->inherits("QListBox")) {
- if (((QListBox*)widget->qt_cast("QListBox"))->selectedItem() == 0) {
+ if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING)) {
+ if (((TQListBox*)widget->qt_cast(TQLISTBOX_OBJECT_NAME_STRING))->selectedItem() == 0) {
enable = false;
break;
} else
@@ -162,9 +162,9 @@ void kMandatoryFieldGroup::changed(void)
void kMandatoryFieldGroup::clear(void)
{
- QValueList<QWidget *>::Iterator i;
+ TQValueList<TQWidget *>::Iterator i;
for (i = widgets.begin(); i != widgets.end(); ++i)
- (*i)->setPaletteBackgroundColor((*i)->colorGroup().background());
+ (*i)->setPaletteBackgroundColor((*i)->tqcolorGroup().background());
widgets.clear();
if (okButton) {
okButton->setEnabled(true);
diff --git a/kmymoney2/widgets/kguiutils.h b/kmymoney2/widgets/kguiutils.h
index 9a7b603..94cd756 100644
--- a/kmymoney2/widgets/kguiutils.h
+++ b/kmymoney2/widgets/kguiutils.h
@@ -21,9 +21,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qobject.h>
-#include <qvaluelist.h>
-class QWidget;
+#include <tqobject.h>
+#include <tqvaluelist.h>
+class TQWidget;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -37,27 +37,28 @@ class QWidget;
/**
* @author Tony Bloomfield
*/
-class kMandatoryFieldGroup : public QObject
+class kMandatoryFieldGroup : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMandatoryFieldGroup(QObject *parent) :
- QObject(parent), okButton(0), m_enabled(true) {}
+ kMandatoryFieldGroup(TQObject *tqparent) :
+ TQObject(tqparent), okButton(0), m_enabled(true) {}
/**
* This method adds a widget to the list of mandatory fields for the current dialog
*
* @param widget pointer to the widget to be added
*/
- void add(QWidget *widget);
+ void add(TQWidget *widget);
/**
* This method removes a widget form the list of mandatory fields for the current dialog
*
* @param widget pointer to the widget to be removed
*/
- void remove(QWidget *widget);
+ void remove(TQWidget *widget);
/**
* This method designates the button to be enabled when all mandatory fields
@@ -65,7 +66,7 @@ public:
*
* @param button pointer to the 'ok' button
*/
- void setOkButton(QPushButton *button);
+ void setOkButton(TQPushButton *button);
/**
* This method returns if all requirements for the mandatory group
@@ -86,8 +87,8 @@ signals:
void stateChanged(bool state);
private:
- QValueList<QWidget *> widgets;
- QPushButton* okButton;
+ TQValueList<TQWidget *> widgets;
+ TQPushButton* okButton;
bool m_enabled;
};
diff --git a/kmymoney2/widgets/klistviewsearchline.cpp b/kmymoney2/widgets/klistviewsearchline.cpp
index 5aba160..cd27928 100644
--- a/kmymoney2/widgets/klistviewsearchline.cpp
+++ b/kmymoney2/widgets/klistviewsearchline.cpp
@@ -25,11 +25,11 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004
@@ -47,47 +47,47 @@ public:
bool caseSensitive;
bool activeSearch;
bool keepParentsVisible;
- QString search;
+ TQString search;
int queuedSearches;
- QValueList<int> searchColumns;
+ TQValueList<int> searchColumns;
};
////////////////////////////////////////////////////////////////////////////////
// public methods
////////////////////////////////////////////////////////////////////////////////
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, KListView *listView, const char *name) :
- KLineEdit(parent, name)
+KListViewSearchLine::KListViewSearchLine(TQWidget *tqparent, KListView *listView, const char *name) :
+ KLineEdit(tqparent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = listView;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
if(listView) {
- connect(listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
#if KDE_IS_VERSION(3,3,0)
- connect(listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
#endif
}
else
setEnabled(false);
}
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, const char *name) :
- KLineEdit(parent, name)
+KListViewSearchLine::KListViewSearchLine(TQWidget *tqparent, const char *name) :
+ KLineEdit(tqparent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = 0;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
setEnabled(false);
}
@@ -102,7 +102,7 @@ bool KListViewSearchLine::caseSensitive() const
return d->caseSensitive;
}
-QValueList<int> KListViewSearchLine::searchColumns() const
+TQValueList<int> KListViewSearchLine::searchColumns() const
{
return d->searchColumns;
}
@@ -121,7 +121,7 @@ KListView *KListViewSearchLine::listView() const
// public slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::updateSearch(const QString &s)
+void KListViewSearchLine::updateSearch(const TQString &s)
{
if(!d->listView)
return;
@@ -131,7 +131,7 @@ void KListViewSearchLine::updateSearch(const QString &s)
// If there's a selected item that is visible, make sure that it's visible
// when the search changes too (assuming that it still matches).
- QListViewItem *currentItem = 0;
+ TQListViewItem *currentItem = 0;
switch(d->listView->selectionMode())
{
@@ -142,12 +142,12 @@ void KListViewSearchLine::updateSearch(const QString &s)
break;
default:
{
- int flags = QListViewItemIterator::Selected | QListViewItemIterator::Visible;
- for(QListViewItemIterator it(d->listView, flags);
+ int flags = TQListViewItemIterator::Selected | TQListViewItemIterator::Visible;
+ for(TQListViewItemIterator it(d->listView, flags);
it.current() && !currentItem;
++it)
{
- if(d->listView->itemRect(it.current()).isValid())
+ if(d->listView->tqitemRect(it.current()).isValid())
currentItem = it.current();
}
}
@@ -172,7 +172,7 @@ void KListViewSearchLine::setKeepParentsVisible(bool v)
d->keepParentsVisible = v;
}
-void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
+void KListViewSearchLine::setSearchColumns(const TQValueList<int> &columns)
{
d->searchColumns = columns;
}
@@ -180,24 +180,24 @@ void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
void KListViewSearchLine::setListView(KListView *lv)
{
if(d->listView) {
- disconnect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ disconnect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
#if KDE_IS_VERSION(3,3,0)
- disconnect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ disconnect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
#endif
}
d->listView = lv;
if(lv) {
- connect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
#if KDE_IS_VERSION(3,3,0)
- connect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
#endif
}
@@ -208,7 +208,7 @@ void KListViewSearchLine::setListView(KListView *lv)
// protected members
////////////////////////////////////////////////////////////////////////////////
-bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &s) const
+bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const
{
if(s.isEmpty())
return true;
@@ -217,17 +217,17 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
// specifified. If it is empty default to searching all of the columns.
if(!d->searchColumns.isEmpty()) {
- QValueList<int>::ConstIterator it = d->searchColumns.begin();
+ TQValueList<int>::ConstIterator it = d->searchColumns.begin();
for(; it != d->searchColumns.end(); ++it) {
if(*it < item->listView()->columns() &&
- item->text(*it).find(s, 0, d->caseSensitive) >= 0)
+ item->text(*it).tqfind(s, 0, d->caseSensitive) >= 0)
return true;
}
}
else {
for(int i = 0; i < item->listView()->columns(); i++) {
if(item->listView()->columnWidth(i) > 0 &&
- item->text(i).find(s, 0, d->caseSensitive) >= 0)
+ item->text(i).tqfind(s, 0, d->caseSensitive) >= 0)
{
return true;
}
@@ -237,13 +237,13 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
return false;
}
-QPopupMenu *KListViewSearchLine::createPopupMenu()
+TQPopupMenu *KListViewSearchLine::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
if (d->listView->columns()>1) {
- QPopupMenu *subMenu = new QPopupMenu(popup);
- connect(subMenu, SIGNAL(activated(int)), this, SLOT(searchColumnsMenuActivated(int)));
+ TQPopupMenu *subMenu = new TQPopupMenu(popup);
+ connect(subMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(searchColumnsMenuActivated(int)));
popup->insertSeparator();
popup->insertItem(i18n("Search Columns"), subMenu);
@@ -253,20 +253,20 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
bool allColumnsAreSearchColumns = true;
// TODO Make the entry order match the actual column order
- QHeader* const header = d->listView->header();
+ TQHeader* const header = d->listView->header();
int visibleColumns = 0;
for(int i = 0; i < d->listView->columns(); i++) {
if(d->listView->columnWidth(i)>0) {
- QString columnText = d->listView->columnText(i);
+ TQString columnText = d->listView->columnText(i);
if(columnText.isEmpty()) {
int visiblePosition=1;
for(int j = 0; j < header->mapToIndex(i); j++)
if(d->listView->columnWidth(header->mapToSection(j))>0)
visiblePosition++;
- columnText = i18n("Column number %1","Column No. %1").arg(visiblePosition);
+ columnText = i18n("Column number %1","Column No. %1").tqarg(visiblePosition);
}
subMenu->insertItem(columnText, visibleColumns);
- if(d->searchColumns.isEmpty() || d->searchColumns.find(i) != d->searchColumns.end())
+ if(d->searchColumns.isEmpty() || d->searchColumns.tqfind(i) != d->searchColumns.end())
subMenu->setItemChecked(visibleColumns, true);
else
allColumnsAreSearchColumns = false;
@@ -287,11 +287,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
// protected slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::queueSearch(const QString &search)
+void KListViewSearchLine::queueSearch(const TQString &search)
{
d->queuedSearches++;
d->search = search;
- QTimer::singleShot(200, this, SLOT(activateSearch()));
+ TQTimer::singleShot(200, this, TQT_SLOT(activateSearch()));
}
void KListViewSearchLine::activateSearch()
@@ -306,7 +306,7 @@ void KListViewSearchLine::activateSearch()
// private slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::itemAdded(QListViewItem *item) const
+void KListViewSearchLine::itemAdded(TQListViewItem *item) const
{
item->setVisible(itemMatches(item, text()));
}
@@ -326,7 +326,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id)
d->searchColumns.clear();
}
else {
- if(d->searchColumns.find(id) != d->searchColumns.end())
+ if(d->searchColumns.tqfind(id) != d->searchColumns.end())
d->searchColumns.remove(id);
else {
if(d->searchColumns.isEmpty()) {
@@ -348,10 +348,10 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id)
void KListViewSearchLine::checkItemParentsNotVisible()
{
- QListViewItemIterator it(d->listView);
+ TQListViewItemIterator it(d->listView);
for(; it.current(); ++it)
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if(itemMatches(item, d->search))
item->setVisible(true);
else
@@ -365,23 +365,23 @@ void KListViewSearchLine::checkItemParentsNotVisible()
*
* \p item The list view item to start showing / hiding items at. Typically, this is the first child of another item, or the
* the first child of the list view.
- * \p highestHiddenParent The highest (closest to root) ancestor of \p item which is hidden. If 0, all parents of
+ * \p highestHiddenParent The highest (closest to root) ancestor of \p item which is hidden. If 0, all tqparents of
* \p item must be visible.
* \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function
* returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown.
*/
-bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent)
+bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent)
{
bool visible = false;
- QListViewItem * first = item;
+ TQListViewItem * first = item;
for(; item; item = item->nextSibling())
{
- //What we pass to our children as highestHiddenParent:
- QListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
+ //What we pass to our tqchildren as highestHiddenParent:
+ TQListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
bool childMatch = false;
if(item->firstChild() && checkItemParentsVisible(item->firstChild(), hhp))
childMatch = true;
- // Should this item be shown? It should if any children should be, or if it matches.
+ // Should this item be shown? It should if any tqchildren should be, or if it matches.
if(childMatch || itemMatches(item, d->search))
{
visible = true;
@@ -390,13 +390,13 @@ bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListView
highestHiddenParent->setVisible(true);
// Calling setVisible on our ancestor will unhide all its descendents. Hide the ones
// before us that should not be shown.
- for(QListViewItem *hide = first; hide != item; hide = hide->nextSibling())
+ for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling())
hide->setVisible(false);
highestHiddenParent = 0;
- // If we matched, than none of our children matched, yet the setVisible() call on our
+ // If we matched, than none of our tqchildren matched, yet the setVisible() call on our
// ancestor unhid them, undo the damage:
if(!childMatch)
- for(QListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
+ for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
hide->setVisible(false);
}
else
@@ -418,20 +418,20 @@ public:
KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {}
KListView *listView;
KListViewSearchLine *searchLine;
- QToolButton *clearButton;
+ TQToolButton *clearButton;
};
KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView,
- QWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- QHBox(parent, name)
+ TQHBox(tqparent, name)
{
d = new KListViewSearchLineWidgetPrivate;
d->listView = listView;
setSpacing(5);
- QTimer::singleShot(0, this, SLOT(createWidgets()));
+ TQTimer::singleShot(0, this, TQT_SLOT(createWidgets()));
}
KListViewSearchLineWidget::~KListViewSearchLineWidget()
@@ -451,14 +451,14 @@ void KListViewSearchLineWidget::createWidgets()
positionInToolBar();
if(!d->clearButton) {
- d->clearButton = new QToolButton(this);
- QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
+ d->clearButton = new TQToolButton(this);
+ TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
d->clearButton->setIconSet(icon);
}
d->clearButton->show();
- QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget");
d->searchLine = createSearchLine(d->listView);
d->searchLine->show();
@@ -466,7 +466,7 @@ void KListViewSearchLineWidget::createWidgets()
label->setBuddy(d->searchLine);
label->show();
- connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
}
KListViewSearchLine *KListViewSearchLineWidget::searchLine() const
@@ -476,7 +476,7 @@ KListViewSearchLine *KListViewSearchLineWidget::searchLine() const
void KListViewSearchLineWidget::positionInToolBar()
{
- KToolBar *toolBar = dynamic_cast<KToolBar *>(parent());
+ KToolBar *toolBar = dynamic_cast<KToolBar *>(tqparent());
if(toolBar) {
@@ -491,7 +491,7 @@ void KListViewSearchLineWidget::positionInToolBar()
if(toolBar->getWidget(id) == this) {
toolBar->setItemAutoSized(id);
if(!d->clearButton) {
- QString icon = QApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
+ TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
d->clearButton = new KToolBarButton(icon, 2005, toolBar);
}
toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index);
diff --git a/kmymoney2/widgets/klistviewsearchline.h b/kmymoney2/widgets/klistviewsearchline.h
index 041687e..299f350 100644
--- a/kmymoney2/widgets/klistviewsearchline.h
+++ b/kmymoney2/widgets/klistviewsearchline.h
@@ -21,12 +21,12 @@
#define KLISTVIEWSEARCHLINE_H
#include <klineedit.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kmymoney/export.h>
class KListView;
-class QListViewItem;
-class QToolButton;
+class TQListViewItem;
+class TQToolButton;
/**
* This class makes it easy to add a search line for filtering the items in a
@@ -41,6 +41,7 @@ class QToolButton;
class KMYMONEY_EXPORT KListViewSearchLine : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -51,13 +52,13 @@ public:
* If \a listView is null then the widget will be disabled until a listview
* is set with setListView().
*/
- KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0);
+ KListViewSearchLine(TQWidget *tqparent = 0, KListView *listView = 0, const char *name = 0);
/**
* Constructs a KListViewSearchLine without any KListView to filter. The
* KListView object has to be set later with setListView().
*/
- KListViewSearchLine(QWidget *parent, const char *name);
+ KListViewSearchLine(TQWidget *tqparent, const char *name);
/**
* Destroys the KListViewSearchLine.
@@ -77,10 +78,10 @@ public:
*
* @see setSearchColumns
*/
- QValueList<int> searchColumns() const;
+ TQValueList<int> searchColumns() const;
/**
- * If this is true (the default) then the parents of matched items will also
+ * If this is true (the default) then the tqparents of matched items will also
* be shown.
*
* @see setKeepParentsVisible()
@@ -99,7 +100,7 @@ public slots:
* Updates search to only make visible the items that match \a s. If
* \a s is null then the line edit's text will be used.
*/
- virtual void updateSearch(const QString &s = QString::null);
+ virtual void updateSearch(const TQString &s = TQString());
/**
* Make the search case sensitive or case insensitive.
@@ -110,10 +111,10 @@ public slots:
/**
* When a search is active on a list that's organized into a tree view if
- * a parent or ancesestor of an item is does not match the search then it
- * will be hidden and as such so too will any children that match.
+ * a tqparent or ancesestor of an item is does not match the search then it
+ * will be hidden and as such so too will any tqchildren that match.
*
- * If this is set to true (the default) then the parents of matching items
+ * If this is set to true (the default) then the tqparents of matching items
* will be shown.
*
* @see keepParentsVisible
@@ -127,7 +128,7 @@ public slots:
*
* @see searchColumns
*/
- void setSearchColumns(const QValueList<int> &columns);
+ void setSearchColumns(const TQValueList<int> &columns);
/**
* Sets the KListView that is filtered by this search line. If \a lv is null
@@ -144,14 +145,14 @@ protected:
* based on the value of caseSensitive(). This can be overridden in
* subclasses to implement more complicated matching schemes.
*/
- virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
+ virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const;
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mousePressEvent().
+ * See TQLineEdit::mousePressEvent().
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
protected slots:
/**
@@ -167,7 +168,7 @@ protected slots:
*
* @see activateSearch()
*/
- void queueSearch(const QString &search);
+ void queueSearch(const TQString &search);
/**
* When the timer started with queueSearch() expires this slot is called.
@@ -182,20 +183,20 @@ protected slots:
private:
/**
- * This is used in case parent items of matching items shouldn't be
+ * This is used in case tqparent items of matching items shouldn't be
* visible. It hides all items that don't match the search string.
*/
void checkItemParentsNotVisible();
/**
- * This is used in case parent items of matching items should be visible.
- * It makes a recursive call to all children. It returns true if at least
+ * This is used in case tqparent items of matching items should be visible.
+ * It makes a recursive call to all tqchildren. It returns true if at least
* one item in the subtree with the given root item is visible.
*/
- bool checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent = 0);
+ bool checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent = 0);
private slots:
- void itemAdded(QListViewItem *item) const;
+ void itemAdded(TQListViewItem *item) const;
void listViewDeleted();
void searchColumnsMenuActivated(int);
@@ -210,16 +211,17 @@ private:
*
* @since 3.4
*/
-class KMYMONEY_EXPORT KListViewSearchLineWidget : public QHBox
+class KMYMONEY_EXPORT KListViewSearchLineWidget : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * Creates a KListViewSearchLineWidget for \a listView with \a parent as the
- * parent with and \a name.
+ * Creates a KListViewSearchLineWidget for \a listView with \a tqparent as the
+ * tqparent with and \a name.
*/
- KListViewSearchLineWidget(KListView *listView = 0, QWidget *parent = 0,
+ KListViewSearchLineWidget(KListView *listView = 0, TQWidget *tqparent = 0,
const char *name = 0);
/**
diff --git a/kmymoney2/widgets/kmymoney.widgets b/kmymoney2/widgets/kmymoney.widgets
index f844780..7df4bdb 100644
--- a/kmymoney2/widgets/kmymoney.widgets
+++ b/kmymoney2/widgets/kmymoney.widgets
@@ -1,8 +1,6 @@
-[Includes]
-kinstance.h
-
-[Init]
-new KInstance("kmmwidgets");
+[Global]
+Includes=kinstance.h
+Init=new KInstance("kmmwidgets");
[KMyMoneyTitleLabel]
diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
index 8a44786..67a416f 100644
--- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp
+++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
@@ -23,10 +23,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -38,25 +38,25 @@
#include <kmymoney/kmymoneyaccountcombo.h>
#include "kmymoneyaccountcompletion.h"
-KMyMoneyAccountCombo::KMyMoneyAccountCombo( QWidget* parent, const char* name ) :
- KComboBox( parent, name ),
+KMyMoneyAccountCombo::KMyMoneyAccountCombo( TQWidget* tqparent, const char* name ) :
+ KComboBox( tqparent, name ),
m_completion(0),
m_mlbDown(false)
{
#ifndef KMM_DESIGNER
m_completion = new kMyMoneyAccountCompletion(this);
- connect(this, SIGNAL(clicked()), this, SLOT(slotButtonPressed()));
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSelected(const QString&)));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonPressed()));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSelected(const TQString&)));
#endif
// make sure that we can display a minimum of characters
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
setMinimumWidth(fm.maxWidth()*15);
setMaximumHeight(height());
// we only use this one item and replace the text as we have our own dropdown box
- insertItem(QString(""));
+ insertItem(TQString(""));
}
KMyMoneyAccountCombo::~KMyMoneyAccountCombo()
@@ -68,7 +68,7 @@ void KMyMoneyAccountCombo::slotButtonPressed(void)
m_completion->show();
}
-void KMyMoneyAccountCombo::slotSelected(const QString& id)
+void KMyMoneyAccountCombo::slotSelected(const TQString& id)
{
try {
MyMoneyAccount acc = MyMoneyFile::instance()->account(id);
@@ -79,7 +79,7 @@ void KMyMoneyAccountCombo::slotSelected(const QString& id)
}
}
-void KMyMoneyAccountCombo::setSelected(const QString& id)
+void KMyMoneyAccountCombo::setSelected(const TQString& id)
{
if(!id.isEmpty()) {
try {
@@ -90,7 +90,7 @@ void KMyMoneyAccountCombo::setSelected(const QString& id)
delete e;
}
} else {
- setText(QString());
+ setText(TQString());
m_completion->setSelected(id);
}
}
@@ -101,12 +101,12 @@ void KMyMoneyAccountCombo::setSelected(const MyMoneyAccount& acc)
setText(acc.name());
}
-void KMyMoneyAccountCombo::setText(const QString& txt)
+void KMyMoneyAccountCombo::setText(const TQString& txt)
{
changeItem(txt, currentItem());
}
-int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QString>& accountIdList, const bool clear)
+int KMyMoneyAccountCombo::loadList(const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear)
{
AccountSet set;
@@ -116,7 +116,7 @@ int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QSt
int KMyMoneyAccountCombo::loadList(KMyMoneyUtils::categoryTypeE typeMask)
{
AccountSet set;
- QValueList<int> typeList;
+ TQValueList<int> typeList;
if(typeMask & KMyMoneyUtils::asset) {
set.addAccountGroup(MyMoneyAccount::Asset);
@@ -143,13 +143,13 @@ int KMyMoneyAccountCombo::loadList(MyMoneyAccount::accountTypeE type)
return set.load(m_completion->selector());
}
-void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k)
+void KMyMoneyAccountCombo::keyPressEvent(TQKeyEvent* k)
{
switch(k->key()) {
- case Qt::Key_Tab:
+ case TQt::Key_Tab:
break;
- case Qt::Key_Space:
+ case TQt::Key_Space:
emit clicked();
break;
@@ -159,22 +159,22 @@ void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k)
return;
}
-void KMyMoneyAccountCombo::mousePressEvent(QMouseEvent *e)
+void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e)
{
- if ( e->button() != LeftButton ) {
+ if ( e->button() != Qt::LeftButton ) {
e->ignore();
return;
}
- bool hit = rect().contains( e->pos() );
+ bool hit = TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() );
if ( hit ) { // mouse press on button
m_mlbDown = TRUE; // left mouse button down
emit pressed();
}
}
-void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e)
+void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e)
{
- if ( e->button() != LeftButton ) {
+ if ( e->button() != Qt::LeftButton ) {
e->ignore();
return;
}
@@ -182,7 +182,7 @@ void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e)
return;
m_mlbDown = FALSE; // left mouse button up
emit released();
- if ( rect().contains( e->pos() ) ) { // mouse release on button
+ if ( TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) { // mouse release on button
emit clicked();
}
}
@@ -192,25 +192,25 @@ int KMyMoneyAccountCombo::count(void) const
return m_completion->selector()->accountList().count();
}
-QStringList KMyMoneyAccountCombo::accountList(const QValueList<MyMoneyAccount::accountTypeE>& list) const
+TQStringList KMyMoneyAccountCombo::accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list) const
{
return m_completion->selector()->accountList(list);
};
-int KMyMoneyAccountCombo::loadList(const QValueList<int>& list)
+int KMyMoneyAccountCombo::loadList(const TQValueList<int>& list)
{
// FIXME make the caller construct the AccountSet directly
AccountSet set;
- QValueList<int>::const_iterator it;
+ TQValueList<int>::const_iterator it;
for(it = list.begin(); it != list.end(); ++it) {
set.addAccountType(static_cast<MyMoneyAccount::accountTypeE>(*it));
}
return set.load(m_completion->selector());
};
-QStringList KMyMoneyAccountCombo::selectedAccounts(void) const
+TQStringList KMyMoneyAccountCombo::selectedAccounts(void) const
{
- QStringList list;
+ TQStringList list;
m_completion->selector()->selectedItems(list);
return list;
};
diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.h b/kmymoney2/widgets/kmymoneyaccountcombo.h
index 770d5ad..623260d 100644
--- a/kmymoney2/widgets/kmymoneyaccountcombo.h
+++ b/kmymoney2/widgets/kmymoneyaccountcombo.h
@@ -44,8 +44,9 @@ class kMyMoneyAccountCompletion;
class KMyMoneyAccountCombo : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyAccountCombo( QWidget* parent = 0, const char* name = 0 );
+ KMyMoneyAccountCombo( TQWidget* tqparent = 0, const char* name = 0 );
~KMyMoneyAccountCombo();
/**
@@ -56,23 +57,23 @@ public:
/**
* This method loads the set of accounts into the widget
* as defined by the parameter @p accountIdList. @p accountIdList is
- * a QValueList of account ids.
+ * a TQValueList of account ids.
*
- * @param baseName QString which should be used as group text
- * @param accountIdList QValueList of QString account ids
+ * @param baseName TQString which should be used as group text
+ * @param accountIdList TQValueList of TQString account ids
* which should be loaded into the widget
* @param clear if true (default) clears the widget before populating
* @return This method returns the number of accounts loaded into the list
*/
- int loadList(const QString& baseName, const QValueList<QString>& accountIdList, const bool clear = true);
+ int loadList(const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear = true);
- QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const;
+ TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const;
int loadList(KMyMoneyUtils::categoryTypeE typeMask);
- int loadList(const QValueList<int>& list);
+ int loadList(const TQValueList<int>& list);
int loadList(MyMoneyAccount::accountTypeE type);
- void setSelected(const QString& id);
+ void setSelected(const TQString& id);
void setSelected(const MyMoneyAccount& acc);
/**
@@ -81,28 +82,28 @@ public:
*
* @return list of selected accounts
*/
- QStringList selectedAccounts(void) const;
+ TQStringList selectedAccounts(void) const;
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
public slots:
void slotButtonPressed(void);
- void slotSelected(const QString&);
+ void slotSelected(const TQString&);
protected slots:
signals:
- void accountSelected(const QString&);
+ void accountSelected(const TQString&);
void pressed();
void released();
void clicked();
protected:
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
- void setText(const QString& txt);
+ void setText(const TQString& txt);
private:
kMyMoneyAccountCompletion* m_completion;
diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp
index bb2af2e..6de78e5 100644
--- a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp
+++ b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp
@@ -23,8 +23,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -37,8 +37,8 @@
#include "kmymoneyaccountcompletion.h"
#include <kmymoney/mymoneyfile.h>
-kMyMoneyAccountCompletion::kMyMoneyAccountCompletion(QWidget *parent, const char *name ) :
- kMyMoneyCompletion(parent, name)
+kMyMoneyAccountCompletion::kMyMoneyAccountCompletion(TQWidget *tqparent, const char *name ) :
+ kMyMoneyCompletion(tqparent, name)
{
delete m_selector;
m_selector = new kMyMoneyAccountSelector(this, 0, 0, false);
@@ -62,32 +62,32 @@ kMyMoneyAccountCompletion::~kMyMoneyAccountCompletion()
{
}
-void kMyMoneyAccountCompletion::slotMakeCompletion(const QString& txt)
+void kMyMoneyAccountCompletion::slotMakeCompletion(const TQString& txt)
{
// if(txt.isEmpty() || txt.length() == 0)
// return;
int cnt = 0;
- if(txt.contains(MyMoneyFile::AccountSeperator) == 0) {
- m_lastCompletion = QRegExp(QRegExp::escape(txt.stripWhiteSpace()), false);
+ if(txt.tqcontains(MyMoneyFile::AccountSeperator) == 0) {
+ m_lastCompletion = TQRegExp(TQRegExp::escape(txt.stripWhiteSpace()), false);
cnt = selector()->slotMakeCompletion(m_lastCompletion);
} else {
- QStringList parts = QStringList::split(MyMoneyFile::AccountSeperator, txt);
- QString pattern("^");
- QStringList::iterator it;
+ TQStringList parts = TQStringList::split(MyMoneyFile::AccountSeperator, txt);
+ TQString pattern("^");
+ TQStringList::iterator it;
for(it = parts.begin(); it != parts.end(); ++it) {
if(pattern.length() > 1)
pattern += MyMoneyFile::AccountSeperator;
- pattern += QRegExp::escape(QString(*it).stripWhiteSpace()) + ".*";
+ pattern += TQRegExp::escape(TQString(*it).stripWhiteSpace()) + ".*";
}
pattern += "$";
- m_lastCompletion = QRegExp(pattern, false);
+ m_lastCompletion = TQRegExp(pattern, false);
cnt = selector()->slotMakeCompletion(m_lastCompletion);
// if we don't have a match, we try it again, but this time
// we add a wildcard for the top level
if(cnt == 0) {
- pattern = pattern.insert(1, QString(".*")+MyMoneyFile::AccountSeperator);
- m_lastCompletion = QRegExp(pattern, false);
+ pattern = pattern.insert(1, TQString(".*")+MyMoneyFile::AccountSeperator);
+ m_lastCompletion = TQRegExp(pattern, false);
cnt = selector()->slotMakeCompletion(m_lastCompletion);
}
}
diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.h b/kmymoney2/widgets/kmymoneyaccountcompletion.h
index 725a07c..4d309fd 100644
--- a/kmymoney2/widgets/kmymoneyaccountcompletion.h
+++ b/kmymoney2/widgets/kmymoneyaccountcompletion.h
@@ -26,8 +26,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-class QListViewItem;
+#include <tqwidget.h>
+class TQListViewItem;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -44,12 +44,13 @@ class QListViewItem;
class kMyMoneyAccountCompletion : public kMyMoneyCompletion
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyAccountCompletion(QWidget *parent=0, const char *name=0);
+ kMyMoneyAccountCompletion(TQWidget *tqparent=0, const char *name=0);
virtual ~kMyMoneyAccountCompletion();
- QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const { return selector()->accountList(list); }
+ TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const { return selector()->accountList(list); }
/**
* reimplemented from kMyMoneyCompletion
@@ -57,7 +58,7 @@ public:
kMyMoneyAccountSelector* selector(void) const { return dynamic_cast<kMyMoneyAccountSelector*>(m_selector); }
public slots:
- void slotMakeCompletion(const QString& txt);
+ void slotMakeCompletion(const TQString& txt);
};
#endif
diff --git a/kmymoney2/widgets/kmymoneyaccountselector.cpp b/kmymoney2/widgets/kmymoneyaccountselector.cpp
index f1596b4..762591f 100644
--- a/kmymoney2/widgets/kmymoneyaccountselector.cpp
+++ b/kmymoney2/widgets/kmymoneyaccountselector.cpp
@@ -23,13 +23,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qrect.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqrect.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -49,8 +49,8 @@
#include "../kmymoneyutils.h"
#include "../kmymoneyglobalsettings.h"
-kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *name, QWidget::WFlags flags, const bool createButtons) :
- KMyMoneySelector(parent, name, flags),
+kMyMoneyAccountSelector::kMyMoneyAccountSelector(TQWidget *tqparent, const char *name, TQWidget::WFlags flags, const bool createButtons) :
+ KMyMoneySelector(tqparent, name, flags),
m_allAccountsButton(0),
m_noAccountButton(0),
m_incomeCategoriesButton(0),
@@ -58,7 +58,7 @@ kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *na
{
if(createButtons) {
- QVBoxLayout* buttonLayout = new QVBoxLayout( 0, 0, 6, "accountSelectorButtonLayout");
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( 0, 0, 6, "accountSelectorButtonLayout");
m_allAccountsButton = new KPushButton( this, "m_allAccountsButton" );
m_allAccountsButton->setText( i18n( "All" ) );
@@ -76,14 +76,14 @@ kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *na
m_noAccountButton->setText( i18n( "None" ) );
buttonLayout->addWidget( m_noAccountButton );
- QSpacerItem* spacer = new QSpacerItem( 0, 67, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 67, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
buttonLayout->addItem( spacer );
m_layout->addLayout( buttonLayout );
- connect(m_allAccountsButton, SIGNAL(clicked()), this, SLOT(slotSelectAllAccounts()));
- connect(m_noAccountButton, SIGNAL(clicked()), this, SLOT(slotDeselectAllAccounts()));
- connect(m_incomeCategoriesButton, SIGNAL(clicked()), this, SLOT(slotSelectIncomeCategories()));
- connect(m_expenseCategoriesButton, SIGNAL(clicked()), this, SLOT(slotSelectExpenseCategories()));
+ connect(m_allAccountsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectAllAccounts()));
+ connect(m_noAccountButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeselectAllAccounts()));
+ connect(m_incomeCategoriesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectIncomeCategories()));
+ connect(m_expenseCategoriesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectExpenseCategories()));
}
// sort the list of accounts in ascending order
@@ -104,10 +104,10 @@ void kMyMoneyAccountSelector::removeButtons(void)
void kMyMoneyAccountSelector::selectCategories(const bool income, const bool expense)
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
- if(static_cast<QCheckListItem*>(it_v)->text() == i18n("Income categories"))
+ if(static_cast<TQCheckListItem*>(it_v)->text() == i18n("Income categories"))
selectAllSubItems(it_v, income);
else
selectAllSubItems(it_v, expense);
@@ -115,35 +115,35 @@ void kMyMoneyAccountSelector::selectCategories(const bool income, const bool exp
emit stateChanged();
}
-void kMyMoneyAccountSelector::setSelectionMode(QListView::SelectionMode mode)
+void kMyMoneyAccountSelector::setSelectionMode(TQListView::SelectionMode mode)
{
- m_incomeCategoriesButton->setHidden(mode == QListView::Multi);
- m_expenseCategoriesButton->setHidden(mode == QListView::Multi);
+ m_incomeCategoriesButton->setHidden(mode == TQListView::Multi);
+ m_expenseCategoriesButton->setHidden(mode == TQListView::Multi);
KMyMoneySelector::setSelectionMode(mode);
}
-QStringList kMyMoneyAccountSelector::accountList(const QValueList<MyMoneyAccount::accountTypeE>& filterList) const
+TQStringList kMyMoneyAccountSelector::accountList(const TQValueList<MyMoneyAccount::accountTypeE>& filterList) const
{
- QStringList list;
- QListViewItemIterator it;
- QListViewItem* it_v;
- QValueList<MyMoneyAccount::accountTypeE>::ConstIterator it_f;
+ TQStringList list;
+ TQListViewItemIterator it;
+ TQListViewItem* it_v;
+ TQValueList<MyMoneyAccount::accountTypeE>::ConstIterator it_f;
- it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable);
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable);
while((it_v = it.current()) != 0) {
{
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id());
- it_f = filterList.find(acc.accountType());
+ it_f = filterList.tqfind(acc.accountType());
if(filterList.count() == 0 || it_f != filterList.end())
list << it_c->id();
}
} else if(it_v->rtti() == 0) {
KMyMoneyListViewItem* it_c = dynamic_cast<KMyMoneyListViewItem*>(it_v);
MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id());
- it_f = filterList.find(acc.accountType());
+ it_f = filterList.tqfind(acc.accountType());
if(filterList.count() == 0 || it_f != filterList.end())
list << it_c->id();
}
@@ -153,7 +153,7 @@ QStringList kMyMoneyAccountSelector::accountList(const QValueList<MyMoneyAccoun
return list;
}
-bool kMyMoneyAccountSelector::match(const QRegExp& exp, QListViewItem* item) const
+bool kMyMoneyAccountSelector::match(const TQRegExp& exp, TQListViewItem* item) const
{
if(!item->isSelectable())
return false;
@@ -169,12 +169,12 @@ bool kMyMoneyAccountSelector::match(const QRegExp& exp, QListViewItem* item) con
return exp.search(it_l->key(1, true)) != -1;
}
-bool kMyMoneyAccountSelector::contains(const QString& txt) const
+bool kMyMoneyAccountSelector::tqcontains(const TQString& txt) const
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
+ TQListViewItem* it_v;
- QString baseName = i18n("Asset") + "|" +
+ TQString baseName = i18n("Asset") + "|" +
i18n("Liability") + "|" +
i18n("Income")+ "|" +
i18n("Expense")+ "|" +
@@ -182,7 +182,7 @@ bool kMyMoneyAccountSelector::contains(const QString& txt) const
i18n("Security");
while((it_v = it.current()) != 0) {
- QRegExp exp(QString("^(?:%1):%2$").arg(baseName).arg(QRegExp::escape(txt)));
+ TQRegExp exp(TQString("^(?:%1):%2$").tqarg(baseName).tqarg(TQRegExp::escape(txt)));
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
if(exp.search(it_c->key(1, true)) != -1) {
@@ -200,24 +200,24 @@ bool kMyMoneyAccountSelector::contains(const QString& txt) const
}
# if 0
-void kMyMoneyAccountSelector::update(const QString& /* id */)
+void kMyMoneyAccountSelector::update(const TQString& /* id */)
{
- QListViewItem* it_v = m_listView->currentItem();
- QString previousHighlighted;
+ TQListViewItem* it_v = m_listView->currentItem();
+ TQString previousHighlighted;
bool state = false;
- if(m_selMode == QListView::Multi && it_v) {
+ if(m_selMode == TQListView::Multi && it_v) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
previousHighlighted = it_c->id();
state = it_c->isOn();
}
}
}
- QStringList list = selectedAccounts();
- QStringList::Iterator it;
+ TQStringList list = selectedAccounts();
+ TQStringList::Iterator it;
if(!m_typeList.isEmpty())
loadList(m_typeList);
@@ -233,7 +233,7 @@ void kMyMoneyAccountSelector::update(const QString& /* id */)
setSelected(*it, true);
}
- if(m_selMode == QListView::Multi) {
+ if(m_selMode == TQListView::Multi) {
// make the previous highlighted item highlighted again
if(!previousHighlighted.isEmpty()) {
setSelected(previousHighlighted);
@@ -287,8 +287,8 @@ void AccountSet::addAccountType(MyMoneyAccount::accountTypeE type)
void AccountSet::removeAccountType(MyMoneyAccount::accountTypeE type)
{
- QValueList<MyMoneyAccount::accountTypeE>::iterator it;
- it = m_typeList.find(type);
+ TQValueList<MyMoneyAccount::accountTypeE>::iterator it;
+ it = m_typeList.tqfind(type);
if(it != m_typeList.end()) {
m_typeList.remove(it);
}
@@ -301,93 +301,93 @@ void AccountSet::clear(void)
int AccountSet::load(kMyMoneyAccountSelector* selector)
{
- QStringList list;
- QStringList::ConstIterator it_l;
+ TQStringList list;
+ TQStringList::ConstIterator it_l;
int count = 0;
int typeMask = 0;
- QString currentId;
+ TQString currentId;
- if(selector->selectionMode() == QListView::Single) {
- QStringList list;
+ if(selector->selectionMode() == TQListView::Single) {
+ TQStringList list;
selector->selectedItems(list);
if(list.count() > 0)
currentId = list.first();
}
- if((m_typeList.contains(MyMoneyAccount::Checkings)
- + m_typeList.contains(MyMoneyAccount::Savings)
- + m_typeList.contains(MyMoneyAccount::Cash)
- + m_typeList.contains(MyMoneyAccount::AssetLoan)
- + m_typeList.contains(MyMoneyAccount::CertificateDep)
- + m_typeList.contains(MyMoneyAccount::Investment)
- + m_typeList.contains(MyMoneyAccount::Stock)
- + m_typeList.contains(MyMoneyAccount::MoneyMarket)
- + m_typeList.contains(MyMoneyAccount::Asset)
- + m_typeList.contains(MyMoneyAccount::Currency)) > 0)
+ if((m_typeList.tqcontains(MyMoneyAccount::Checkings)
+ + m_typeList.tqcontains(MyMoneyAccount::Savings)
+ + m_typeList.tqcontains(MyMoneyAccount::Cash)
+ + m_typeList.tqcontains(MyMoneyAccount::AssetLoan)
+ + m_typeList.tqcontains(MyMoneyAccount::CertificateDep)
+ + m_typeList.tqcontains(MyMoneyAccount::Investment)
+ + m_typeList.tqcontains(MyMoneyAccount::Stock)
+ + m_typeList.tqcontains(MyMoneyAccount::MoneyMarket)
+ + m_typeList.tqcontains(MyMoneyAccount::Asset)
+ + m_typeList.tqcontains(MyMoneyAccount::Currency)) > 0)
typeMask |= KMyMoneyUtils::asset;
- if((m_typeList.contains(MyMoneyAccount::CreditCard)
- + m_typeList.contains(MyMoneyAccount::Loan)
- + m_typeList.contains(MyMoneyAccount::Liability)) > 0)
+ if((m_typeList.tqcontains(MyMoneyAccount::CreditCard)
+ + m_typeList.tqcontains(MyMoneyAccount::Loan)
+ + m_typeList.tqcontains(MyMoneyAccount::Liability)) > 0)
typeMask |= KMyMoneyUtils::liability;
- if((m_typeList.contains(MyMoneyAccount::Income)) > 0)
+ if((m_typeList.tqcontains(MyMoneyAccount::Income)) > 0)
typeMask |= KMyMoneyUtils::income;
- if((m_typeList.contains(MyMoneyAccount::Expense)) > 0)
+ if((m_typeList.tqcontains(MyMoneyAccount::Expense)) > 0)
typeMask |= KMyMoneyUtils::expense;
- if((m_typeList.contains(MyMoneyAccount::Equity)) > 0)
+ if((m_typeList.tqcontains(MyMoneyAccount::Equity)) > 0)
typeMask |= KMyMoneyUtils::equity;
selector->clear();
KListView* lv = selector->listView();
m_count = 0;
- QString key;
- QListViewItem* after = 0;
+ TQString key;
+ TQListViewItem* after = 0;
// create the favorite section first and sort it to the beginning
- key = QString("A%1").arg(i18n("Favorites"));
+ key = TQString("A%1").tqarg(i18n("Favorites"));
m_favorites = selector->newItem(i18n("Favorites"), key);
- for(int mask = 0x01; mask != KMyMoneyUtils::last; mask <<= 1) {
- QListViewItem* item = 0;
- if((typeMask & mask & KMyMoneyUtils::asset) != 0) {
+ for(int tqmask = 0x01; tqmask != KMyMoneyUtils::last; tqmask <<= 1) {
+ TQListViewItem* item = 0;
+ if((typeMask & tqmask & KMyMoneyUtils::asset) != 0) {
++m_count;
- key = QString("B%1").arg(i18n("Asset"));
+ key = TQString("B%1").tqarg(i18n("Asset"));
item = selector->newItem(i18n("Asset accounts"), key);
list = m_file->asset().accountList();
}
- if((typeMask & mask & KMyMoneyUtils::liability) != 0) {
+ if((typeMask & tqmask & KMyMoneyUtils::liability) != 0) {
++m_count;
- key = QString("C%1").arg(i18n("Liability"));
+ key = TQString("C%1").tqarg(i18n("Liability"));
item = selector->newItem(i18n("Liability accounts"), key);
list = m_file->liability().accountList();
}
- if((typeMask & mask & KMyMoneyUtils::income) != 0) {
+ if((typeMask & tqmask & KMyMoneyUtils::income) != 0) {
++m_count;
- key = QString("D%1").arg(i18n("Income"));
+ key = TQString("D%1").tqarg(i18n("Income"));
item = selector->newItem(i18n("Income categories"), key);
list = m_file->income().accountList();
- if(selector->selectionMode() == QListView::Multi) {
+ if(selector->selectionMode() == TQListView::Multi) {
selector->m_incomeCategoriesButton->show();
}
}
- if((typeMask & mask & KMyMoneyUtils::expense) != 0) {
+ if((typeMask & tqmask & KMyMoneyUtils::expense) != 0) {
++m_count;
- key = QString("E%1").arg(i18n("Expense"));
+ key = TQString("E%1").tqarg(i18n("Expense"));
item = selector->newItem(i18n("Expense categories"), key);
list = m_file->expense().accountList();
- if(selector->selectionMode() == QListView::Multi) {
+ if(selector->selectionMode() == TQListView::Multi) {
selector->m_expenseCategoriesButton->show();
}
}
- if((typeMask & mask & KMyMoneyUtils::equity) != 0) {
+ if((typeMask & tqmask & KMyMoneyUtils::equity) != 0) {
++m_count;
- key = QString("F%1").arg(i18n("Equity"));
+ key = TQString("F%1").tqarg(i18n("Equity"));
item = selector->newItem(i18n("Equity accounts"), key);
list = m_file->equity().accountList();
}
@@ -405,11 +405,11 @@ int AccountSet::load(kMyMoneyAccountSelector* selector)
//if it is still open or it has been set to show closed accounts
if(includeAccount(acc)
&& (!isHidingClosedAccounts() || !acc.isClosed()) ) {
- QString tmpKey;
+ TQString tmpKey;
tmpKey = key + MyMoneyFile::AccountSeperator + acc.name();
- QListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id());
+ TQListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id());
if(acc.value("PreferredAccount") == "Yes"
- && m_typeList.contains(acc.accountType())) {
+ && m_typeList.tqcontains(acc.accountType())) {
selector->newItem(m_favorites, acc.name(), tmpKey, acc.id());
}
if(acc.accountList().count() > 0) {
@@ -418,7 +418,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector)
}
//disable the item if it has been added only because a subaccount matches the type
- if( !m_typeList.contains(acc.accountType()) ) {
+ if( !m_typeList.tqcontains(acc.accountType()) ) {
subItem->setEnabled(false);
}
}
@@ -429,7 +429,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector)
// if we don't have a favorite account or the selector is for multi-mode
// we get rid of the favorite entry and subentries.
- if(m_favorites->childCount() == 0 || selector->selectionMode() == QListView::Multi) {
+ if(m_favorites->childCount() == 0 || selector->selectionMode() == TQListView::Multi) {
delete m_favorites;
m_favorites = 0;
}
@@ -449,10 +449,10 @@ int AccountSet::load(kMyMoneyAccountSelector* selector)
return count;
}
-int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName, const QValueList<QString>& accountIdList, const bool clear)
+int AccountSet::load(kMyMoneyAccountSelector* selector, const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear)
{
int count = 0;
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
m_typeList.clear();
if(clear) {
@@ -463,14 +463,14 @@ int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName,
item = selector->newItem(baseName);
++m_count;
- QValueList<QString>::ConstIterator it;
+ TQValueList<TQString>::ConstIterator it;
for(it = accountIdList.begin(); it != accountIdList.end(); ++it) {
const MyMoneyAccount& acc = m_file->account(*it);
if(acc.isClosed())
continue;
- QString tmpKey;
+ TQString tmpKey;
// the first character must be preset. Since we don't know any sort order here, we just use A
- tmpKey = QString("A%1%2%3").arg(baseName, MyMoneyFile::AccountSeperator, acc.name());
+ tmpKey = TQString("A%1%2%3").tqarg(baseName, MyMoneyFile::AccountSeperator, acc.name());
selector->newItem(item, acc.name(), tmpKey, acc.id());
++m_count;
++count;
@@ -486,9 +486,9 @@ int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName,
return count;
}
-int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem* parent, const QString& key, const QStringList& list)
+int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewItem* tqparent, const TQString& key, const TQStringList& list)
{
- QStringList::ConstIterator it_l;
+ TQStringList::ConstIterator it_l;
int count = 0;
for(it_l = list.begin(); it_l != list.end(); ++it_l) {
@@ -499,13 +499,13 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem
if(includeAccount(acc)
&& !acc.isClosed()) {
- QString tmpKey;
+ TQString tmpKey;
tmpKey = key + MyMoneyFile::AccountSeperator + acc.name();
++count;
++m_count;
- QListViewItem* item = selector->newItem(parent, acc.name(), tmpKey, acc.id());
+ TQListViewItem* item = selector->newItem(tqparent, acc.name(), tmpKey, acc.id());
if(acc.value("PreferredAccount") == "Yes"
- && m_typeList.contains(acc.accountType())) {
+ && m_typeList.tqcontains(acc.accountType())) {
selector->newItem(m_favorites, acc.name(), tmpKey, acc.id());
}
if(acc.accountList().count() > 0) {
@@ -514,7 +514,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem
}
//disable the item if it has been added only because a subaccount matches the type
- if( !m_typeList.contains(acc.accountType()) ) {
+ if( !m_typeList.tqcontains(acc.accountType()) ) {
item->setEnabled(false);
}
}
@@ -524,13 +524,13 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem
bool AccountSet::includeAccount(const MyMoneyAccount& acc)
{
- if( m_typeList.contains(acc.accountType()) )
+ if( m_typeList.tqcontains(acc.accountType()) )
return true;
- QStringList accounts = acc.accountList();
+ TQStringList accounts = acc.accountList();
if(accounts.size() > 0) {
- QStringList::ConstIterator it_acc;
+ TQStringList::ConstIterator it_acc;
for(it_acc = accounts.begin(); it_acc != accounts.end(); ++it_acc) {
MyMoneyAccount account = m_file->account(*it_acc);
if( includeAccount(account) )
diff --git a/kmymoney2/widgets/kmymoneyaccountselector.h b/kmymoney2/widgets/kmymoneyaccountselector.h
index 2fc0635..632cdc5 100644
--- a/kmymoney2/widgets/kmymoneyaccountselector.h
+++ b/kmymoney2/widgets/kmymoneyaccountselector.h
@@ -56,10 +56,11 @@ class MyMoneyFile;
class kMyMoneyAccountSelector : public KMyMoneySelector
{
Q_OBJECT
+ TQ_OBJECT
public:
friend class AccountSet;
- kMyMoneyAccountSelector(QWidget *parent=0, const char *name=0, QWidget::WFlags flags = 0, const bool createButtons = true);
+ kMyMoneyAccountSelector(TQWidget *tqparent=0, const char *name=0, TQWidget::WFlags flags = 0, const bool createButtons = true);
virtual ~kMyMoneyAccountSelector();
/**
@@ -68,35 +69,35 @@ public:
* a list of specific account types only. In this case, pass
* a list of account types as parameter @p list.
*
- * @param list QValueList of account types to be returned. If this
+ * @param list TQValueList of account types to be returned. If this
* list is empty (the default), then the ids of all accounts
* will be returned.
- * @return QStringList of account ids
+ * @return TQStringList of account ids
*/
- QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const;
+ TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const;
- void setSelectionMode(QListView::SelectionMode mode);
+ void setSelectionMode(TQListView::SelectionMode mode);
/**
* This method checks if a given @a item matches the given regular expression @a exp.
*
* @param exp const reference to a regular expression object
- * @param item pointer to QListViewItem
+ * @param item pointer to TQListViewItem
*
* @retval true item matches
* @retval false item does not match
*/
- virtual bool match(const QRegExp& exp, QListViewItem* item) const;
+ virtual bool match(const TQRegExp& exp, TQListViewItem* item) const;
/**
- * This method returns, if any of the items in the selector contains
+ * This method returns, if any of the items in the selector tqcontains
* the text @a txt.
*
* @param txt const reference to string to be looked for
* @retval true exact match found
* @retval false no match found
*/
- virtual bool contains(const QString& txt) const;
+ virtual bool tqcontains(const TQString& txt) const;
/**
* This method removes all the buttons of the widget
@@ -119,13 +120,13 @@ public slots:
protected:
/**
* This method loads the list of subaccounts as found in the
- * @p list and attaches them to the parent widget passed as @p parent.
+ * @p list and attaches them to the tqparent widget passed as @p tqparent.
*
- * @param parent pointer to parent widget
- * @param list QStringList containing the ids of all subaccounts to load
+ * @param tqparent pointer to tqparent widget
+ * @param list TQStringList containing the ids of all subaccounts to load
* @return This method returns the number of accounts loaded into the list
*/
- int loadSubAccounts(QListViewItem* parent, const QStringList& list);
+ int loadSubAccounts(TQListViewItem* tqparent, const TQStringList& list);
/**
* This is a helper method for selectAllIncomeCategories()
@@ -149,8 +150,8 @@ protected:
KPushButton* m_noAccountButton;
KPushButton* m_incomeCategoriesButton;
KPushButton* m_expenseCategoriesButton;
- QValueList<int> m_typeList;
- QStringList m_accountList;
+ TQValueList<int> m_typeList;
+ TQStringList m_accountList;
};
@@ -166,7 +167,7 @@ public:
void clear(void);
int load(kMyMoneyAccountSelector* selector);
- int load(kMyMoneyAccountSelector* selector, const QString& baseName, const QValueList<QString>& accountIdList, const bool clear = false);
+ int load(kMyMoneyAccountSelector* selector, const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear = false);
int count(void) const { return m_count; }
@@ -174,14 +175,14 @@ public:
bool isHidingClosedAccounts (void) { return m_hideClosedAccounts; }
protected:
- int loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem* parent, const QString& key, const QStringList& list);
+ int loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewItem* tqparent, const TQString& key, const TQStringList& list);
bool includeAccount(const MyMoneyAccount& acc);
private:
int m_count;
MyMoneyFile* m_file;
- QValueList<MyMoneyAccount::accountTypeE> m_typeList;
- QListViewItem* m_favorites;
+ TQValueList<MyMoneyAccount::accountTypeE> m_typeList;
+ TQListViewItem* m_favorites;
bool m_hideClosedAccounts;
};
#endif
diff --git a/kmymoney2/widgets/kmymoneyaccounttree.cpp b/kmymoney2/widgets/kmymoneyaccounttree.cpp
index 1b669ef..f74a8f8 100644
--- a/kmymoney2/widgets/kmymoneyaccounttree.cpp
+++ b/kmymoney2/widgets/kmymoneyaccounttree.cpp
@@ -18,15 +18,15 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpoint.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qcursor.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
+#include <tqpoint.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,38 +46,38 @@
#include <kmymoney/kmymoneyutils.h>
-KMyMoneyAccountTree::KMyMoneyAccountTree(QWidget* parent, const char *name) :
- KMyMoneyAccountTreeBase(parent,name)
+KMyMoneyAccountTree::KMyMoneyAccountTree(TQWidget* tqparent, const char *name) :
+ KMyMoneyAccountTreeBase(tqparent,name)
{
showType();
m_taxReportColumn = addColumn(i18n("Column heading for category in tax report", "Tax"));
- setColumnWidthMode(m_taxReportColumn, QListView::Manual);
- setColumnAlignment(m_taxReportColumn, Qt::AlignHCenter);
+ setColumnWidthMode(m_taxReportColumn, TQListView::Manual);
+ setColumnAlignment(m_taxReportColumn, TQt::AlignHCenter);
m_vatCategoryColumn = addColumn(i18n("Column heading for VAT category", "VAT"));
- setColumnWidthMode(m_vatCategoryColumn, QListView::Manual);
- setColumnAlignment(m_vatCategoryColumn, Qt::AlignHCenter);
+ setColumnWidthMode(m_vatCategoryColumn, TQListView::Manual);
+ setColumnAlignment(m_vatCategoryColumn, TQt::AlignHCenter);
showValue();
}
-KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security , const QString& name) :
- KMyMoneyAccountTreeBaseItem(parent,account,security,name),
+KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security , const TQString& name) :
+ KMyMoneyAccountTreeBaseItem(tqparent,account,security,name),
m_reconcileFlag(false)
{
updateAccount();
}
-KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
- KMyMoneyAccountTreeBaseItem(parent,account,price,security),
+KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
+ KMyMoneyAccountTreeBaseItem(tqparent,account,price,security),
m_reconcileFlag(false)
{
updateAccount();
}
-KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyInstitution& institution) :
- KMyMoneyAccountTreeBaseItem(parent,institution),
+KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyInstitution& institution) :
+ KMyMoneyAccountTreeBaseItem(tqparent,institution),
m_reconcileFlag(false)
{
}
@@ -88,7 +88,7 @@ void KMyMoneyAccountTreeItem::fillColumns()
if (!lv)
return;
KMyMoneyAccountTreeBaseItem::fillColumns();
- QPixmap checkMark = QPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small));
+ TQPixmap checkMark = TQPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small));
MyMoneyMoney vatRate;
if (!isInstitution())
setPixmap(lv->nameColumn(), m_account.accountPixmap(m_reconcileFlag, 22));
@@ -104,7 +104,7 @@ void KMyMoneyAccountTreeItem::fillColumns()
}
if(!m_account.value("VatRate").isEmpty()) {
vatRate = MyMoneyMoney(m_account.value("VatRate")) * MyMoneyMoney(100,1);
- setText(lv->vatCategoryColumn(), QString("%1 %").arg(vatRate.formatMoney("", 1)));
+ setText(lv->vatCategoryColumn(), TQString("%1 %").tqarg(vatRate.formatMoney("", 1)));
}
break;
default:
diff --git a/kmymoney2/widgets/kmymoneyaccounttree.h b/kmymoney2/widgets/kmymoneyaccounttree.h
index a4b741d..0b2d1ac 100644
--- a/kmymoney2/widgets/kmymoneyaccounttree.h
+++ b/kmymoney2/widgets/kmymoneyaccounttree.h
@@ -26,8 +26,9 @@ class KMyMoneyAccountTreeItem;
class KMyMoneyAccountTree : public KMyMoneyAccountTreeBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyAccountTree(QWidget* parent = 0, const char *name = 0);
+ KMyMoneyAccountTree(TQWidget* tqparent = 0, const char *name = 0);
int taxReportColumn(void) const { return m_taxReportColumn; }
int vatCategoryColumn(void) const { return m_vatCategoryColumn; }
private:
@@ -42,18 +43,18 @@ public:
* Constructor to be used to construct an institution entry
* object.
*
- * @param parent pointer to the KListView object this entry should be
+ * @param tqparent pointer to the KListView object this entry should be
* added to.
* @param institution const reference to MyMoneyInstitution for which
* the KListView entry is constructed
*/
- KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyInstitution& institution);
+ KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyInstitution& institution);
/**
* Constructor to be used to construct a standard account entry object (e.g. Asset,
* Liability, etc.).
*
- * @param parent pointer to the KListView object this entry should be
+ * @param tqparent pointer to the KListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -62,13 +63,13 @@ public:
* @param name name of the account to be used instead of the one stored with @p account
* If empty, the one stored with @p account will be used. Default: empty
*/
- KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString());
+ KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString());
/**
* Constructor to be used to construct an account entry
* object.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -77,7 +78,7 @@ public:
* @param security const reference to the security used to show the value. Usually
* one should pass MyMoneyFile::baseCurrency() here.
*/
- KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
+ KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
void setReconciliation(bool);
diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp
index da35ea1..b64b17c 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp
+++ b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp
@@ -18,15 +18,15 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpoint.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qcursor.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
+#include <tqpoint.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,8 +46,8 @@
#include <kmymoney/kmymoneyutils.h>
-KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* name) :
- KListView(parent, name),
+KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(TQWidget* tqparent, const char* name) :
+ KListView(tqparent, name),
m_accountConnections(false),
m_institutionConnections(false),
m_queuedSort(0)
@@ -56,7 +56,7 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na
setAllColumnsShowFocus(true);
m_nameColumn = addColumn(i18n("Account"));
- setColumnWidthMode(m_nameColumn, QListView::Manual);
+ setColumnWidthMode(m_nameColumn, TQListView::Manual);
m_typeColumn = -1;
m_balanceColumn = -1;
@@ -64,7 +64,7 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na
setMultiSelection(false);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
setShowSortIndicator(true);
setSorting(0);
@@ -80,14 +80,14 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na
m_baseCurrency.setSmallestAccountFraction(100);
m_baseCurrency.setSmallestCashFraction(100);
- connect(this, SIGNAL(dropped(QDropEvent*,QListViewItem*,QListViewItem*)), this, SLOT(slotObjectDropped(QDropEvent*,QListViewItem*,QListViewItem*)));
- connect(this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectObject(QListViewItem*)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)), this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(this, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), this, SLOT(slotOpenObject(QListViewItem*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*,TQListViewItem*)), this, TQT_SLOT(slotObjectDropped(TQDropEvent*,TQListViewItem*,TQListViewItem*)));
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectObject(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)), this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(slotOpenObject(TQListViewItem*)));
// drag and drop timer connections
- connect( &m_autoopenTimer, SIGNAL( timeout() ), this, SLOT( slotOpenFolder() ) );
- connect( &m_autoscrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ) );
+ connect( &m_autoopenTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotOpenFolder() ) );
+ connect( &m_autoscrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() ) );
}
@@ -97,7 +97,7 @@ KMyMoneyAccountTreeBase::~KMyMoneyAccountTreeBase()
saveLayout(KGlobal::config(), m_configGroup);
}
-void KMyMoneyAccountTreeBase::restoreLayout(const QString& group)
+void KMyMoneyAccountTreeBase::restoreLayout(const TQString& group)
{
if (!m_configGroup.isEmpty())
return; // already done
@@ -111,26 +111,26 @@ void KMyMoneyAccountTreeBase::restoreLayout(const QString& group)
void KMyMoneyAccountTreeBase::showType(void)
{
m_typeColumn = addColumn(i18n("Type"));
- setColumnWidthMode(m_typeColumn, QListView::Manual);
- setColumnAlignment(m_typeColumn, Qt::AlignLeft);
+ setColumnWidthMode(m_typeColumn, TQListView::Manual);
+ setColumnAlignment(m_typeColumn, TQt::AlignLeft);
}
void KMyMoneyAccountTreeBase::showValue(void)
{
m_balanceColumn = addColumn(i18n("Total Balance"));
- setColumnWidthMode(m_balanceColumn, QListView::Manual);
- setColumnAlignment(m_balanceColumn, Qt::AlignRight);
+ setColumnWidthMode(m_balanceColumn, TQListView::Manual);
+ setColumnAlignment(m_balanceColumn, TQt::AlignRight);
m_valueColumn = addColumn(i18n("Total Value"));
- setColumnWidthMode(m_valueColumn, QListView::Manual);
- setColumnAlignment(m_valueColumn, Qt::AlignRight);
+ setColumnWidthMode(m_valueColumn, TQListView::Manual);
+ setColumnAlignment(m_valueColumn, TQt::AlignRight);
}
void KMyMoneyAccountTreeBase::connectNotify(const char * /* s */)
{
// update drag and drop settings
- m_accountConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0);
- m_institutionConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0);
+ m_accountConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0);
+ m_institutionConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0);
setDragEnabled(m_accountConnections | m_institutionConnections);
setAcceptDrops(m_accountConnections | m_institutionConnections);
}
@@ -138,13 +138,13 @@ void KMyMoneyAccountTreeBase::connectNotify(const char * /* s */)
void KMyMoneyAccountTreeBase::disconnectNotify(const char * /* s */)
{
// update drag and drop settings
- m_accountConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0);
- m_institutionConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0);
+ m_accountConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0);
+ m_institutionConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0);
setDragEnabled(m_accountConnections | m_institutionConnections);
setAcceptDrops(m_accountConnections | m_institutionConnections);
}
-void KMyMoneyAccountTreeBase::setSectionHeader(const QString& txt)
+void KMyMoneyAccountTreeBase::setSectionHeader(const TQString& txt)
{
header()->setLabel(nameColumn(), txt);
}
@@ -154,12 +154,12 @@ KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::selectedItem(void) const
return dynamic_cast<KMyMoneyAccountTreeBaseItem *>(KListView::selectedItem());
}
-const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const QString& id) const
+const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const TQString& id) const
{
- // tried to use a QListViewItemIterator but that does not fit
+ // tried to use a TQListViewItemIterator but that does not fit
// with the constness of this method. Arghhh.
- QListViewItem* p = firstChild();
+ TQListViewItem* p = firstChild();
while(p) {
// item found, check for the id
KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(p);
@@ -167,10 +167,10 @@ const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const QStri
break;
// item did not match, search the next one
- QListViewItem* next = p->firstChild();
+ TQListViewItem* next = p->firstChild();
if(!next) {
while((next = p->nextSibling()) == 0) {
- p = p->parent();
+ p = p->tqparent();
if(!p)
break;
}
@@ -186,9 +186,9 @@ bool KMyMoneyAccountTreeBase::dropAccountOnAccount(const MyMoneyAccount& accFrom
bool rc = false;
// it does not make sense to reparent an account to oneself
- // or to reparent it to it's current parent
+ // or to reparent it to it's current tqparent
if(accTo.id() != accFrom.id()
- && accFrom.parentAccountId() != accTo.id()) {
+ && accFrom.tqparentAccountId() != accTo.id()) {
// Moving within a group is generally ok
rc = accTo.accountGroup() == accFrom.accountGroup();
@@ -231,14 +231,14 @@ bool KMyMoneyAccountTreeBase::dropAccountOnAccount(const MyMoneyAccount& accFrom
return rc;
}
-bool KMyMoneyAccountTreeBase::acceptDrag(QDropEvent* event) const
+bool KMyMoneyAccountTreeBase::acceptDrag(TQDropEvent* event) const
{
bool rc;
if((rc = (acceptDrops()) && (event->source() == viewport()))) {
rc = false;
KMyMoneyAccountTreeBaseItem* to = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(itemAt( contentsToViewport(event->pos()) ));
- QString fromId(event->encodedData("text/plain"));
+ TQString fromId(event->tqencodedData("text/plain"));
const KMyMoneyAccountTreeBaseItem* from = findItem(fromId);
// we can only move accounts around
@@ -265,19 +265,19 @@ bool KMyMoneyAccountTreeBase::acceptDrag(QDropEvent* event) const
void KMyMoneyAccountTreeBase::startDrag(void)
{
- QListViewItem* item = currentItem();
+ TQListViewItem* item = currentItem();
KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem *>(item);
if(!p)
return;
if(p->isAccount()) {
- QTextDrag* drag = new QTextDrag(p->id(), viewport());
+ TQTextDrag* drag = new TQTextDrag(p->id(), viewport());
drag->setSubtype("plain");
// use the icon that is attached to the item to be dragged
if (p->pixmap(0)) {
- QPixmap pixmap(*p->pixmap(0));
- QPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 );
+ TQPixmap pixmap(*p->pixmap(0));
+ TQPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 );
drag->setPixmap(pixmap, hotspot);
}
@@ -287,7 +287,7 @@ void KMyMoneyAccountTreeBase::startDrag(void)
return;
}
-void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem* /* parent */, QListViewItem* /* after */)
+void KMyMoneyAccountTreeBase::slotObjectDropped(TQDropEvent* event, TQListViewItem* /* tqparent */, TQListViewItem* /* after */)
{
m_autoopenTimer.stop();
slotStopAutoScroll();
@@ -296,7 +296,7 @@ void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem
KMyMoneyAccountTreeBaseItem* newParent = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(m_dropItem);
if(newParent) {
- QString fromId(event->encodedData("text/plain"));
+ TQString fromId(event->tqencodedData("text/plain"));
const KMyMoneyAccountTreeBaseItem* from = findItem(fromId);
// we can only move accounts around
@@ -321,7 +321,7 @@ void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem
}
}
-void KMyMoneyAccountTreeBase::slotSelectObject(QListViewItem* i)
+void KMyMoneyAccountTreeBase::slotSelectObject(TQListViewItem* i)
{
emit selectObject(MyMoneyInstitution());
emit selectObject(MyMoneyAccount());
@@ -332,7 +332,7 @@ void KMyMoneyAccountTreeBase::slotSelectObject(QListViewItem* i)
}
}
-void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint&)
+void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint&)
{
Q_UNUSED(lv);
@@ -352,7 +352,7 @@ void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, QListViewItem*
}
}
-void KMyMoneyAccountTreeBase::slotOpenObject(QListViewItem* i)
+void KMyMoneyAccountTreeBase::slotOpenObject(TQListViewItem* i)
{
KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem *>(i);
if(item) {
@@ -380,7 +380,7 @@ void KMyMoneyAccountTreeBase::slotOpenFolder(void)
m_autoopenTimer.stop();
if ( m_dropItem && !m_dropItem->isOpen() ) {
m_dropItem->setOpen( TRUE );
- m_dropItem->repaint();
+ m_dropItem->tqrepaint();
}
}
@@ -403,14 +403,14 @@ void KMyMoneyAccountTreeBase::slotAutoScroll(void)
// don't show a highlighter during scrolling
cleanItemHighlighter();
- QPoint p = viewport()->mapFromGlobal( QCursor::pos() );
+ TQPoint p = viewport()->mapFromGlobal( TQCursor::pos() );
if ( m_autoscrollAccel-- <= 0 && m_autoscrollTime ) {
m_autoscrollAccel = initialScrollAccel;
m_autoscrollTime--;
m_autoscrollTimer.start( m_autoscrollTime );
}
- int l = QMAX(1,(initialScrollTime-m_autoscrollTime));
+ int l = TQMAX(1,(initialScrollTime-m_autoscrollTime));
int dx=0,dy=0;
if ( p.y() < autoscrollMargin ) {
@@ -430,10 +430,10 @@ void KMyMoneyAccountTreeBase::slotAutoScroll(void)
}
}
-void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e)
+void KMyMoneyAccountTreeBase::contentsDragMoveEvent(TQDragMoveEvent* e)
{
- QPoint vp = contentsToViewport(e->pos());
- QRect inside_margin((contentsX() > 0) ? autoscrollMargin : 0,
+ TQPoint vp = contentsToViewport(e->pos());
+ TQRect inside_margin((contentsX() > 0) ? autoscrollMargin : 0,
(contentsY() > 0) ? autoscrollMargin : 0,
visibleWidth() - ((contentsX() + visibleWidth() < contentsWidth())
? autoscrollMargin*2 : 0),
@@ -441,22 +441,22 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e)
? autoscrollMargin*2 : 0));
bool accepted = false;
- QListViewItem *i = itemAt( vp );
+ TQListViewItem *i = itemAt( vp );
if ( i ) {
accepted = acceptDrag(e);
if(accepted && !m_autoscrollTimer.isActive()) {
if (dropHighlighter()) {
- QRect tmpRect = drawItemHighlighter(0, i);
+ TQRect tmpRect = drawItemHighlighter(0, i);
if (tmpRect != m_lastDropHighlighter) {
cleanItemHighlighter();
m_lastDropHighlighter = tmpRect;
- viewport()->repaint(tmpRect);
+ viewport()->tqrepaint(tmpRect);
}
}
}
- if ( !inside_margin.contains(vp) ) {
+ if ( !inside_margin.tqcontains(vp) ) {
slotStartAutoScroll();
- e->accept(QRect(0,0,0,0)); // Keep sending move events
+ e->accept(TQRect(0,0,0,0)); // Keep sending move events
m_autoopenTimer.stop();
} else {
@@ -472,10 +472,10 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e)
}
if ( accepted ) {
switch ( e->action() ) {
- case QDropEvent::Copy:
- case QDropEvent::Link:
+ case TQDropEvent::Copy:
+ case TQDropEvent::Link:
break;
- case QDropEvent::Move:
+ case TQDropEvent::Move:
e->acceptAction();
break;
default:
@@ -495,27 +495,27 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e)
void KMyMoneyAccountTreeBase::cleanItemHighlighter(void)
{
if(m_lastDropHighlighter.isValid()) {
- QRect rect=m_lastDropHighlighter;
- m_lastDropHighlighter = QRect();
- // make sure, we repaint a bit more. that's important during
+ TQRect rect=m_lastDropHighlighter;
+ m_lastDropHighlighter = TQRect();
+ // make sure, we tqrepaint a bit more. that's important during
// autoscroll. if we don't do that, parts of the highlighter
// do not get removed
rect.moveBy(-1, -1);
- rect.setSize(rect.size() + QSize(2,2));
- viewport()->repaint(rect, true);
+ rect.setSize(rect.size() + TQSize(2,2));
+ viewport()->tqrepaint(rect, true);
}
}
-void KMyMoneyAccountTreeBase::viewportPaintEvent(QPaintEvent* e)
+void KMyMoneyAccountTreeBase::viewportPaintEvent(TQPaintEvent* e)
{
- QListView::viewportPaintEvent(e);
+ TQListView::viewportPaintEvent(e);
if (m_lastDropHighlighter.isValid() && e->rect().intersects(m_lastDropHighlighter)) {
- QPainter painter(viewport());
+ TQPainter painter(viewport());
// This is where we actually draw the drop-highlighter
- style().drawPrimitive(QStyle::PE_FocusRect, &painter, m_lastDropHighlighter, colorGroup(),
- QStyle::Style_FocusAtBorder);
+ tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, m_lastDropHighlighter, tqcolorGroup(),
+ TQStyle::Style_FocusAtBorder);
}
}
@@ -533,8 +533,8 @@ const MyMoneyObject& KMyMoneyAccountTreeBaseItem::itemObject(void) const
return m_account;
}
-KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyInstitution& institution) :
- KListViewItem(parent),
+KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyInstitution& institution) :
+ KListViewItem(tqparent),
m_totalValue(MyMoneyMoney(0)),
m_negative(false),
m_institution(institution),
@@ -543,8 +543,8 @@ KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, cons
setName();
}
-KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security, const QString& name) :
- KListViewItem(parent),
+KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security, const TQString& name) :
+ KListViewItem(tqparent),
m_security(security),
m_totalValue(MyMoneyMoney(0)),
m_account(account),
@@ -560,8 +560,8 @@ KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, cons
setName();
}
-KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
- KListViewItem(parent),
+KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
+ KListViewItem(tqparent),
m_price(price),
m_security(security),
m_totalValue(MyMoneyMoney(0)),
@@ -576,18 +576,18 @@ KMyMoneyAccountTreeBaseItem::~KMyMoneyAccountTreeBaseItem()
{
}
-const QString& KMyMoneyAccountTreeBaseItem::id(void) const
+const TQString& KMyMoneyAccountTreeBaseItem::id(void) const
{
if(m_type == Institution)
return m_institution.id();
return m_account.id();
}
-bool KMyMoneyAccountTreeBaseItem::isChildOf(const QListViewItem* const item) const
+bool KMyMoneyAccountTreeBaseItem::isChildOf(const TQListViewItem* const item) const
{
- QListViewItem *p = parent();
+ TQListViewItem *p = tqparent();
while(p && p != item) {
- p = p->parent();
+ p = p->tqparent();
}
return (p != 0);
}
@@ -596,8 +596,8 @@ MyMoneyMoney KMyMoneyAccountTreeBaseItem::value() const
{
// calculate the new value by running down the price list
MyMoneyMoney result = balance();
- QValueList<MyMoneyPrice>::const_iterator it_p;
- QString security = m_security.id();
+ TQValueList<MyMoneyPrice>::const_iterator it_p;
+ TQString security = m_security.id();
for(it_p = m_price.begin(); it_p != m_price.end(); ++it_p) {
result = (result * (MyMoneyMoney(1,1) / (*it_p).rate(security))).convert(MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision()));
if((*it_p).from() == security)
@@ -636,7 +636,7 @@ void KMyMoneyAccountTreeBaseItem::fillColumns()
if (lv->valueColumn()<0)
return;
// show the top accounts always in total value
- if((isOpen() || m_account.accountList().count() == 0) && parent()) {
+ if((isOpen() || m_account.accountList().count() == 0) && tqparent()) {
// only show the balance, if its a different security/currency
if(m_security.id() != listView()->baseCurrency().id()) {
@@ -646,7 +646,7 @@ void KMyMoneyAccountTreeBaseItem::fillColumns()
} else {
setText(lv->balanceColumn(), " ");
- if(parent())
+ if(tqparent())
setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()) + " ");
else
setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()));
@@ -684,30 +684,30 @@ void KMyMoneyAccountTreeBaseItem::adjustTotalValue(const MyMoneyMoney& diff)
{
m_totalValue += diff;
- // if the entry has no children,
+ // if the entry has no tqchildren,
// or it is the top entry
// or it is currently not open
// we need to display the value of it
KMyMoneyAccountTreeBase* lv = dynamic_cast<KMyMoneyAccountTreeBase*>(listView());
if(!lv)
return;
- if(!firstChild() || !parent() || (!isOpen() && firstChild())) {
+ if(!firstChild() || !tqparent() || (!isOpen() && firstChild())) {
if(firstChild())
setText(lv->balanceColumn(), " ");
- if(parent())
+ if(tqparent())
setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()) + " ");
else
setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()));
}
// now make sure, the upstream accounts also get notified about the value change
- KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(parent());
+ KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(tqparent());
if(p != 0) {
p->adjustTotalValue(diff);
}
}
-int KMyMoneyAccountTreeBaseItem::compare(QListViewItem* i, int col, bool ascending) const
+int KMyMoneyAccountTreeBaseItem::compare(TQListViewItem* i, int col, bool ascending) const
{
KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(i);
// do special sorting only if
@@ -734,20 +734,20 @@ int KMyMoneyAccountTreeBaseItem::compare(QListViewItem* i, int col, bool ascendi
return KListViewItem::compare(i, col, ascending);
}
-void KMyMoneyAccountTreeBaseItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+void KMyMoneyAccountTreeBaseItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
//set item background
if(isAlternate())
- cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor());
+ cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor());
else
- cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
+ cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
#ifndef KMM_DESIGNER
// display base accounts in bold
- QFont font = KMyMoneyGlobalSettings::listCellFont();
- if(!parent())
+ TQFont font = KMyMoneyGlobalSettings::listCellFont();
+ if(!tqparent())
font.setBold(true);
// strike out closed accounts
@@ -757,21 +757,21 @@ void KMyMoneyAccountTreeBaseItem::paintCell(QPainter *p, const QColorGroup & cg,
p->setFont(font);
#endif
//set text color
- QColor textColour;
+ TQColor textColour;
if(m_negative == true) {
textColour = KMyMoneyGlobalSettings::listNegativeValueColor(); //if the item is marked is marked as negative, all columns will be painted negative
} else {
textColour = m_columnsColor[column]; //otherwise, respect the color for each column
}
- cg2.setColor(QColorGroup::Text, textColour);
+ cg2.setColor(TQColorGroup::Text, textColour);
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
void KMyMoneyAccountTreeBase::expandCollapseAll(bool expand)
{
- QListViewItemIterator it(this);
- QListViewItem* p;
+ TQListViewItemIterator it(this);
+ TQListViewItem* p;
while((p = it.current()) != 0) {
p->setOpen(expand);
++it;
@@ -792,7 +792,7 @@ void KMyMoneyAccountTreeBase::queueSort(void)
{
if (sortColumn() == balanceColumn() || sortColumn() == valueColumn()) {
++m_queuedSort;
- QTimer::singleShot(100, this, SLOT(slotActivateSort()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotActivateSort()));
}
}
@@ -808,13 +808,13 @@ void KMyMoneyAccountTreeBaseItem::setNegative(bool isNegative)
m_negative = isNegative;
}
-void KMyMoneyAccountTreeBaseItem::setText( int column, const QString &text, const bool &negative)
+void KMyMoneyAccountTreeBaseItem::setText( int column, const TQString &text, const bool &negative)
{
//if negative set the map to negative color according to KMyMoneySettings
if(negative) {
m_columnsColor[column] = KMyMoneyGlobalSettings::listNegativeValueColor();
} else {
- m_columnsColor[column] = QColorGroup::Text;
+ m_columnsColor[column] = TQColorGroup::Text;
}
KListViewItem::setText(column, text);
diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.h b/kmymoney2/widgets/kmymoneyaccounttreebase.h
index 4ee6a32..7b27b6a 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreebase.h
+++ b/kmymoney2/widgets/kmymoneyaccounttreebase.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-class QDragObject;
+#include <tqtimer.h>
+class TQDragObject;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -45,8 +45,9 @@ class KMyMoneyAccountTreeBase : public KListView
friend class KMyMoneyAccountTreeBaseItem;
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyAccountTreeBase(QWidget* parent = 0, const char *name = 0);
+ KMyMoneyAccountTreeBase(TQWidget* tqparent = 0, const char *name = 0);
virtual ~KMyMoneyAccountTreeBase();
/**
@@ -54,7 +55,7 @@ public:
*
* @param txt the text to be used in the header
*/
- void setSectionHeader(const QString& txt);
+ void setSectionHeader(const TQString& txt);
/**
* overridden from base class implementation to return a pointer
@@ -73,12 +74,12 @@ public:
void emitValueChanged(void) { emit valueChanged(); };
/**
- * restores the layout from the config file
+ * restores the tqlayout from the config file
* @param group the group to be used from the config file.
* At destruction time, we will use this group name to save
- * the layout.
+ * the tqlayout.
*/
- void restoreLayout(const QString& group);
+ void restoreLayout(const TQString& group);
public slots:
/** autoscroll support */
@@ -88,21 +89,21 @@ public slots:
void slotCollapseAll(void);
protected:
- virtual bool acceptDrag (QDropEvent* event) const;
+ virtual bool acceptDrag (TQDropEvent* event) const;
virtual void startDrag(void);
- const KMyMoneyAccountTreeBaseItem* findItem(const QString& id) const;
+ const KMyMoneyAccountTreeBaseItem* findItem(const TQString& id) const;
/**
* This method checks, if account @p accFrom can be dropped onto
* account @p accTo.
*
* @param accFrom source account
- * @param accTo new parent account for @p accFrom
+ * @param accTo new tqparent account for @p accFrom
* @retval true drop is ok
- * @retval false drop is not ok (@p accTo cannot be parent of @p accFrom)
+ * @retval false drop is not ok (@p accTo cannot be tqparent of @p accFrom)
*/
bool dropAccountOnAccount(const MyMoneyAccount& accFrom, const MyMoneyAccount& accTo) const;
- // virtual void contentsDropEvent(QDropEvent*);
+ // virtual void contentsDropEvent(TQDropEvent*);
/**
* This member counts the connects to the signals
@@ -120,7 +121,7 @@ protected:
*/
void disconnectNotify(const char *);
- void contentsDragMoveEvent( QDragMoveEvent *e );
+ void contentsDragMoveEvent( TQDragMoveEvent *e );
/**
* Reimplemented for internal reasons.
@@ -129,14 +130,14 @@ protected:
*
* The API is unaffected.
*/
- virtual void viewportPaintEvent(QPaintEvent*);
+ virtual void viewportPaintEvent(TQPaintEvent*);
void expandCollapseAll(bool expand);
void queueSort(void);
protected slots:
- void slotObjectDropped(QDropEvent* event, QListViewItem* parent, QListViewItem* after);
+ void slotObjectDropped(TQDropEvent* event, TQListViewItem* tqparent, TQListViewItem* after);
/**
* Select the object pointed to by @p i. This slot emits selectObject signals
@@ -144,9 +145,9 @@ protected slots:
* to deselect current selections. If @p i points to a KMyMoneyAccountTreeItem
* object, it emits selectObject() for this item.
*
- * @param i pointer to QListViewItem of object to be selected
+ * @param i pointer to TQListViewItem of object to be selected
*/
- void slotSelectObject(QListViewItem *i);
+ void slotSelectObject(TQListViewItem *i);
/**
* This slot is connected to the accout list view's contextMenu signal
@@ -154,19 +155,19 @@ protected slots:
* and sends out the necessary signal openContextMenu.
*
* @param lv pointer to KListView
- * @param i pointer to QListViewItem
+ * @param i pointer to TQListViewItem
* @param p position information
*/
- void slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p);
+ void slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p);
/**
* This slot is connected to the accout list view's executed signal
* and checks if the item pointed to by @p i is either an account or institution
* and sends out the necessary signal openObject.
*
- * @param i pointer to QListViewItem
+ * @param i pointer to TQListViewItem
*/
- void slotOpenObject(QListViewItem* i);
+ void slotOpenObject(TQListViewItem* i);
void slotAutoScroll(void);
@@ -182,18 +183,18 @@ private:
MyMoneySecurity m_baseCurrency;
bool m_accountConnections;
bool m_institutionConnections;
- QTimer m_autoopenTimer;
- QTimer m_autoscrollTimer;
+ TQTimer m_autoopenTimer;
+ TQTimer m_autoscrollTimer;
int m_autoscrollTime;
int m_autoscrollAccel;
- QListViewItem* m_dropItem;
- QRect m_lastDropHighlighter;
+ TQListViewItem* m_dropItem;
+ TQRect m_lastDropHighlighter;
int m_queuedSort;
int m_nameColumn;
int m_typeColumn;
int m_valueColumn;
int m_balanceColumn;
- QString m_configGroup;
+ TQString m_configGroup;
public:
int typeColumn(void) const { return m_typeColumn; }
@@ -237,12 +238,12 @@ signals:
/**
* This signal is emitted, when the user selected to reparent the
- * account @p acc to be a subordinate account of @p parent.
+ * account @p acc to be a subordinate account of @p tqparent.
*
* @param acc const reference to account to be reparented
- * @param parent const reference to new parent account
+ * @param tqparent const reference to new tqparent account
*/
- void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& parent);
+ void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent);
/**
* This signal is emitted, when the user selected to reparent the
@@ -266,18 +267,18 @@ public:
* Constructor to be used to construct an institution entry
* object.
*
- * @param parent pointer to the KListView object this entry should be
+ * @param tqparent pointer to the KListView object this entry should be
* added to.
* @param institution const reference to MyMoneyInstitution for which
* the KListView entry is constructed
*/
- KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyInstitution& institution);
+ KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyInstitution& institution);
/**
* Constructor to be used to construct a standard account entry object (e.g. Asset,
* Liability, etc.).
*
- * @param parent pointer to the KListView object this entry should be
+ * @param tqparent pointer to the KListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -286,13 +287,13 @@ public:
* @param name name of the account to be used instead of the one stored with @p account
* If empty, the one stored with @p account will be used. Default: empty
*/
- KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString());
+ KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString());
/**
* Constructor to be used to construct an account entry
* object.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -301,7 +302,7 @@ public:
* @param security const reference to the security used to show the value. Usually
* one should pass MyMoneyFile::baseCurrency() here.
*/
- KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
+ KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
~KMyMoneyAccountTreeBaseItem();
@@ -342,17 +343,17 @@ public:
*
* @return const reference to id of object
*/
- const QString& id(void) const;
+ const TQString& id(void) const;
/**
* Helper method to show the right order
*/
- int compare(QListViewItem* i, int col, bool ascending) const;
+ int compare(TQListViewItem* i, int col, bool ascending) const;
/**
* If o is TRUE all child items are shown initially. The user can
* hide them by clicking the - icon to the left of the item. If
- * o is FALSE, the children of this item are initially hidden.
+ * o is FALSE, the tqchildren of this item are initially hidden.
* The user can show them by clicking the + icon to the left of the item.
*
* Overrides KListViewItem::setOpen() and exchanges the value field
@@ -364,11 +365,11 @@ public:
virtual void setOpen(bool o);
/**
- * This method is re-implemented from QListViewItem::paintCell().
- * Besides the standard implementation, the QPainter is set
+ * This method is re-implemented from TQListViewItem::paintCell().
+ * Besides the standard implementation, the TQPainter is set
* according to the applications settings.
*/
- void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align);
/**
* Convenience method to return casted pointer
@@ -410,12 +411,12 @@ public:
* by @p item.
*
* @param item pointer to other KMyMoneyAccountTreeItem that
- * should be checked for parent/grand-parenthood of this
+ * should be checked for tqparent/grand-tqparenthood of this
* object
* @retval true @p this object is a decendant of @p item
* @retval false @p this object is no decendant of @p item
*/
- bool isChildOf(const QListViewItem* const item) const;
+ bool isChildOf(const TQListViewItem* const item) const;
/**
* Sets the whole item to be shown with negative colors
@@ -426,7 +427,7 @@ public:
* Sets the text of a given column. @param negative indicates whether it should
* be shown as negative number or not
*/
- void setText( int column, const QString &text, const bool &negative = false );
+ void setText( int column, const TQString &text, const bool &negative = false );
protected:
/**
@@ -446,18 +447,18 @@ protected:
* Computes and returns the current value of the account held by this item.
* This is the same as balance() but in the currency of the view.
* if value() changed since the item has been displayed, updateAccount()
- * will notify the parent.
+ * will notify the tqparent.
* @return value of the account held by this item
*/
MyMoneyMoney value() const;
protected:
MyMoneyMoney m_value;
- QValueList<MyMoneyPrice> m_price;
+ TQValueList<MyMoneyPrice> m_price;
MyMoneySecurity m_security;
MyMoneyMoney m_totalValue;
MyMoneyAccount m_account;
- QMap<int, QColor> m_columnsColor;
+ TQMap<int, TQColor> m_columnsColor;
bool m_negative;
private:
diff --git a/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp b/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp
index cd1da0b..9a6a7db 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp
+++ b/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp
@@ -19,14 +19,14 @@
// Project Includes
#include <kmymoneyaccounttreebudget.h>
-KMyMoneyAccountTreeBudget::KMyMoneyAccountTreeBudget(QWidget* parent, const char* name) :
- KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(parent, name)
+KMyMoneyAccountTreeBudget::KMyMoneyAccountTreeBudget(TQWidget* tqparent, const char* name) :
+ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(tqparent, name)
{
showType();
showValue();
}
-void KMyMoneyAccountTreeBudget::slotSelectObject(const QListViewItem* i)
+void KMyMoneyAccountTreeBudget::slotSelectObject(const TQListViewItem* i)
{
emit selectObject(MyMoneyInstitution());
emit selectObject(MyMoneyAccount());
@@ -37,15 +37,15 @@ void KMyMoneyAccountTreeBudget::slotSelectObject(const QListViewItem* i)
}
}
-KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security, const QString& name) :
- KMyMoneyAccountTreeBaseItem(parent, account, security, name),
+KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security, const TQString& name) :
+ KMyMoneyAccountTreeBaseItem(tqparent, account, security, name),
m_budget(budget)
{
updateAccount(true);
}
-KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *parent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
- KMyMoneyAccountTreeBaseItem(parent, account, price, security),
+KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *tqparent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) :
+ KMyMoneyAccountTreeBaseItem(tqparent, account, price, security),
m_budget(budget)
{
updateAccount(true);
diff --git a/kmymoney2/widgets/kmymoneyaccounttreebudget.h b/kmymoney2/widgets/kmymoneyaccounttreebudget.h
index 86c1b07..470a8f8 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreebudget.h
+++ b/kmymoney2/widgets/kmymoneyaccounttreebudget.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-class QDragObject;
+#include <tqtimer.h>
+class TQDragObject;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -39,12 +39,13 @@ class KMyMoneyAccountTreeBudgetItem;
class KMyMoneyAccountTreeBudget : public KMyMoneyAccountTreeBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyAccountTreeBudget(QWidget* parent = 0, const char *name = 0);
+ KMyMoneyAccountTreeBudget(TQWidget* tqparent = 0, const char *name = 0);
virtual ~KMyMoneyAccountTreeBudget() {}
public slots:
- void slotSelectObject(const QListViewItem* i);
+ void slotSelectObject(const TQListViewItem* i);
};
@@ -56,7 +57,7 @@ public:
* Constructor to be used to construct an account
* entry object for a budget.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -67,13 +68,13 @@ public:
* @param security const reference to the security used to show the value. Usually
* one should pass MyMoneyFile::baseCurrency() here.
*/
- KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *parent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
+ KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *tqparent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity());
/**
* Constructor to be used to construct an account
* entry object for a budget.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -84,7 +85,7 @@ public:
* @param name name of the account to be used instead of the one stored with @p account
* If empty, the one stored with @p account will be used. Default: empty
*/
- KMyMoneyAccountTreeBudgetItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString());
+ KMyMoneyAccountTreeBudgetItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString());
~KMyMoneyAccountTreeBudgetItem();
diff --git a/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp b/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp
index 0da5194..df1f735 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp
+++ b/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp
@@ -30,10 +30,10 @@
using namespace reports;
-KMyMoneyAccountTreeForecast::KMyMoneyAccountTreeForecast(QWidget* parent, const char* name) :
- KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(parent, name)
+KMyMoneyAccountTreeForecast::KMyMoneyAccountTreeForecast(TQWidget* tqparent, const char* name) :
+ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(tqparent, name)
{
- setResizeMode(QListView::NoColumn);
+ setResizeMode(TQListView::NoColumn);
}
void KMyMoneyAccountTreeForecast::showAccount( void )
@@ -57,14 +57,14 @@ void KMyMoneyAccountTreeForecast::showSummary(MyMoneyForecast& forecast)
addColumn(i18n("Current"), -1);
//if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle
- if(QDate::currentDate() < forecast.beginForecastDate()) {
- daysToBeginDay = QDate::currentDate().daysTo(forecast.beginForecastDate());
+ if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) {
+ daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate());
} else {
daysToBeginDay = forecast.accountsCycle();
}
for(int i = 0; ((i*forecast.accountsCycle())+daysToBeginDay) <= forecast.forecastDays(); ++i) {
int intervalDays = ((i*forecast.accountsCycle())+daysToBeginDay);
- QString columnName = i18n("%1 days").arg(intervalDays, 0, 10);
+ TQString columnName = i18n("%1 days").tqarg(intervalDays, 0, 10);
addColumn(columnName, -1);
}
@@ -73,7 +73,7 @@ void KMyMoneyAccountTreeForecast::showSummary(MyMoneyForecast& forecast)
//align columns
for(int i = 1; i < columns(); ++i) {
- setColumnAlignment(i, Qt::AlignRight);
+ setColumnAlignment(i, TQt::AlignRight);
}
}
@@ -84,8 +84,8 @@ void KMyMoneyAccountTreeForecast::showDetailed(MyMoneyForecast& forecast)
addColumn(i18n("Current"), -1);
for(int i = 1; i <= forecast.forecastDays(); ++i) {
- QDate forecastDate = QDate::currentDate().addDays(i);
- QString columnName = KGlobal::locale()->formatDate(forecastDate, true);
+ TQDate forecastDate = TQDate::tqcurrentDate().addDays(i);
+ TQString columnName = KGlobal::locale()->formatDate(forecastDate, true);
addColumn(columnName, -1);
}
@@ -94,7 +94,7 @@ void KMyMoneyAccountTreeForecast::showDetailed(MyMoneyForecast& forecast)
//align columns
for(int i = 1; i < columns(); ++i) {
- setColumnAlignment(i, Qt::AlignRight);
+ setColumnAlignment(i, TQt::AlignRight);
}
}
@@ -103,36 +103,36 @@ void KMyMoneyAccountTreeForecast::showAdvanced(MyMoneyForecast& forecast)
int daysToBeginDay;
//if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle
- if(QDate::currentDate() < forecast.beginForecastDate()) {
- daysToBeginDay = QDate::currentDate().daysTo(forecast.beginForecastDate());
+ if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) {
+ daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate());
} else {
daysToBeginDay = forecast.accountsCycle();
}
//add columns
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = addColumn(i18n("Min Bal %1").arg(i), -1);
- setColumnAlignment(col, Qt::AlignRight);
- addColumn(i18n("Min Date %1").arg(i), -1);
+ int col = addColumn(i18n("Min Bal %1").tqarg(i), -1);
+ setColumnAlignment(col, TQt::AlignRight);
+ addColumn(i18n("Min Date %1").tqarg(i), -1);
}
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = addColumn(i18n("Max Bal %1").arg(i), -1);
- setColumnAlignment(col, Qt::AlignRight);
- addColumn(i18n("Max Date %1").arg(i), -1);
+ int col = addColumn(i18n("Max Bal %1").tqarg(i), -1);
+ setColumnAlignment(col, TQt::AlignRight);
+ addColumn(i18n("Max Date %1").tqarg(i), -1);
}
int col = addColumn(i18n("Average"), -1);
- setColumnAlignment(col, Qt::AlignRight);
+ setColumnAlignment(col, TQt::AlignRight);
}
void KMyMoneyAccountTreeForecast::showBudget(MyMoneyForecast& forecast)
{
- QDate forecastStartDate = forecast.forecastStartDate();
- QDate forecastEndDate = forecast.forecastEndDate();
+ TQDate forecastStartDate = forecast.forecastStartDate();
+ TQDate forecastEndDate = forecast.forecastEndDate();
//add cycle interval columns
- QDate f_date = forecastStartDate;
+ TQDate f_date = forecastStartDate;
for(; f_date <= forecastEndDate; f_date = f_date.addMonths(1)) {
- QString columnName = QDate::longMonthName(f_date.month());
+ TQString columnName = TQDate::longMonthName(f_date.month());
addColumn(columnName, -1);
}
//add total column
@@ -141,11 +141,11 @@ void KMyMoneyAccountTreeForecast::showBudget(MyMoneyForecast& forecast)
//align columns
for(int i = 1; i < columns(); ++i) {
- setColumnAlignment(i, Qt::AlignRight);
+ setColumnAlignment(i, TQt::AlignRight);
}
}
-void KMyMoneyAccountTreeForecast::slotSelectObject(const QListViewItem* i)
+void KMyMoneyAccountTreeForecast::slotSelectObject(const TQListViewItem* i)
{
emit selectObject(MyMoneyInstitution());
emit selectObject(MyMoneyAccount());
@@ -156,16 +156,16 @@ void KMyMoneyAccountTreeForecast::slotSelectObject(const QListViewItem* i)
}
}
-KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security, const QString& name) :
- KMyMoneyAccountTreeBaseItem(parent, account, security, name),
+KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security, const TQString& name) :
+ KMyMoneyAccountTreeBaseItem(tqparent, account, security, name),
m_forecast(forecast)
{
updateAccount(true);
}
-KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *parent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security, const EForecastViewType forecastType) :
- KMyMoneyAccountTreeBaseItem(parent, account, price, security),
+KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *tqparent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security, const EForecastViewType forecastType) :
+ KMyMoneyAccountTreeBaseItem(tqparent, account, price, security),
m_forecast(forecast),
m_forecastType(forecastType)
{
@@ -205,8 +205,8 @@ void KMyMoneyAccountTreeForecastItem::updateSummary()
MyMoneyFile* file = MyMoneyFile::instance();
int daysToBeginDay;
- if(QDate::currentDate() < m_forecast.beginForecastDate()) {
- daysToBeginDay = QDate::currentDate().daysTo(m_forecast.beginForecastDate());
+ if(TQDate::tqcurrentDate() < m_forecast.beginForecastDate()) {
+ daysToBeginDay = TQDate::tqcurrentDate().daysTo(m_forecast.beginForecastDate());
} else {
daysToBeginDay = m_forecast.accountsCycle();
}
@@ -221,7 +221,7 @@ void KMyMoneyAccountTreeForecastItem::updateSummary()
//add current balance column
- QDate summaryDate = QDate::currentDate();
+ TQDate summaryDate = TQDate::tqcurrentDate();
amountMM = m_forecast.forecastBalance(m_account, summaryDate);
//calculate the balance in base currency for the total row
@@ -231,7 +231,7 @@ void KMyMoneyAccountTreeForecastItem::updateSummary()
it_c++;
//iterate through all other columns
- for(QDate summaryDate = QDate::currentDate().addDays(daysToBeginDay); summaryDate <= m_forecast.forecastEndDate();summaryDate = summaryDate.addDays(m_forecast.accountsCycle()), ++it_c) {
+ for(TQDate summaryDate = TQDate::tqcurrentDate().addDays(daysToBeginDay); summaryDate <= m_forecast.forecastEndDate();summaryDate = summaryDate.addDays(m_forecast.accountsCycle()), ++it_c) {
amountMM = m_forecast.forecastBalance(m_account, summaryDate);
//calculate the balance in base currency for the total row
@@ -248,8 +248,8 @@ void KMyMoneyAccountTreeForecastItem::updateSummary()
void KMyMoneyAccountTreeForecastItem::updateDetailed()
{
- QString amount;
- QString vAmount;
+ TQString amount;
+ TQString vAmount;
MyMoneyMoney vAmountMM;
MyMoneyFile* file = MyMoneyFile::instance();
@@ -263,7 +263,7 @@ void KMyMoneyAccountTreeForecastItem::updateDetailed()
int it_c = 1; // iterator for the columns of the listview
- for(QDate forecastDate = QDate::currentDate(); forecastDate <= m_forecast.forecastEndDate(); ++it_c, forecastDate = forecastDate.addDays(1)) {
+ for(TQDate forecastDate = TQDate::tqcurrentDate(); forecastDate <= m_forecast.forecastEndDate(); ++it_c, forecastDate = forecastDate.addDays(1)) {
MyMoneyMoney amountMM = m_forecast.forecastBalance(m_account, forecastDate);
//calculate the balance in base currency for the total row
@@ -286,7 +286,7 @@ void KMyMoneyAccountTreeForecastItem::updateBudget()
MyMoneyFile* file = MyMoneyFile::instance();
int it_c = 1; // iterator for the columns of the listview
- QDate forecastDate = m_forecast.forecastStartDate();
+ TQDate forecastDate = m_forecast.forecastStartDate();
if(m_account.isInvest()) {
MyMoneySecurity underSecurity = file->security(m_account.currencyId());
@@ -329,14 +329,14 @@ void KMyMoneyAccountTreeForecastItem::adjustParentValue(int column, const MyMone
m_values[column] += value;
m_values[column] = m_values[column].convert(listView()->baseCurrency().smallestAccountFraction());
- // if the entry has no children,
+ // if the entry has no tqchildren,
// or it is the top entry
// or it is currently not open
// we need to display the value of it
KMyMoneyAccountTreeForecast* lv = dynamic_cast<KMyMoneyAccountTreeForecast*>(listView());
if(!lv)
return;
- if(!firstChild() || !parent() || (!isOpen() && firstChild())
+ if(!firstChild() || !tqparent() || (!isOpen() && firstChild())
|| depth() == 1 ) {
if(firstChild())
setText(column, " ");
@@ -345,15 +345,15 @@ void KMyMoneyAccountTreeForecastItem::adjustParentValue(int column, const MyMone
}
// now make sure, the upstream accounts also get notified about the value change
- KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(parent());
+ KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(tqparent());
if(p != 0) {
p->adjustParentValue(column, value);
}
}
-void KMyMoneyAccountTreeForecastItem::setValue(int column, MyMoneyMoney amount, QDate forecastDate)
+void KMyMoneyAccountTreeForecastItem::setValue(int column, MyMoneyMoney amount, TQDate forecastDate)
{
- KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(parent());
+ KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(tqparent());
//calculate the balance in base currency for the total row
if(m_account.currencyId() != listView()->baseCurrency().id()) {
diff --git a/kmymoney2/widgets/kmymoneyaccounttreeforecast.h b/kmymoney2/widgets/kmymoneyaccounttreeforecast.h
index 925d2e9..5f3cd85 100644
--- a/kmymoney2/widgets/kmymoneyaccounttreeforecast.h
+++ b/kmymoney2/widgets/kmymoneyaccounttreeforecast.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-class QDragObject;
+#include <tqtimer.h>
+class TQDragObject;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -39,8 +39,9 @@ class KMyMoneyAccountTreeForecastItem;
class KMyMoneyAccountTreeForecast : public KMyMoneyAccountTreeBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyAccountTreeForecast(QWidget* parent = 0, const char *name = 0);
+ KMyMoneyAccountTreeForecast(TQWidget* tqparent = 0, const char *name = 0);
virtual ~KMyMoneyAccountTreeForecast() {}
void showSummary(MyMoneyForecast& forecast);
@@ -51,7 +52,7 @@ class KMyMoneyAccountTreeForecast : public KMyMoneyAccountTreeBase
void clearColumns(void);
public slots:
- void slotSelectObject(const QListViewItem* i);
+ void slotSelectObject(const TQListViewItem* i);
};
@@ -65,7 +66,7 @@ public:
* Constructor to be used to construct an account
* entry object for a forecast.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -76,13 +77,13 @@ public:
* @param security const reference to the security used to show the value. Usually
* one should pass MyMoneyFile::baseCurrency() here.
*/
- KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *parent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity(), const EForecastViewType forecastViewType = eUndefined);
+ KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *tqparent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity(), const EForecastViewType forecastViewType = eUndefined);
/**
* Constructor to be used to construct an account
* entry object for a forecast.
*
- * @param parent pointer to the parent KAccountListView object this entry should be
+ * @param tqparent pointer to the tqparent KAccountListView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KListView entry is constructed
@@ -93,7 +94,7 @@ public:
* @param name name of the account to be used instead of the one stored with @p account
* If empty, the one stored with @p account will be used. Default: empty
*/
- KMyMoneyAccountTreeForecastItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString());
+ KMyMoneyAccountTreeForecastItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString());
~KMyMoneyAccountTreeForecastItem();
@@ -153,14 +154,14 @@ protected:
MyMoneyMoney balance() const;
void showAmount(int column, const MyMoneyMoney amount, const MyMoneySecurity security);
void adjustParentValue(int column, const MyMoneyMoney& value);
- void setValue(int column, MyMoneyMoney amount, QDate forecastDate);
+ void setValue(int column, MyMoneyMoney amount, TQDate forecastDate);
void setAmount(int column, MyMoneyMoney amount);
private:
MyMoneyForecast m_forecast;
int m_daysToBeginDay;
- QMap<int, MyMoneyMoney> m_values;
- QMap<int, MyMoneyMoney> m_amounts;
+ TQMap<int, MyMoneyMoney> m_values;
+ TQMap<int, MyMoneyMoney> m_amounts;
EForecastViewType m_forecastType;
};
diff --git a/kmymoney2/widgets/kmymoneybriefschedule.cpp b/kmymoney2/widgets/kmymoneybriefschedule.cpp
index 82776af..c4143ca 100644
--- a/kmymoney2/widgets/kmymoneybriefschedule.cpp
+++ b/kmymoney2/widgets/kmymoneybriefschedule.cpp
@@ -23,10 +23,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqtoolbutton.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,27 +43,27 @@
#include "kmymoneybriefschedule.h"
#include "../kmymoneyutils.h"
-KMyMoneyBriefSchedule::KMyMoneyBriefSchedule(QWidget *parent, const char *name )
- : kScheduleBriefWidget(parent,name, WStyle_Customize | WStyle_NoBorder)
+KMyMoneyBriefSchedule::KMyMoneyBriefSchedule(TQWidget *tqparent, const char *name )
+ : kScheduleBriefWidget(tqparent,name, WStyle_Customize | WStyle_NoBorder)
{
KIconLoader *ic = KGlobal::iconLoader();
- m_nextButton->setPixmap(BarIcon(QString::fromLatin1("1rightarrow")));
- m_prevButton->setPixmap(BarIcon(QString::fromLatin1("1leftarrow")));
+ m_nextButton->setPixmap(BarIcon(TQString::tqfromLatin1("1rightarrow")));
+ m_prevButton->setPixmap(BarIcon(TQString::tqfromLatin1("1leftarrow")));
- connect(m_prevButton, SIGNAL(clicked()), this, SLOT(slotPrevClicked()));
- connect(m_nextButton, SIGNAL(clicked()), this, SLOT(slotNextClicked()));
- connect(m_closeButton, SIGNAL(clicked()), this, SLOT(hide()));
- connect(m_skipButton, SIGNAL(clicked()), this, SLOT(slotSkipClicked()));
- connect(m_buttonEnter, SIGNAL(clicked()), this, SLOT(slotEnterClicked()));
+ connect(m_prevButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrevClicked()));
+ connect(m_nextButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNextClicked()));
+ connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(hide()));
+ connect(m_skipButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSkipClicked()));
+ connect(m_buttonEnter, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEnterClicked()));
KGuiItem skipGuiItem( i18n("&Skip"),
- QIconSet(ic->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall)),
+ TQIconSet(ic->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall)),
i18n("Skip this transaction"),
i18n("Use this button to skip this transaction"));
m_skipButton->setGuiItem(skipGuiItem);
KGuiItem enterGuiItem( i18n("&Enter"),
- QIconSet(ic->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall)),
+ TQIconSet(ic->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall)),
i18n("Record this transaction into the register"),
i18n("Use this button to record this transaction"));
m_buttonEnter->setGuiItem(enterGuiItem);
@@ -73,7 +73,7 @@ KMyMoneyBriefSchedule::~KMyMoneyBriefSchedule()
{
}
-void KMyMoneyBriefSchedule::setSchedules(QValueList<MyMoneySchedule> list, const QDate& date)
+void KMyMoneyBriefSchedule::setSchedules(TQValueList<MyMoneySchedule> list, const TQDate& date)
{
m_scheduleList = list;
m_date = date;
@@ -94,12 +94,12 @@ void KMyMoneyBriefSchedule::loadSchedule()
MyMoneySchedule sched = m_scheduleList[m_index];
m_indexLabel->setText(i18n("%1 of %2")
- .arg(QString::number(m_index+1))
- .arg(QString::number(m_scheduleList.count())));
+ .tqarg(TQString::number(m_index+1))
+ .tqarg(TQString::number(m_scheduleList.count())));
m_name->setText(sched.name());
m_type->setText(KMyMoneyUtils::scheduleTypeToString(sched.type()));
m_account->setText(sched.account().name());
- QString text;
+ TQString text;
MyMoneyMoney amount = sched.transaction().splitByAccount(sched.account().id()).value();
amount = amount.abs();
@@ -107,35 +107,35 @@ void KMyMoneyBriefSchedule::loadSchedule()
{
int transactions = sched.paymentDates(m_date, sched.endDate()).count()-1;
text = i18n("Payment on %1 for %2 with %3 transactions remaining occuring %4.")
- .arg(KGlobal::locale()->formatDate(m_date, true))
- .arg(amount.formatMoney(sched.account().fraction()))
- .arg(QString::number(transactions))
- .arg(i18n(sched.occurenceToString()));
+ .tqarg(KGlobal::locale()->formatDate(m_date, true))
+ .tqarg(amount.formatMoney(sched.account().fraction()))
+ .tqarg(TQString::number(transactions))
+ .tqarg(i18n(sched.occurenceToString()));
} else {
text = i18n("Payment on %1 for %2 occuring %4.")
- .arg(KGlobal::locale()->formatDate(m_date, true))
- .arg(amount.formatMoney(sched.account().fraction()))
- .arg(i18n(sched.occurenceToString()));
+ .tqarg(KGlobal::locale()->formatDate(m_date, true))
+ .tqarg(amount.formatMoney(sched.account().fraction()))
+ .tqarg(i18n(sched.occurenceToString()));
}
- if (m_date < QDate::currentDate())
+ if (m_date < TQDate::tqcurrentDate())
{
if (sched.isOverdue())
{
- QDate startD = (sched.lastPayment().isValid()) ?
+ TQDate startD = (sched.lastPayment().isValid()) ?
sched.lastPayment() :
sched.startDate();
if (m_date.isValid())
startD = m_date;
- int days = startD.daysTo(QDate::currentDate());
- int transactions = sched.paymentDates(startD, QDate::currentDate()).count();
+ int days = startD.daysTo(TQDate::tqcurrentDate());
+ int transactions = sched.paymentDates(startD, TQDate::tqcurrentDate()).count();
text += "<br><font color=red>";
text += i18n("%1 days overdue (%2 occurences).")
- .arg(QString::number(days))
- .arg(QString::number(transactions));
+ .tqarg(TQString::number(days))
+ .tqarg(TQString::number(transactions));
text += "</color>";
}
}
diff --git a/kmymoney2/widgets/kmymoneybriefschedule.h b/kmymoney2/widgets/kmymoneybriefschedule.h
index f910e35..252cd78 100644
--- a/kmymoney2/widgets/kmymoneybriefschedule.h
+++ b/kmymoney2/widgets/kmymoneybriefschedule.h
@@ -25,8 +25,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -42,14 +42,15 @@
class KMyMoneyBriefSchedule : public kScheduleBriefWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyBriefSchedule(QWidget *parent=0, const char *name=0);
+ KMyMoneyBriefSchedule(TQWidget *tqparent=0, const char *name=0);
~KMyMoneyBriefSchedule();
- void setSchedules(QValueList<MyMoneySchedule> list, const QDate& date);
+ void setSchedules(TQValueList<MyMoneySchedule> list, const TQDate& date);
signals:
- void enterClicked(const MyMoneySchedule&, const QDate&);
- void skipClicked(const MyMoneySchedule&, const QDate&);
+ void enterClicked(const MyMoneySchedule&, const TQDate&);
+ void skipClicked(const MyMoneySchedule&, const TQDate&);
protected slots:
void slotPrevClicked();
@@ -58,9 +59,9 @@ protected slots:
void slotSkipClicked();
private:
- QValueList<MyMoneySchedule> m_scheduleList;
+ TQValueList<MyMoneySchedule> m_scheduleList;
unsigned int m_index;
- QDate m_date;
+ TQDate m_date;
void loadSchedule();
};
diff --git a/kmymoney2/widgets/kmymoneycalculator.cpp b/kmymoney2/widgets/kmymoneycalculator.cpp
index 3e59331..8e1cbdd 100644
--- a/kmymoney2/widgets/kmymoneycalculator.cpp
+++ b/kmymoney2/widgets/kmymoneycalculator.cpp
@@ -23,9 +23,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qsignalmapper.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqsignalmapper.h>
+#include <tqregexp.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -38,19 +38,19 @@
#include "kmymoneycalculator.h"
-kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name)
- : QFrame(parent, name)
+kMyMoneyCalculator::kMyMoneyCalculator(TQWidget* tqparent, const char *name)
+ : TQFrame(tqparent, name)
{
m_comma = KGlobal::locale()->monetaryDecimalSymbol()[0];
m_clearOperandOnDigit = false;
- QGridLayout* grid = new QGridLayout(this, 5, 5, 1, 2);
+ TQGridLayout* grid = new TQGridLayout(this, 5, 5, 1, 2);
- display = new QLabel(this);
- display->setBackgroundColor(QColor("#BDFFB4"));
+ display = new TQLabel(this);
+ display->setBackgroundColor(TQColor("#BDFFB4"));
- display->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- display->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
+ display->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ display->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
grid->addMultiCellWidget(display, 0, 0, 0, 4);
buttons[0] = new KPushButton("0", this);
@@ -67,7 +67,7 @@ kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name)
buttons[MINUS] = new KPushButton("-", this);
buttons[STAR] = new KPushButton("X", this);
buttons[COMMA] = new KPushButton(m_comma, this);
- buttons[EQUAL] = new KPushButton("=", this);
+ buttons[ETQUAL] = new KPushButton("=", this);
buttons[SLASH] = new KPushButton("/", this);
buttons[CLEAR] = new KPushButton("C", this);
buttons[CLEARALL] = new KPushButton("AC", this);
@@ -90,41 +90,41 @@ kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name)
grid->addWidget(buttons[MINUS], 4, 3);
grid->addWidget(buttons[STAR], 3, 4);
grid->addWidget(buttons[SLASH], 4, 4);
- grid->addWidget(buttons[EQUAL], 4, 2);
+ grid->addWidget(buttons[ETQUAL], 4, 2);
grid->addWidget(buttons[PLUSMINUS], 2, 3);
grid->addWidget(buttons[PERCENT], 2, 4);
grid->addWidget(buttons[CLEAR], 1, 3);
grid->addWidget(buttons[CLEARALL], 1, 4);
- buttons[EQUAL]->setFocus();
+ buttons[ETQUAL]->setFocus();
op1 = 0.0;
stackedOp = op = 0;
- operand = QString();
+ operand = TQString();
changeDisplay("0");
// connect the digit signals through a signal mapper
- QSignalMapper* mapper = new QSignalMapper(this);
+ TQSignalMapper* mapper = new TQSignalMapper(TQT_TQOBJECT(this));
for(int i = 0; i < 10; ++i) {
- mapper->setMapping(buttons[i], i);
- connect(buttons[i], SIGNAL(clicked()), mapper, SLOT(map()));
+ mapper->setMapping(TQT_TQOBJECT(buttons[i]), i);
+ connect(buttons[i], TQT_SIGNAL(clicked()), mapper, TQT_SLOT(map()));
}
- connect(mapper, SIGNAL(mapped(int)), this, SLOT(digitClicked(int)));
+ connect(mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(digitClicked(int)));
// connect the calculation operations through another mapper
- mapper = new QSignalMapper(this);
- for(int i = PLUS; i <= EQUAL; ++i) {
- mapper->setMapping(buttons[i], i);
- connect(buttons[i], SIGNAL(clicked()), mapper, SLOT(map()));
+ mapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ for(int i = PLUS; i <= ETQUAL; ++i) {
+ mapper->setMapping(TQT_TQOBJECT(buttons[i]), i);
+ connect(buttons[i], TQT_SIGNAL(clicked()), mapper, TQT_SLOT(map()));
}
- connect(mapper, SIGNAL(mapped(int)), this, SLOT(calculationClicked(int)));
+ connect(mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(calculationClicked(int)));
// connect all remaining signals
- connect(buttons[COMMA], SIGNAL(clicked()), SLOT(commaClicked()));
- connect(buttons[PLUSMINUS], SIGNAL(clicked()), SLOT(plusminusClicked()));
- connect(buttons[PERCENT], SIGNAL(clicked()), SLOT(percentClicked()));
- connect(buttons[CLEAR], SIGNAL(clicked()), SLOT(clearClicked()));
- connect(buttons[CLEARALL], SIGNAL(clicked()), SLOT(clearAllClicked()));
+ connect(buttons[COMMA], TQT_SIGNAL(clicked()), TQT_SLOT(commaClicked()));
+ connect(buttons[PLUSMINUS], TQT_SIGNAL(clicked()), TQT_SLOT(plusminusClicked()));
+ connect(buttons[PERCENT], TQT_SIGNAL(clicked()), TQT_SLOT(percentClicked()));
+ connect(buttons[CLEAR], TQT_SIGNAL(clicked()), TQT_SLOT(clearClicked()));
+ connect(buttons[CLEARALL], TQT_SIGNAL(clicked()), TQT_SLOT(clearAllClicked()));
for(int i = 0; i < MAX_BUTTONS; ++i) {
buttons[i]->setMinimumSize(40, 30);
@@ -146,11 +146,11 @@ kMyMoneyCalculator::~kMyMoneyCalculator()
void kMyMoneyCalculator::digitClicked(int button)
{
if(m_clearOperandOnDigit) {
- operand = QString();
+ operand = TQString();
m_clearOperandOnDigit = false;
}
- operand += QChar(button + 0x30);
+ operand += TQChar(button + 0x30);
if(operand.length() > 16)
operand = operand.left(16);
changeDisplay(operand);
@@ -160,7 +160,7 @@ void kMyMoneyCalculator::commaClicked(void)
{
if(operand.length() == 0)
operand = "0";
- if(operand.contains('.', FALSE) == 0)
+ if(operand.tqcontains('.', FALSE) == 0)
operand.append('.');
if(operand.length() > 16)
@@ -174,8 +174,8 @@ void kMyMoneyCalculator::plusminusClicked(void)
operand = m_result;
if(operand.length() > 0) {
- if(operand.find('-') != -1)
- operand.replace('-', QString());
+ if(operand.tqfind('-') != -1)
+ operand.tqreplace('-', TQString());
else
operand.prepend('-');
changeDisplay(operand);
@@ -184,7 +184,7 @@ void kMyMoneyCalculator::plusminusClicked(void)
void kMyMoneyCalculator::calculationClicked(int button)
{
- if(operand.length() == 0 && op != 0 && button == EQUAL) {
+ if(operand.length() == 0 && op != 0 && button == ETQUAL) {
op = 0;
m_result = normalizeString(op1);
changeDisplay(m_result);
@@ -237,7 +237,7 @@ void kMyMoneyCalculator::calculationClicked(int button)
if(error) {
op = 0;
changeDisplay("Error");
- operand = QString();
+ operand = TQString();
} else {
op1 = op2;
m_result = normalizeString(op1);
@@ -249,18 +249,18 @@ void kMyMoneyCalculator::calculationClicked(int button)
changeDisplay(m_result);
}
- if(button != EQUAL) {
+ if(button != ETQUAL) {
op = button;
} else {
op = 0;
emit signalResultAvailable();
}
- operand = QString();
+ operand = TQString();
}
-QString kMyMoneyCalculator::normalizeString(const double& val)
+TQString kMyMoneyCalculator::normalizeString(const double& val)
{
- QString str;
+ TQString str;
str.setNum(val, 'f');
int i = str.length();
while(i > 1 && str[i-1] == '0') {
@@ -290,7 +290,7 @@ void kMyMoneyCalculator::clearClicked(void)
void kMyMoneyCalculator::clearAllClicked(void)
{
- operand = QString();
+ operand = TQString();
op = 0;
changeDisplay("0");
}
@@ -315,93 +315,93 @@ void kMyMoneyCalculator::percentClicked(void)
}
}
-const QString kMyMoneyCalculator::result(void) const
+const TQString kMyMoneyCalculator::result(void) const
{
- QString txt = m_result;
- txt.replace(QRegExp("\\."), m_comma);
+ TQString txt = m_result;
+ txt.tqreplace(TQRegExp("\\."), m_comma);
if(txt[0] == '-') {
txt = txt.mid(1); // get rid of the minus sign
- QString mask;
+ TQString tqmask;
switch(KGlobal::locale()->negativeMonetarySignPosition()) {
case KLocale::ParensAround:
- mask = "(%1)";
+ tqmask = "(%1)";
break;
case KLocale::AfterQuantityMoney:
- mask = "%1-";
+ tqmask = "%1-";
break;
case KLocale::AfterMoney:
case KLocale::BeforeMoney:
- mask = "%1 -";
+ tqmask = "%1 -";
break;
case KLocale::BeforeQuantityMoney:
- mask = "-%1";
+ tqmask = "-%1";
break;
}
- txt = QString(mask).arg(txt);
+ txt = TQString(tqmask).tqarg(txt);
}
return txt;
}
-void kMyMoneyCalculator::changeDisplay(const QString& str)
+void kMyMoneyCalculator::changeDisplay(const TQString& str)
{
- QString txt = str;
- txt.replace(QRegExp("\\."), m_comma);
+ TQString txt = str;
+ txt.tqreplace(TQRegExp("\\."), m_comma);
display->setText("<b>" + txt + "</b>");
}
-void kMyMoneyCalculator::keyPressEvent(QKeyEvent* ev)
+void kMyMoneyCalculator::keyPressEvent(TQKeyEvent* ev)
{
int button = -1;
switch(ev->key()) {
- case Qt::Key_0:
- case Qt::Key_1:
- case Qt::Key_2:
- case Qt::Key_3:
- case Qt::Key_4:
- case Qt::Key_5:
- case Qt::Key_6:
- case Qt::Key_7:
- case Qt::Key_8:
- case Qt::Key_9:
+ case TQt::Key_0:
+ case TQt::Key_1:
+ case TQt::Key_2:
+ case TQt::Key_3:
+ case TQt::Key_4:
+ case TQt::Key_5:
+ case TQt::Key_6:
+ case TQt::Key_7:
+ case TQt::Key_8:
+ case TQt::Key_9:
if(m_clearOperandOnDigit) {
- operand = QString();
+ operand = TQString();
m_clearOperandOnDigit = false;
}
- button = ev->key() - Qt::Key_0;
+ button = ev->key() - TQt::Key_0;
break;
- case Qt::Key_Plus:
+ case TQt::Key_Plus:
button = PLUS;
break;
- case Qt::Key_Minus:
+ case TQt::Key_Minus:
button = MINUS;
break;
- case Qt::Key_Comma:
- case Qt::Key_Period:
+ case TQt::Key_Comma:
+ case TQt::Key_Period:
if(m_clearOperandOnDigit) {
- operand = QString();
+ operand = TQString();
m_clearOperandOnDigit = false;
}
button = COMMA;
break;
- case Qt::Key_Slash:
+ case TQt::Key_Slash:
button = SLASH;
break;
- case Qt::Key_Backspace:
+ case TQt::Key_Backspace:
button = CLEAR;
break;
- case Qt::Key_Asterisk:
+ case TQt::Key_Asterisk:
button = STAR;
break;
- case Qt::Key_Return:
- case Qt::Key_Enter:
- case Qt::Key_Equal:
- button = EQUAL;
+ case TQt::Key_Return:
+ case TQt::Key_Enter:
+ case TQt::Key_Equal:
+ button = ETQUAL;
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
button = CLEARALL;
break;
- case Qt::Key_Percent:
+ case TQt::Key_Percent:
button = PERCENT;
break;
default:
@@ -414,26 +414,26 @@ void kMyMoneyCalculator::keyPressEvent(QKeyEvent* ev)
m_clearOperandOnDigit = false;
}
-void kMyMoneyCalculator::setInitialValues(const QString& value, QKeyEvent* ev)
+void kMyMoneyCalculator::setInitialValues(const TQString& value, TQKeyEvent* ev)
{
bool negative = false;
// setup operand
operand = value;
- operand.replace(QRegExp(QString("\\")+KGlobal::locale()->thousandsSeparator()), QString());
- operand.replace(QRegExp(QString("\\")+m_comma), ".");
- if(operand.contains('(')) {
+ operand.tqreplace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString());
+ operand.tqreplace(TQRegExp(TQString("\\")+m_comma), ".");
+ if(operand.tqcontains('(')) {
negative = true;
- operand.replace("(", QString());
- operand.replace(")", QString());
+ operand.tqreplace("(", TQString());
+ operand.tqreplace(")", TQString());
}
- if(operand.contains('-')) {
+ if(operand.tqcontains('-')) {
negative = true;
- operand.replace("-", QString());
+ operand.tqreplace("-", TQString());
}
if(operand.isEmpty())
operand = "0";
else if(negative)
- operand = QString("-%1").arg(operand);
+ operand = TQString("-%1").tqarg(operand);
changeDisplay(operand);
diff --git a/kmymoney2/widgets/kmymoneycalculator.h b/kmymoney2/widgets/kmymoneycalculator.h
index 594d6c7..64674a1 100644
--- a/kmymoney2/widgets/kmymoneycalculator.h
+++ b/kmymoney2/widgets/kmymoneycalculator.h
@@ -26,13 +26,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qlcdnumber.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
+#include <tqlcdnumber.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -56,10 +56,11 @@
* without having the user to re-type the data. See setInitialValues()
* for details.
*/
-class kMyMoneyCalculator : public QFrame {
+class kMyMoneyCalculator : public TQFrame {
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyCalculator(QWidget* parent = 0, const char *name = 0);
+ kMyMoneyCalculator(TQWidget* tqparent = 0, const char *name = 0);
~kMyMoneyCalculator();
/**
@@ -67,10 +68,10 @@ public:
* calculation. The fractional part is separated from the
* integral part by the character setup using setComma().
*
- * @return QString representing the result of the
+ * @return TQString representing the result of the
* last operation
*/
- const QString result(void) const;
+ const TQString result(void) const;
/**
* This method is used to set the character to be used
@@ -78,9 +79,9 @@ public:
* of an operand. Upon creation of the object, m_comma is
* set to the current locale setting of KDE's decimalSymbol.
*
- * @param ch QChar representing the character to be used
+ * @param ch TQChar representing the character to be used
*/
- void setComma(const QChar ch) { m_comma = ch; };
+ void setComma(const TQChar ch) { m_comma = ch; };
/**
* This method is used to preset the first operand and start
@@ -88,10 +89,10 @@ public:
* by kMyMoneyEdit. If @p ev is 0, then no operation will be
* started.
*
- * @param value reference to QString representing the operands value
- * @param ev pointer to QKeyEvent representing the operation's key
+ * @param value reference to TQString representing the operands value
+ * @param ev pointer to TQKeyEvent representing the operation's key
*/
- void setInitialValues(const QString& value, QKeyEvent* ev);
+ void setInitialValues(const TQString& value, TQKeyEvent* ev);
signals:
/**
@@ -100,16 +101,16 @@ signals:
void signalResultAvailable();
protected:
- void keyPressEvent(QKeyEvent* ev);
+ void keyPressEvent(TQKeyEvent* ev);
/**
- * This method is used to transform a double into a QString
+ * This method is used to transform a double into a TQString
* and removing any trailing 0's and decimal seperators
*
* @param val reference to double value to be converted
- * @return QString object containing the converted value
+ * @return TQString object containing the converted value
*/
- QString normalizeString(const double& val);
+ TQString normalizeString(const double& val);
protected slots:
/**
@@ -124,7 +125,7 @@ protected slots:
/**
* This methods starts the operation contained in the parameter
*
- * @param button The Qt::Keycode for the button pressed or clicked
+ * @param button The TQt::Keycode for the button pressed or clicked
*/
void calculationClicked(int button);
@@ -158,27 +159,27 @@ protected slots:
* This method updates the display of the calculator with
* the text passed as argument
*
- * @param str reference to QString containing the new display contents
+ * @param str reference to TQString containing the new display contents
*/
- void changeDisplay(const QString& str);
+ void changeDisplay(const TQString& str);
private:
/**
* This member variable stores the current (second) operand
*/
- QString operand;
+ TQString operand;
/**
* This member variable stores the last result
*/
- QString m_result;
+ TQString m_result;
/**
* This member variable stores the representation of the
* character to be used to separate the integer and fractional
* part of numbers. The internal representation is always a period.
*/
- QChar m_comma;
+ TQChar m_comma;
/**
* The numeric representation of a stacked first operand
@@ -204,7 +205,7 @@ private:
/**
* This member stores a pointer to the display area
*/
- QLabel *display;
+ TQLabel *display;
/**
* This member array stores the pointers to the various
@@ -221,7 +222,7 @@ private:
/* 0-9 are used by digits */
COMMA = 10,
/*
- * make sure, that PLUS through EQUAL remain in
+ * make sure, that PLUS through ETQUAL remain in
* the order they are. Otherwise, check the calculation
* signal mapper
*/
@@ -229,7 +230,7 @@ private:
MINUS,
SLASH,
STAR,
- EQUAL,
+ ETQUAL,
PLUSMINUS,
PERCENT,
CLEAR,
diff --git a/kmymoney2/widgets/kmymoneycalendar.cpp b/kmymoney2/widgets/kmymoneycalendar.cpp
index 8f5291f..761cda8 100644
--- a/kmymoney2/widgets/kmymoneycalendar.cpp
+++ b/kmymoney2/widgets/kmymoneycalendar.cpp
@@ -45,17 +45,17 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qframe.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qstyle.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qvalidator.h>
-#include <qpushbutton.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqframe.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqstyle.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqvalidator.h>
+#include <tqpushbutton.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -85,14 +85,14 @@ public:
kMyMoneyCalendarPrivate()
: closeButton(0L), selectWeek(0L), userButton1(0), userButton2(0) {}
- QToolButton *closeButton;
- QToolButton *selectWeek;
- QPushButton *userButton1;
- QPushButton *userButton2;
+ TQToolButton *closeButton;
+ TQToolButton *selectWeek;
+ TQPushButton *userButton1;
+ TQPushButton *userButton2;
};
-kMyMoneyCalendar::kMyMoneyCalendar(QWidget *parent, const char *name ) :
- QFrame(parent,name),
+kMyMoneyCalendar::kMyMoneyCalendar(TQWidget *tqparent, const char *name ) :
+ TQFrame(tqparent,name),
table(0),
d(new kMyMoneyCalendarPrivate)
{
@@ -103,83 +103,83 @@ kMyMoneyCalendar::~kMyMoneyCalendar()
delete d;
}
-void kMyMoneyCalendar::init( const QDate &dt )
+void kMyMoneyCalendar::init( const TQDate &dt )
{
- styleControl = new QPushButton(i18n("Select Style"), this);
- yearForward = new QToolButton(this);
- yearBackward = new QToolButton(this);
- monthForward = new QToolButton(this);
- monthBackward = new QToolButton(this);
- selectMonth = new QToolButton(this);
- selectYear = new QToolButton(this);
+ styleControl = new TQPushButton(i18n("Select Style"), this);
+ yearForward = new TQToolButton(this);
+ yearBackward = new TQToolButton(this);
+ monthForward = new TQToolButton(this);
+ monthBackward = new TQToolButton(this);
+ selectMonth = new TQToolButton(this);
+ selectYear = new TQToolButton(this);
line = new KLineEdit(this);
val = new KDateValidator(this);
fontsize = 10;
- d->selectWeek = new QToolButton( this );
+ d->selectWeek = new TQToolButton( this );
// KIconLoader *kiconloader = KGlobal::iconLoader();
KPopupMenu* kpopupmenuNew = new KPopupMenu(this);
- kpopupmenuNew->insertItem(i18n("Week"), this, SLOT(slotSetStyleWeekly()));
- kpopupmenuNew->insertItem(i18n("Month"), this, SLOT(slotSetStyleMonthly()));
-/* kpopupmenuNew->insertItem(i18n("3 Months"), this, SLOT(slotSetStyleQuarterly())); */
+ kpopupmenuNew->insertItem(i18n("Week"), this, TQT_SLOT(slotSetStyleWeekly()));
+ kpopupmenuNew->insertItem(i18n("Month"), this, TQT_SLOT(slotSetStyleMonthly()));
+/* kpopupmenuNew->insertItem(i18n("3 Months"), this, TQT_SLOT(slotSetStyleQuarterly())); */
styleControl->setPopup(kpopupmenuNew);
- QToolTip::add(styleControl, i18n("Choose Style"));
- QToolTip::add(yearForward, i18n("Next year"));
- QToolTip::add(yearBackward, i18n("Previous year"));
- QToolTip::add(monthForward, i18n("Next month"));
- QToolTip::add(monthBackward, i18n("Previous month"));
- QToolTip::add(d->selectWeek, i18n("Select a week"));
- QToolTip::add(selectMonth, i18n("Select a month"));
- QToolTip::add(selectYear, i18n("Select a year"));
+ TQToolTip::add(styleControl, i18n("Choose Style"));
+ TQToolTip::add(yearForward, i18n("Next year"));
+ TQToolTip::add(yearBackward, i18n("Previous year"));
+ TQToolTip::add(monthForward, i18n("Next month"));
+ TQToolTip::add(monthBackward, i18n("Previous month"));
+ TQToolTip::add(d->selectWeek, i18n("Select a week"));
+ TQToolTip::add(selectMonth, i18n("Select a month"));
+ TQToolTip::add(selectYear, i18n("Select a year"));
// -----
setFontSize(10);
line->setValidator(val);
line->installEventFilter( this );
- yearForward->setPixmap(BarIcon(QString::fromLatin1("2rightarrow")));
- yearBackward->setPixmap(BarIcon(QString::fromLatin1("2leftarrow")));
- monthForward->setPixmap(BarIcon(QString::fromLatin1("1rightarrow")));
- monthBackward->setPixmap(BarIcon(QString::fromLatin1("1leftarrow")));
+ yearForward->setPixmap(BarIcon(TQString::tqfromLatin1("2rightarrow")));
+ yearBackward->setPixmap(BarIcon(TQString::tqfromLatin1("2leftarrow")));
+ monthForward->setPixmap(BarIcon(TQString::tqfromLatin1("1rightarrow")));
+ monthBackward->setPixmap(BarIcon(TQString::tqfromLatin1("1leftarrow")));
setDate(dt); // set button texts
- connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate)));
- connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot()));
- connect(monthForward, SIGNAL(clicked()), SLOT(monthForwardClicked()));
- connect(monthBackward, SIGNAL(clicked()), SLOT(monthBackwardClicked()));
- connect(yearForward, SIGNAL(clicked()), SLOT(yearForwardClicked()));
- connect(yearBackward, SIGNAL(clicked()), SLOT(yearBackwardClicked()));
- connect(d->selectWeek, SIGNAL(clicked()), SLOT(selectWeekClicked()));
- connect(selectMonth, SIGNAL(clicked()), SLOT(selectMonthClicked()));
- connect(selectYear, SIGNAL(clicked()), SLOT(selectYearClicked()));
- connect(line, SIGNAL(returnPressed()), SLOT(lineEnterPressed()));
+ connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate)));
+ connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
+ connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked()));
+ connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked()));
+ connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked()));
+ connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked()));
+ connect(d->selectWeek, TQT_SIGNAL(clicked()), TQT_SLOT(selectWeekClicked()));
+ connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked()));
+ connect(selectYear, TQT_SIGNAL(clicked()), TQT_SLOT(selectYearClicked()));
+ connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed()));
if (table)
table->setFocus();
}
bool
-kMyMoneyCalendar::eventFilter(QObject *o, QEvent *e )
+kMyMoneyCalendar::eventFilter(TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = (QKeyEvent *)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = (TQKeyEvent *)e;
- if ( (k->key() == Qt::Key_Prior) ||
- (k->key() == Qt::Key_Next) ||
- (k->key() == Qt::Key_Up) ||
- (k->key() == Qt::Key_Down) )
+ if ( (k->key() == TQt::Key_Prior) ||
+ (k->key() == TQt::Key_Next) ||
+ (k->key() == TQt::Key_Up) ||
+ (k->key() == TQt::Key_Down) )
{
- QApplication::sendEvent( table, e );
+ TQApplication::sendEvent( table, e );
table->setFocus();
return TRUE; // eat event
}
}
- return QFrame::eventFilter( o, e );
+ return TQFrame::eventFilter( o, e );
}
void
-kMyMoneyCalendar::resizeEvent(QResizeEvent*)
+kMyMoneyCalendar::resizeEvent(TQResizeEvent*)
{
- QWidget *buttons[] = {
+ TQWidget *buttons[] = {
styleControl,
d->userButton1,
d->userButton2,
@@ -192,7 +192,7 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*)
d->closeButton
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
- QSize sizes[NoOfButtons];
+ TQSize sizes[NoOfButtons];
int buttonHeight=0;
int count;
int w;
@@ -200,18 +200,18 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*)
// ----- calculate button row height:
for(count=0; count<NoOfButtons; ++count) {
if ( buttons[count] ) { // closeButton may be 0L
- sizes[count]=buttons[count]->sizeHint();
- buttonHeight=QMAX(buttonHeight, sizes[count].height());
+ sizes[count]=buttons[count]->tqsizeHint();
+ buttonHeight=TQMAX(buttonHeight, sizes[count].height());
}
else
- sizes[count] = QSize(0,0); // closeButton
+ sizes[count] = TQSize(0,0); // closeButton
}
// ----- calculate size of the month button:
for(count=0; count<NoOfButtons; ++count) {
if(buttons[count]==selectMonth) {
- QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton, selectMonth, maxMonthRect);
- sizes[count].setWidth(QMAX(metricBound.width(), maxMonthRect.width()+2*QApplication::style().pixelMetric(QStyle::PM_ButtonMargin)));
+ TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect);
+ sizes[count].setWidth(TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin)));
}
}
// ----- place the buttons:
@@ -245,7 +245,7 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*)
}
// ----- place the line edit for direct input:
- sizes[0]=line->sizeHint();
+ sizes[0]=line->tqsizeHint();
int week_width=d->selectWeek->fontMetrics().width(i18n("Week XX"))+((d->closeButton != 0L) ? 50 : 20);
line->setGeometry(0, height()-sizes[0].height(), width()-week_width, sizes[0].height());
d->selectWeek->setGeometry(width()-week_width, height()-sizes[0].height(), week_width, sizes[0].height());
@@ -257,11 +257,11 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*)
}
void
-kMyMoneyCalendar::dateChangedSlot(QDate date)
+kMyMoneyCalendar::dateChangedSlot(TQDate date)
{
kdDebug() << "kMyMoneyCalendar::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
line->setText(KGlobal::locale()->formatDate(date, true));
- d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
+ d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date)));
selectMonth->setText(MONTH_NAME(date.month(), date.year(), false));
selectYear->setText(date.toString("yyyy"));
emit(dateChanged(date));
@@ -275,29 +275,29 @@ kMyMoneyCalendar::tableClickedSlot()
emit(tableClicked());
}
-const QDate&
+const TQDate&
kMyMoneyCalendar::getDate() const
{
return table->getDate();
}
-const QDate &
+const TQDate &
kMyMoneyCalendar::date() const
{
return table->getDate();
}
bool
-kMyMoneyCalendar::setDate(const QDate& date)
+kMyMoneyCalendar::setDate(const TQDate& date)
{
if (!table)
return true; // hack
if(date.isValid()) {
- QString temp;
+ TQString temp;
// -----
table->setDate(date);
- d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
+ d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date)));
selectMonth->setText(MONTH_NAME(date.month(), date.year(), false));
temp.setNum(date.year());
selectYear->setText(temp);
@@ -341,13 +341,13 @@ kMyMoneyCalendar::selectWeekClicked()
KPopupFrame* popup = new KPopupFrame(this);
KDateInternalWeekSelector* picker = new KDateInternalWeekSelector(/*fontsize, */popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
- connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
+ connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
- if(popup->exec(d->selectWeek->mapToGlobal(QPoint(0, d->selectWeek->height()))))
+ if(popup->exec(d->selectWeek->mapToGlobal(TQPoint(0, d->selectWeek->height()))))
{
- QDate date;
+ TQDate date;
int year;
// -----
week=picker->getWeek();
@@ -380,13 +380,13 @@ kMyMoneyCalendar::selectMonthClicked()
KPopupFrame* popup = new KPopupFrame(this);
KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(/*fontsize, */popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
picker->setFocus();
- connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
- if(popup->exec(selectMonth->mapToGlobal(QPoint(0, selectMonth->height()))))
+ connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
+ if(popup->exec(selectMonth->mapToGlobal(TQPoint(0, selectMonth->height()))))
{
- QDate date;
+ TQDate date;
int day;
// -----
month=picker->getResult();
@@ -394,7 +394,7 @@ kMyMoneyCalendar::selectMonthClicked()
day=date.day();
// ----- construct a valid date in this month:
date.setYMD(date.year(), month, 1);
- date.setYMD(date.year(), month, QMIN(day, date.daysInMonth()));
+ date.setYMD(date.year(), month, TQMIN(day, date.daysInMonth()));
// ----- set this month
setDate(date);
} else {
@@ -412,13 +412,13 @@ kMyMoneyCalendar::selectYearClicked()
KPopupFrame* popup = new KPopupFrame(this);
KDateInternalYearSelector* picker = new KDateInternalYearSelector(fontsize, popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
- connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
+ connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
- if(popup->exec(selectYear->mapToGlobal(QPoint(0, selectMonth->height()))))
+ if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height()))))
{
- QDate date;
+ TQDate date;
int day;
// -----
year=picker->getYear();
@@ -426,7 +426,7 @@ kMyMoneyCalendar::selectYearClicked()
day=date.day();
// ----- construct a valid date in this month:
date.setYMD(year, date.month(), 1);
- date.setYMD(year, date.month(), QMIN(day, date.daysInMonth()));
+ date.setYMD(year, date.month(), TQMIN(day, date.daysInMonth()));
// ----- set this month
setDate(date);
} else {
@@ -439,7 +439,7 @@ kMyMoneyCalendar::selectYearClicked()
void
kMyMoneyCalendar::setEnabled(bool enable)
{
- QWidget *widgets[]= {
+ TQWidget *widgets[]= {
styleControl, yearForward, yearBackward, monthForward, monthBackward,
selectMonth, selectYear,
line, table, d->selectWeek, d->userButton1, d->userButton2 };
@@ -456,9 +456,9 @@ kMyMoneyCalendar::setEnabled(bool enable)
void
kMyMoneyCalendar::lineEnterPressed()
{
- QDate temp;
+ TQDate temp;
// -----
- if(val->date(line->text(), temp)==QValidator::Acceptable)
+ if(val->date(line->text(), temp)==TQValidator::Acceptable)
{
kdDebug() << "kMyMoneyCalendar::lineEnterPressed: valid date entered." << endl;
emit(dateEntered(temp));
@@ -469,11 +469,11 @@ kMyMoneyCalendar::lineEnterPressed()
}
}
-QSize
-kMyMoneyCalendar::sizeHint() const
+TQSize
+kMyMoneyCalendar::tqsizeHint() const
{
- QSize tableSize=table->sizeHint();
- QWidget *buttons[]={
+ TQSize tableSize=table->tqsizeHint();
+ TQWidget *buttons[]={
styleControl,
yearBackward,
monthBackward,
@@ -486,30 +486,30 @@ kMyMoneyCalendar::sizeHint() const
d->userButton2
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
- QSize sizes[NoOfButtons];
+ TQSize sizes[NoOfButtons];
int cx=0, cy=0, count;
// ----- store the size hints:
for(count=0; count<NoOfButtons; ++count)
{
if ( buttons[count] )
- sizes[count]=buttons[count]->sizeHint();
+ sizes[count]=buttons[count]->tqsizeHint();
else
- sizes[count] = QSize(0,0);
+ sizes[count] = TQSize(0,0);
if(buttons[count]==selectMonth)
{
- QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton, selectMonth, maxMonthRect);
- cx+=QMAX(metricBound.width(), maxMonthRect.width()+2*QApplication::style().pixelMetric(QStyle::PM_ButtonMargin));
+ TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect);
+ cx+=TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin));
} else {
cx+=sizes[count].width();
}
- cy=QMAX(sizes[count].height(), cy);
+ cy=TQMAX(sizes[count].height(), cy);
}
// ----- calculate width hint:
- cx=QMAX(cx, tableSize.width()); // line edit ignored
+ cx=TQMAX(cx, tableSize.width()); // line edit ignored
// ----- calculate height hint:
- cy+=tableSize.height()+line->sizeHint().height();
- return QSize(cx, cy);
+ cy+=tableSize.height()+line->tqsizeHint().height();
+ return TQSize(cx, cy);
}
void
@@ -517,7 +517,7 @@ kMyMoneyCalendar::setFontSize(int s)
{
if (table)
{
- QWidget *buttons[]= {
+ TQWidget *buttons[]= {
// styleControl
// yearBackward,
// monthBackward,
@@ -528,8 +528,8 @@ kMyMoneyCalendar::setFontSize(int s)
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
int count;
- QFont font;
- QRect r;
+ TQFont font;
+ TQRect r;
// -----
fontsize=s;
for(count=0; count<NoOfButtons; ++count)
@@ -538,12 +538,12 @@ kMyMoneyCalendar::setFontSize(int s)
font.setPointSize(s);
buttons[count]->setFont(font);
}
- QFontMetrics metrics(selectMonth->fontMetrics());
+ TQFontMetrics metrics(selectMonth->fontMetrics());
for(int i=1; i <= 12; ++i)
- { // maxMonthRect is used by sizeHint()
+ { // maxMonthRect is used by tqsizeHint()
r=metrics.boundingRect(MONTH_NAME(i, 2000, false));
- maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width()));
- maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
+ maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width()));
+ maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height()));
}
table->setFontSize(s);
}
@@ -556,11 +556,11 @@ kMyMoneyCalendar::setCloseButton( bool enable )
return;
if ( enable ) {
- d->closeButton = new QToolButton( this );
- QToolTip::add(d->closeButton, i18n("Close"));
+ d->closeButton = new TQToolButton( this );
+ TQToolTip::add(d->closeButton, i18n("Close"));
d->closeButton->setPixmap( SmallIcon("remove") );
- connect( d->closeButton, SIGNAL( clicked() ),
- topLevelWidget(), SLOT( close() ) );
+ connect( d->closeButton, TQT_SIGNAL( clicked() ),
+ tqtopLevelWidget(), TQT_SLOT( close() ) );
}
else {
delete d->closeButton;
@@ -575,23 +575,23 @@ bool kMyMoneyCalendar::hasCloseButton() const
return (d->closeButton != 0L);
}
-int kMyMoneyCalendar::weekOfYear(QDate date)
+int kMyMoneyCalendar::weekOfYear(TQDate date)
{
// Calculate ISO 8601 week number (taken from glibc/Gnumeric)
int year, week, wday, jan1wday, nextjan1wday;
- QDate jan1date, nextjan1date;
+ TQDate jan1date, nextjan1date;
year=date.year();
wday=date.dayOfWeek();
- jan1date=QDate(year,1,1);
+ jan1date=TQDate(year,1,1);
jan1wday=jan1date.dayOfWeek();
week = (date.dayOfYear()-1 + jan1wday-1)/7 + ((jan1wday-1) == 0 ? 1 : 0);
/* Does date belong to last week of previous year? */
if ((week == 0) && (jan1wday > 4 /*THURSDAY*/)) {
- QDate tmpdate=QDate(year-1,12,31);
+ TQDate tmpdate=TQDate(year-1,12,31);
return weekOfYear(tmpdate);
}
@@ -599,7 +599,7 @@ int kMyMoneyCalendar::weekOfYear(QDate date)
week++;
if (week == 53) {
- nextjan1date=QDate(year+1, 1, 1);
+ nextjan1date=TQDate(year+1, 1, 1);
nextjan1wday = nextjan1date.dayOfWeek();
if (nextjan1wday <= 4 /*THURSDAY*/)
week = 1;
@@ -623,10 +623,10 @@ void kMyMoneyCalendar::slotSetStyleMonthly()
void kMyMoneyCalendar::slotSetStyleQuarterly()
{
- setType(kMyMoneyDateTbl::QUARTERLY);
+ setType(kMyMoneyDateTbl::TQUARTERLY);
}
-void kMyMoneyCalendar::setUserButton1(bool enable, QPushButton* pb)
+void kMyMoneyCalendar::setUserButton1(bool enable, TQPushButton* pb)
{
if ( enable == (d->userButton1 != 0L) )
return;
@@ -642,7 +642,7 @@ void kMyMoneyCalendar::setUserButton1(bool enable, QPushButton* pb)
updateGeometry();
}
-void kMyMoneyCalendar::setUserButton2(bool enable, QPushButton* pb)
+void kMyMoneyCalendar::setUserButton2(bool enable, TQPushButton* pb)
{
if ( enable == (d->userButton2 != 0L) )
return;
diff --git a/kmymoney2/widgets/kmymoneycalendar.h b/kmymoney2/widgets/kmymoneycalendar.h
index b0e2328..25ce79f 100644
--- a/kmymoney2/widgets/kmymoneycalendar.h
+++ b/kmymoney2/widgets/kmymoneycalendar.h
@@ -49,8 +49,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qframe.h>
-#include <qdatetime.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -61,11 +61,11 @@
// Project Includes
#include "kmymoneydatetbl.h"
-class QLineEdit;
-class QToolButton;
+class TQLineEdit;
+class TQToolButton;
class KDateValidator;
class kMyMoneyDateTbl;
-class QPushButton;
+class TQPushButton;
/**
* A representation of a calendar.
@@ -73,15 +73,16 @@ class QPushButton;
* @author Michael Edwardes 2003
*
**/
-class kMyMoneyCalendar : public QFrame {
+class kMyMoneyCalendar : public TQFrame {
Q_OBJECT
+ TQ_OBJECT
public:
public:
/**
* Standard constructor.
**/
- kMyMoneyCalendar(QWidget *parent=0, const char *name=0);
+ kMyMoneyCalendar(TQWidget *tqparent=0, const char *name=0);
/**
* Standard destructor.
@@ -104,7 +105,7 @@ public:
* size hint, try adding 28 to each of the reported numbers of
* pixels.
**/
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
/**
* Sets the date.
@@ -112,18 +113,18 @@ public:
* @returns @p false and does not change anything
* if the date given is invalid.
**/
- bool setDate(const QDate&);
+ bool setDate(const TQDate&);
/**
* Returns the selected date.
* @deprecated
**/
- const QDate& getDate() const;
+ const TQDate& getDate() const;
/**
* @returns the selected date.
*/
- const QDate &date() const;
+ const TQDate &date() const;
/**
* Enables or disables the widget.
@@ -143,7 +144,7 @@ public:
/**
* By calling this method with @p enable = true, KDatePicker will show
* a little close-button in the upper button-row. Clicking the
- * close-button will cause the KDatePicker's topLevelWidget()'s close()
+ * close-button will cause the KDatePicker's tqtopLevelWidget()'s close()
* method being called. This is mostly useful for toplevel datepickers
* without a window manager decoration.
* @see #hasCloseButton
@@ -163,41 +164,41 @@ public:
**/
virtual void setDateTable(kMyMoneyDateTbl *tbl) = 0;
- void setUserButton1(bool enable, QPushButton* pb);
- void setUserButton2(bool enable, QPushButton* pb);
+ void setUserButton1(bool enable, TQPushButton* pb);
+ void setUserButton2(bool enable, TQPushButton* pb);
protected:
- /// to catch move keyEvents when QLineEdit has keyFocus
- virtual bool eventFilter(QObject *o, QEvent *e );
+ /// to catch move keyEvents when TQLineEdit has keyFocus
+ virtual bool eventFilter(TQObject *o, TQEvent *e );
/// the resize event
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/// the style control button
- QPushButton *styleControl;
+ TQPushButton *styleControl;
/// the year forward button
- QToolButton *yearForward;
+ TQToolButton *yearForward;
/// the year backward button
- QToolButton *yearBackward;
+ TQToolButton *yearBackward;
/// the month forward button
- QToolButton *monthForward;
+ TQToolButton *monthForward;
/// the month backward button
- QToolButton *monthBackward;
+ TQToolButton *monthBackward;
/// the button for selecting the month directly
- QToolButton *selectMonth;
+ TQToolButton *selectMonth;
/// the button for selecting the year directly
- QToolButton *selectYear;
+ TQToolButton *selectYear;
/// the line edit to enter the date directly
- QLineEdit *line;
+ TQLineEdit *line;
/// the validator for the line edit:
KDateValidator *val;
/// the date table
kMyMoneyDateTbl *table;
/// the size calculated during resize events
- // QSize sizehint;
+ // TQSize sizehint;
/// the widest month string in pixels:
- QSize maxMonthRect;
+ TQSize maxMonthRect;
protected slots:
- void dateChangedSlot(QDate);
+ void dateChangedSlot(TQDate);
void tableClickedSlot();
void monthForwardClicked();
void monthBackwardClicked();
@@ -220,19 +221,19 @@ signals:
* selected.
* @see dateSelected
*/
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/** This signal is emitted each time a day has been selected by
* clicking on the table (hitting a day in the current month). It
* has the same meaning as dateSelected() in older versions of
* KDatePicker.
*/
- void dateSelected(QDate);
+ void dateSelected(TQDate);
/** This signal is emitted when enter is pressed and a VALID date
* has been entered before into the line edit. Connect to both
* dateEntered() and dateSelected() to receive all events where the
* user really enters a date.
*/
- void dateEntered(QDate);
+ void dateEntered(TQDate);
/** This signal is emitted when the day has been selected by
* clicking on it in the table.
*/
@@ -244,13 +245,13 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
- void init( const QDate &dt );
+ void init( const TQDate &dt );
private:
class kMyMoneyCalendarPrivate;
kMyMoneyCalendarPrivate* const d;
// calculate ISO 8601 week number
- int weekOfYear(QDate);
+ int weekOfYear(TQDate);
#if KDE_IS_VERSION(3,2,0)
#define MONTH_NAME(a,b,c) KGlobal::locale()->calendar()->monthName(a,b,c)
diff --git a/kmymoney2/widgets/kmymoneycategory.cpp b/kmymoney2/widgets/kmymoneycategory.cpp
index e14a5a5..7fc8c5a 100644
--- a/kmymoney2/widgets/kmymoneycategory.cpp
+++ b/kmymoney2/widgets/kmymoneycategory.cpp
@@ -18,11 +18,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qrect.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -49,42 +49,42 @@ public:
recursive(false) {}
KPushButton* splitButton;
- QFrame* frame;
+ TQFrame* frame;
bool recursive;
};
-KMyMoneyCategory::KMyMoneyCategory(QWidget* parent, const char * name, bool splitButton) :
- KMyMoneyCombo(true, parent, name),
+KMyMoneyCategory::KMyMoneyCategory(TQWidget* tqparent, const char * name, bool splitButton) :
+ KMyMoneyCombo(true, tqparent, name),
d(new Private)
{
if(splitButton) {
- d->frame = new QFrame(0);
+ d->frame = new TQFrame(0);
d->frame->setFocusProxy(this);
- QHBoxLayout* layout = new QHBoxLayout(d->frame);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(d->frame);
// make sure not to use our own overridden version of reparent() here
- KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, QPoint(0, 0), true);
- if(parent)
- d->frame->reparent(parent, QPoint(0, 0), true);
+ KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, TQPoint(0, 0), true);
+ if(tqparent)
+ d->frame->reparent(tqparent, TQPoint(0, 0), true);
// create button
KGuiItem splitButtonItem("",
- QIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small,
+ TQIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small,
KIcon::SizeSmall)), "", "");
d->splitButton = new KPushButton(splitButtonItem, d->frame, "splitButton");
- layout->addWidget(this, 5);
- layout->addWidget(d->splitButton);
+ tqlayout->addWidget(this, 5);
+ tqlayout->addWidget(d->splitButton);
}
m_completion = new kMyMoneyAccountCompletion(this, 0);
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(textChanged(const QString&)), m_completion, SLOT(slotMakeCompletion(const QString&)));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), m_completion, TQT_SLOT(slotMakeCompletion(const TQString&)));
}
KMyMoneyCategory::~KMyMoneyCategory()
{
- // make sure to wipe out the frame, button and layout
- if(d->frame && !d->frame->parentWidget())
+ // make sure to wipe out the frame, button and tqlayout
+ if(d->frame && !d->frame->tqparentWidget())
d->frame->deleteLater();
delete d;
@@ -95,19 +95,19 @@ KPushButton* KMyMoneyCategory::splitButton(void) const
return d->splitButton;
}
-void KMyMoneyCategory::setPalette(const QPalette& palette)
+void KMyMoneyCategory::setPalette(const TQPalette& palette)
{
if(d->frame)
d->frame->setPalette(palette);
KMyMoneyCombo::setPalette(palette);
}
-void KMyMoneyCategory::reparent(QWidget *parent, WFlags w, const QPoint& pos, bool showIt)
+void KMyMoneyCategory::reparent(TQWidget *tqparent, WFlags w, const TQPoint& pos, bool showIt)
{
if(d->frame)
- d->frame->reparent(parent, w, pos, showIt);
+ d->frame->reparent(tqparent, w, pos, showIt);
else
- KMyMoneyCombo::reparent(parent, w, pos, showIt);
+ KMyMoneyCombo::reparent(tqparent, w, pos, showIt);
}
kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const
@@ -115,7 +115,7 @@ kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const
return dynamic_cast<kMyMoneyAccountSelector*>(KMyMoneyCombo::selector());
}
-void KMyMoneyCategory::setCurrentTextById(const QString& id)
+void KMyMoneyCategory::setCurrentTextById(const TQString& id)
{
if(!id.isEmpty())
setCurrentText(MyMoneyFile::instance()->accountToCategory(id));
@@ -124,7 +124,7 @@ void KMyMoneyCategory::setCurrentTextById(const QString& id)
setSuppressObjectCreation(false);
}
-void KMyMoneyCategory::slotItemSelected(const QString& id)
+void KMyMoneyCategory::slotItemSelected(const TQString& id)
{
setCurrentTextById(id);
@@ -136,7 +136,7 @@ void KMyMoneyCategory::slotItemSelected(const QString& id)
}
}
-void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev)
+void KMyMoneyCategory::focusOutEvent(TQFocusEvent *ev)
{
if(isSplitTransaction()) {
KComboBox::focusOutEvent(ev);
@@ -145,14 +145,14 @@ void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev)
}
}
-void KMyMoneyCategory::focusInEvent(QFocusEvent *ev)
+void KMyMoneyCategory::focusInEvent(TQFocusEvent *ev)
{
KMyMoneyCombo::focusInEvent(ev);
// make sure, we get a clean state before we automagically move the focus to
// some other widget (like for 'split transaction'). We do this by delaying
// the emission of the focusIn signal until the next run of the event loop.
- QTimer::singleShot(0, this, SIGNAL(focusIn()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(focusIn()));
}
void KMyMoneyCategory::setSplitTransaction(void)
@@ -183,8 +183,8 @@ void KMyMoneyCategory::setDisabled(bool disable)
setEnabled(!disable);
}
-KMyMoneySecurity::KMyMoneySecurity(QWidget* parent, const char * name) :
- KMyMoneyCategory(parent, name, false)
+KMyMoneySecurity::KMyMoneySecurity(TQWidget* tqparent, const char * name) :
+ KMyMoneyCategory(tqparent, name, false)
{
}
@@ -192,7 +192,7 @@ KMyMoneySecurity::~KMyMoneySecurity()
{
}
-void KMyMoneySecurity::setCurrentTextById(const QString& id)
+void KMyMoneySecurity::setCurrentTextById(const TQString& id)
{
if(!id.isEmpty())
KMyMoneyCategory::setCurrentText(MyMoneyFile::instance()->account(id).name());
diff --git a/kmymoney2/widgets/kmymoneycategory.h b/kmymoney2/widgets/kmymoneycategory.h
index 474062d..5d90983 100644
--- a/kmymoney2/widgets/kmymoneycategory.h
+++ b/kmymoney2/widgets/kmymoneycategory.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-class QWidget;
-class QFrame;
+class TQWidget;
+class TQFrame;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -48,7 +48,7 @@ class kMyMoneyAccountSelector;
* If any match is found a list selection box is opened and the user can use
* the up/down, page-up/page-down keys or the mouse to navigate in the list. If
* an account is selected, the selection box is closed. Other key-strokes are
- * directed to the parent object to manipulate the text. The visible contents of
+ * directed to the tqparent object to manipulate the text. The visible contents of
* the selection box is updated with every key-stroke.
*
* This object is a replacement of the kMyMoneyCategory object and should be used
@@ -59,26 +59,27 @@ class kMyMoneyAccountSelector;
class KMyMoneyCategory : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Standard constructor for the account selection object.
*
* If parameter @a splitButton is @a true, the widget
- * will construct a surrounding QFrame and reparent itself to be a child of this
- * QFrame. It also adds a KPushButton with the "Split" icon to the right of the
+ * will construct a surrounding TQFrame and reparent itself to be a child of this
+ * TQFrame. It also adds a KPushButton with the "Split" icon to the right of the
* input field. In this case it is important not to use the pointer to this widget
- * but it's parent when placing the object in a QLayout, QTable or some such. The
- * parent widget (the QFrame in this case) can be extracted with the parentWidget()
+ * but it's tqparent when placing the object in a TQLayout, TQTable or some such. The
+ * tqparent widget (the TQFrame in this case) can be extracted with the tqparentWidget()
* method.
*
- * Reparenting is handled by the object transparently for both cases.
+ * Retqparenting is handled by the object transparently for both cases.
*
* Standard usage example (no split button):
*
* @code
* KMyMoneyCategory* category = new KMyMoneyCategory;
* category->reparent(newParent);
- * layout->addWidget(category);
+ * tqlayout->addWidget(category);
* table->setCellWidget(category);
* @endcode
*
@@ -87,11 +88,11 @@ public:
* @code
* KMyMoneyCategory* category = new KMyMoneyCategory(0, 0, true);
* category->reparent(newParent);
- * layout->addWidget(category->parentWidget());
- * table->setCellWidget(category->parentWidget());
+ * tqlayout->addWidget(category->tqparentWidget());
+ * table->setCellWidget(category->tqparentWidget());
* @endcode
*/
- KMyMoneyCategory(QWidget* parent = 0, const char* name = 0, bool splitButton = false);
+ KMyMoneyCategory(TQWidget* tqparent = 0, const char* name = 0, bool splitButton = false);
virtual ~KMyMoneyCategory();
@@ -111,12 +112,12 @@ public:
/**
* Reimplemented for internal reasons. No API change
*/
- virtual void reparent( QWidget *parent, WFlags, const QPoint &, bool showIt = FALSE );
+ virtual void reparent( TQWidget *tqparent, WFlags, const TQPoint &, bool showIt = FALSE );
/**
* Reimplemented for internal reasons. No API change.
*/
- virtual void setPalette(const QPalette& palette);
+ virtual void setPalette(const TQPalette& palette);
/**
* Force the text field to show the text for split transaction.
@@ -131,7 +132,7 @@ public:
/**
* overridden for internal reasons, no API change
*/
- void setCurrentText(const QString& txt = QString()) { KMyMoneyCombo::setCurrentText(txt); }
+ void setCurrentText(const TQString& txt = TQString()) { KMyMoneyCombo::setCurrentText(txt); }
protected:
/**
@@ -139,20 +140,20 @@ protected:
*
* @sa focusIn()
*/
- virtual void focusInEvent(QFocusEvent* ev);
+ virtual void focusInEvent(TQFocusEvent* ev);
/**
* Reimplemented to support protected category text ("split transactions")
*/
- virtual void focusOutEvent(QFocusEvent* ev);
+ virtual void focusOutEvent(TQFocusEvent* ev);
/**
* set the widgets text area based on the item with the given @a id.
*/
- virtual void setCurrentTextById(const QString& id);
+ virtual void setCurrentTextById(const TQString& id);
public slots:
- virtual void slotItemSelected(const QString& id);
+ virtual void slotItemSelected(const TQString& id);
virtual void setEnabled(bool);
virtual void setDisabled(bool);
@@ -177,20 +178,21 @@ private:
class KMyMoneySecurity : public KMyMoneyCategory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneySecurity(QWidget* parent = 0, const char* name = 0);
+ KMyMoneySecurity(TQWidget* tqparent = 0, const char* name = 0);
virtual ~KMyMoneySecurity();
/**
* overridden for internal reasons, no API change
*/
- void setCurrentText(const QString& txt = QString()) { KMyMoneyCategory::setCurrentText(txt); }
+ void setCurrentText(const TQString& txt = TQString()) { KMyMoneyCategory::setCurrentText(txt); }
protected:
/**
* set the widgets text area based on the item with the given @a id.
*/
- virtual void setCurrentTextById(const QString& id);
+ virtual void setCurrentTextById(const TQString& id);
};
#endif
diff --git a/kmymoney2/widgets/kmymoneychecklistitem.cpp b/kmymoney2/widgets/kmymoneychecklistitem.cpp
index 8992beb..c1b9be9 100644
--- a/kmymoney2/widgets/kmymoneychecklistitem.cpp
+++ b/kmymoney2/widgets/kmymoneychecklistitem.cpp
@@ -18,8 +18,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qfont.h>
-#include <qpainter.h>
+#include <tqfont.h>
+#include <tqpainter.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -31,8 +31,8 @@
#include "kmymoneylistviewitem.h"
#include "../kmymoneyglobalsettings.h"
-KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, const QString& txt, const QString& key, const QString& id, Type type) :
- QCheckListItem(parent, txt, type),
+KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListView* tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type) :
+ TQCheckListItem(tqparent, txt, type),
m_key(key),
m_id(id),
m_isOdd(0),
@@ -43,8 +43,8 @@ KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, const QString& t
m_key = txt;
}
-KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListViewItem* parent, const QString& txt, const QString& key, const QString& id, Type type) :
- QCheckListItem(parent, txt, type),
+KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListViewItem* tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type) :
+ TQCheckListItem(tqparent, txt, type),
m_key(key),
m_id(id),
m_isOdd(0),
@@ -55,8 +55,8 @@ KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListViewItem* parent, const QStrin
m_key = txt;
}
-KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, QListViewItem* after, const QString& txt, const QString& key, const QString& id, Type type) :
- QCheckListItem(parent, after, txt, type),
+KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, const TQString& key, const TQString& id, Type type) :
+ TQCheckListItem(tqparent, after, txt, type),
m_key(key),
m_id(id),
m_isOdd(0),
@@ -71,7 +71,7 @@ KMyMoneyCheckListItem::~KMyMoneyCheckListItem()
{
}
-QString KMyMoneyCheckListItem::key(int column, bool ascending) const
+TQString KMyMoneyCheckListItem::key(int column, bool ascending) const
{
Q_UNUSED(ascending);
@@ -85,20 +85,20 @@ void KMyMoneyCheckListItem::stateChange(bool state)
emit stateChanged(state);
}
-void KMyMoneyCheckListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KMyMoneyCheckListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{
- QColorGroup _cg = cg;
- _cg.setColor(QColorGroup::Base, backgroundColor());
+ TQColorGroup _cg = cg;
+ _cg.setColor(TQColorGroup::Base, backgroundColor());
// write the groups in bold
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold(!isSelectable());
p->setFont(f);
- QCheckListItem::paintCell(p, _cg, column, width, alignment);
+ TQCheckListItem::paintCell(p, _cg, column, width, tqalignment);
}
-const QColor KMyMoneyCheckListItem::backgroundColor()
+const TQColor KMyMoneyCheckListItem::backgroundColor()
{
return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor();
}
@@ -118,15 +118,15 @@ bool KMyMoneyCheckListItem::isAlternate(void)
KMyMoneyCheckListItem* clItem;
KMyMoneyListViewItem* liItem;
bool previous = true;
- if(QListViewItem::parent()) {
- clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent());
- liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent());
+ if(TQListViewItem::tqparent()) {
+ clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent());
+ liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent());
if(clItem)
previous = clItem->m_isOdd;
else
previous = liItem->m_isOdd;
- clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()->firstChild());
- liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()->firstChild());
+ clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()->firstChild());
+ liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()->firstChild());
} else {
clItem = dynamic_cast<KMyMoneyCheckListItem *>(listView()->firstChild());
liItem = dynamic_cast<KMyMoneyListViewItem*>(listView()->firstChild());
diff --git a/kmymoney2/widgets/kmymoneychecklistitem.h b/kmymoney2/widgets/kmymoneychecklistitem.h
index 6a22ec9..34776ce 100644
--- a/kmymoney2/widgets/kmymoneychecklistitem.h
+++ b/kmymoney2/widgets/kmymoneychecklistitem.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qobject.h>
-#include <qlistview.h>
+#include <tqobject.h>
+#include <tqlistview.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -33,34 +33,35 @@
class KMyMoneyListViewItem;
/**
- * This class implements a derived version of a QCheckListItem that
+ * This class implements a derived version of a TQCheckListItem that
* allows the storage of an engine object id with the object and emits
* a signal upon state change.
*
* @author Thomas Baumgart
*/
-class KMyMoneyCheckListItem : public QObject, public QCheckListItem
+class KMyMoneyCheckListItem : public TQObject, public TQCheckListItem
{
friend class KMyMoneyListViewItem;
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyCheckListItem(QListView *parent, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox);
- KMyMoneyCheckListItem(QListView *parent, QListViewItem* after, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox);
- KMyMoneyCheckListItem(QListViewItem *parent, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox);
+ KMyMoneyCheckListItem(TQListView *tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox);
+ KMyMoneyCheckListItem(TQListView *tqparent, TQListViewItem* after, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox);
+ KMyMoneyCheckListItem(TQListViewItem *tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox);
~KMyMoneyCheckListItem();
- const QString& id(void) const { return m_id; };
+ const TQString& id(void) const { return m_id; };
/**
* use my own paint method
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment);
/**
* use my own backgroundColor method
*/
- const QColor backgroundColor();
+ const TQColor backgroundColor();
/**
* see KListViewItem::isAlternate()
@@ -73,7 +74,7 @@ public:
* the constructor concatenated with the value returned by text(0) is returned. For @a column
* equals to 1, the @a key as passed to the constructor except the first character is returned.
*/
- QString key(int column, bool ascending) const;
+ TQString key(int column, bool ascending) const;
signals:
void stateChanged(bool);
@@ -82,8 +83,8 @@ protected:
virtual void stateChange(bool);
private:
- QString m_key;
- QString m_id;
+ TQString m_key;
+ TQString m_id;
// copied from KListViewItem()
unsigned int m_isOdd : 1;
unsigned int m_isKnown : 1;
diff --git a/kmymoney2/widgets/kmymoneycombo.cpp b/kmymoney2/widgets/kmymoneycombo.cpp
index 8bbec10..387929f 100644
--- a/kmymoney2/widgets/kmymoneycombo.cpp
+++ b/kmymoney2/widgets/kmymoneycombo.cpp
@@ -18,10 +18,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qrect.h>
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qapplication.h>
+#include <tqrect.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,7 +43,7 @@
#include <kmymoney/mymoneyscheduled.h>
#include "../kmymoneyutils.h"
-KMyMoneyCombo::KMyMoneyCombo(QWidget *w, const char *name) :
+KMyMoneyCombo::KMyMoneyCombo(TQWidget *w, const char *name) :
KComboBox(w, name),
m_completion(0),
m_edit(0),
@@ -52,7 +52,7 @@ KMyMoneyCombo::KMyMoneyCombo(QWidget *w, const char *name) :
{
}
-KMyMoneyCombo::KMyMoneyCombo(bool rw, QWidget *w, const char *name) :
+KMyMoneyCombo::KMyMoneyCombo(bool rw, TQWidget *w, const char *name) :
KComboBox(rw, w, name),
m_completion(0),
m_edit(0),
@@ -65,17 +65,17 @@ KMyMoneyCombo::KMyMoneyCombo(bool rw, QWidget *w, const char *name) :
}
}
-void KMyMoneyCombo::setCurrentTextById(const QString& id)
+void KMyMoneyCombo::setCurrentTextById(const TQString& id)
{
setCurrentText();
if(!id.isEmpty()) {
- QListViewItem* item = selector()->item(id);
+ TQListViewItem* item = selector()->item(id);
if(item)
setCurrentText(item->text(0));
}
}
-void KMyMoneyCombo::slotItemSelected(const QString& id)
+void KMyMoneyCombo::slotItemSelected(const TQString& id)
{
if(editable()) {
bool blocked = signalsBlocked();
@@ -110,37 +110,37 @@ void KMyMoneyCombo::setEditable(bool y)
}
}
-void KMyMoneyCombo::setHint(const QString& hint) const
+void KMyMoneyCombo::setHint(const TQString& hint) const
{
if(m_edit)
m_edit->setHint(hint);
}
-void KMyMoneyCombo::paintEvent(QPaintEvent* ev)
+void KMyMoneyCombo::paintEvent(TQPaintEvent* ev)
{
KComboBox::paintEvent(ev);
// if we don't have an edit field, we need to paint the text onto the button
if(!m_edit) {
if(m_completion) {
- QStringList list;
+ TQStringList list;
selector()->selectedItems(list);
if(!list.isEmpty()) {
- QString str = selector()->item(list[0])->text(0);
+ TQString str = selector()->item(list[0])->text(0);
// we only paint, if the text is longer than 1 char. Assumption
// is that length 1 is the blank case so no need to do painting
if(str.length() > 1) {
- QPainter p( this );
- const QColorGroup & g = colorGroup();
+ TQPainter p( this );
+ const TQColorGroup & g = tqcolorGroup();
p.setPen(g.text());
- QRect re = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxEditField );
- re = QStyle::visualRect(re, this);
+ TQRect re = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxEditField );
+ re = TQStyle::tqvisualRect(re, this);
p.setClipRect( re );
p.save();
p.setFont(font());
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
int x = re.x(), y = re.y() + fm.ascent();
p.drawText( x, y, str );
p.restore();
@@ -150,7 +150,7 @@ void KMyMoneyCombo::paintEvent(QPaintEvent* ev)
}
}
-void KMyMoneyCombo::setPaletteBackgroundColor(const QColor& color)
+void KMyMoneyCombo::setPaletteBackgroundColor(const TQColor& color)
{
KComboBox::setPaletteBackgroundColor(color);
if(m_edit) {
@@ -158,10 +158,10 @@ void KMyMoneyCombo::setPaletteBackgroundColor(const QColor& color)
}
}
-void KMyMoneyCombo::mousePressEvent(QMouseEvent *e)
+void KMyMoneyCombo::mousePressEvent(TQMouseEvent *e)
{
- // mostly copied from QCombo::mousePressEvent() and adjusted for our needs
- if(e->button() != LeftButton)
+ // mostly copied from TQCombo::mousePressEvent() and adjusted for our needs
+ if(e->button() != Qt::LeftButton)
return;
if(((!editable() || isInArrowArea(mapToGlobal(e->pos()))) && selector()->itemList().count()) && !m_completion->isVisible()) {
@@ -178,24 +178,24 @@ void KMyMoneyCombo::mousePressEvent(QMouseEvent *e)
}
}
-bool KMyMoneyCombo::isInArrowArea(const QPoint& pos) const
+bool KMyMoneyCombo::isInArrowArea(const TQPoint& pos) const
{
- QRect arrowRect = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxArrow);
- arrowRect = QStyle::visualRect(arrowRect, this);
+ TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxArrow);
+ arrowRect = TQStyle::tqvisualRect(arrowRect, this);
// Correction for motif style, where arrow is smaller
// and thus has a rect that doesn't fit the button.
- arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
+ arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
// if the button is not editable, it covers the whole widget
if(!editable())
arrowRect = rect();
- return arrowRect.contains(mapFromGlobal(pos));
+ return arrowRect.tqcontains(mapFromGlobal(pos));
}
-void KMyMoneyCombo::keyPressEvent(QKeyEvent* e)
+void KMyMoneyCombo::keyPressEvent(TQKeyEvent* e)
{
if((e->key() == Key_F4 && e->state() == 0 ) ||
(e->key() == Key_Down && (e->state() & AltButton)) ||
@@ -211,19 +211,19 @@ void KMyMoneyCombo::keyPressEvent(QKeyEvent* e)
void KMyMoneyCombo::connectNotify(const char* signal)
{
- if(signal && !strcmp(signal, SIGNAL(createItem(const QString&,QString&)))) {
+ if(signal && !strcmp(signal, TQT_SIGNAL(createItem(const TQString&,TQString&)))) {
m_canCreateObjects = true;
}
}
void KMyMoneyCombo::disconnectNotify(const char* signal)
{
- if(signal && !strcmp(signal, SIGNAL(createItem(const QString&,QString&)))) {
+ if(signal && !strcmp(signal, TQT_SIGNAL(createItem(const TQString&,TQString&)))) {
m_canCreateObjects = false;
}
}
-void KMyMoneyCombo::focusOutEvent(QFocusEvent* e)
+void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e)
{
if(m_inFocusOutEvent) {
KComboBox::focusOutEvent(e);
@@ -233,8 +233,8 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e)
m_inFocusOutEvent = true;
if(editable() && !currentText().isEmpty()) {
if(m_canCreateObjects) {
- if(!m_completion->selector()->contains(currentText())) {
- QString id;
+ if(!m_completion->selector()->tqcontains(currentText())) {
+ TQString id;
// annouce that we go into a possible dialog to create an object
// This can be used by upstream widgets to disable filters etc.
emit objectCreation(true);
@@ -254,8 +254,8 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e)
// else if we cannot create objects, and the current text is not
// in the list, then we clear the text and the selection.
- } else if(!m_completion->selector()->contains(currentText())) {
- setCurrentText(QString());
+ } else if(!m_completion->selector()->tqcontains(currentText())) {
+ setCurrentText(TQString());
}
}
@@ -263,11 +263,11 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e)
// force update of hint and id if there is no text in the widget
if(editable() && currentText().isEmpty()) {
- QString id = m_id;
- m_id = QString();
+ TQString id = m_id;
+ m_id = TQString();
if(!id.isEmpty())
emit itemSelected(m_id);
- repaint();
+ tqrepaint();
}
m_inFocusOutEvent = false;
}
@@ -282,12 +282,12 @@ kMyMoneyCompletion* KMyMoneyCombo::completion(void) const
return m_completion;
}
-void KMyMoneyCombo::selectedItem(QString& id) const
+void KMyMoneyCombo::selectedItem(TQString& id) const
{
id = m_id;
}
-void KMyMoneyCombo::selectedItems(QStringList& list) const
+void KMyMoneyCombo::selectedItems(TQStringList& list) const
{
if(lineEdit() && lineEdit()->text().length() == 0) {
list.clear();
@@ -296,7 +296,7 @@ void KMyMoneyCombo::selectedItems(QStringList& list) const
}
}
-void KMyMoneyCombo::setSelectedItem(const QString& id)
+void KMyMoneyCombo::setSelectedItem(const TQString& id)
{
m_completion->selector()->setSelected(id, true);
blockSignals(true);
@@ -305,54 +305,54 @@ void KMyMoneyCombo::setSelectedItem(const QString& id)
update();
}
-QSize KMyMoneyCombo::sizeHint() const
+TQSize KMyMoneyCombo::tqsizeHint() const
{
- return KComboBox::sizeHint();
+ return KComboBox::tqsizeHint();
// I wanted to use the code below to adjust the size of the combo box
- // according to the largest item in the selector list. Apparently that
+ // according to the largest item in the selector list. Aptqparently that
// does not work too well in the enter and edit schedule dialog for
// the category combo box. So we just use the standard implementation for now.
#if 0
constPolish();
int i, w;
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
- int maxW = count() ? 18 : 7 * fm.width(QChar('x')) + 18;
- int maxH = QMAX( fm.lineSpacing(), 14 ) + 2;
+ int maxW = count() ? 18 : 7 * fm.width(TQChar('x')) + 18;
+ int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2;
w = selector()->optimizedWidth();
if ( w > maxW )
maxW = w;
- QSize sizeHint = (style().sizeFromContents(QStyle::CT_ComboBox, this,
- QSize(maxW, maxH)).
- expandedTo(QApplication::globalStrut()));
+ TQSize tqsizeHint = (style().sizeFromContents(TQStyle::CT_ComboBox, this,
+ TQSize(maxW, maxH)).
+ expandedTo(TQApplication::globalStrut()));
- return sizeHint;
+ return tqsizeHint;
#endif
}
-KMyMoneyReconcileCombo::KMyMoneyReconcileCombo(QWidget* w, const char* name) :
+KMyMoneyReconcileCombo::KMyMoneyReconcileCombo(TQWidget* w, const char* name) :
KMyMoneyCombo(false, w, name)
{
m_completion = new kMyMoneyCompletion(this, 0);
- // connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SIGNAL(itemSelected(const QString&)));
+ // connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SIGNAL(itemSelected(const TQString&)));
// add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details)
- // selector()->newTopItem(i18n("Frozen"), QString(), "F");
- selector()->newTopItem(i18n("Reconciled"), QString(), "R");
- selector()->newTopItem(i18n("Cleared"), QString(), "C");
- selector()->newTopItem(i18n("Not reconciled"), QString(), " ");
- selector()->newTopItem(" ", QString(), "U");
+ // selector()->newTopItem(i18n("Frozen"), TQString(), "F");
+ selector()->newTopItem(i18n("Reconciled"), TQString(), "R");
+ selector()->newTopItem(i18n("Cleared"), TQString(), "C");
+ selector()->newTopItem(i18n("Not reconciled"), TQString(), " ");
+ selector()->newTopItem(" ", TQString(), "U");
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetState(const QString&)));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetState(const TQString&)));
}
-void KMyMoneyReconcileCombo::slotSetState(const QString& state)
+void KMyMoneyReconcileCombo::slotSetState(const TQString& state)
{
setSelectedItem(state);
}
@@ -364,7 +364,7 @@ void KMyMoneyReconcileCombo::removeDontCare(void)
void KMyMoneyReconcileCombo::setState(MyMoneySplit::reconcileFlagE state)
{
- QString id;
+ TQString id;
switch(state) {
case MyMoneySplit::NotReconciled:
id = " ";
@@ -392,7 +392,7 @@ MyMoneySplit::reconcileFlagE KMyMoneyReconcileCombo::state(void) const
{
MyMoneySplit::reconcileFlagE state = MyMoneySplit::NotReconciled;
- QStringList list;
+ TQStringList list;
selector()->selectedItems(list);
if(!list.isEmpty()) {
if(list[0] == "C")
@@ -408,28 +408,28 @@ MyMoneySplit::reconcileFlagE KMyMoneyReconcileCombo::state(void) const
}
-KMyMoneyComboAction::KMyMoneyComboAction(QWidget* w, const char* name) :
+KMyMoneyComboAction::KMyMoneyComboAction(TQWidget* w, const char* name) :
KMyMoneyCombo(false, w, name)
{
m_completion = new kMyMoneyCompletion(this, 0);
- QString num;
+ TQString num;
// add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details)
- selector()->newTopItem(i18n("ATM"), QString(), num.setNum(KMyMoneyRegister::ActionAtm));
- selector()->newTopItem(i18n("Withdrawal"), QString(), num.setNum(KMyMoneyRegister::ActionWithdrawal));
- selector()->newTopItem(i18n("Transfer"), QString(), num.setNum(KMyMoneyRegister::ActionTransfer));
- selector()->newTopItem(i18n("Deposit"), QString(), num.setNum(KMyMoneyRegister::ActionDeposit));
- selector()->newTopItem(i18n("Cheque"), QString(), num.setNum(KMyMoneyRegister::ActionCheck));
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetAction(const QString&)));
+ selector()->newTopItem(i18n("ATM"), TQString(), num.setNum(KMyMoneyRegister::ActionAtm));
+ selector()->newTopItem(i18n("Withdrawal"), TQString(), num.setNum(KMyMoneyRegister::ActionWithdrawal));
+ selector()->newTopItem(i18n("Transfer"), TQString(), num.setNum(KMyMoneyRegister::ActionTransfer));
+ selector()->newTopItem(i18n("Deposit"), TQString(), num.setNum(KMyMoneyRegister::ActionDeposit));
+ selector()->newTopItem(i18n("Cheque"), TQString(), num.setNum(KMyMoneyRegister::ActionCheck));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetAction(const TQString&)));
}
void KMyMoneyComboAction::protectItem(int id, bool protect)
{
- QString num;
+ TQString num;
selector()->protectItem(num.setNum(id), protect);
}
-void KMyMoneyComboAction::slotSetAction(const QString& act)
+void KMyMoneyComboAction::slotSetAction(const TQString& act)
{
setSelectedItem(act);
update();
@@ -442,14 +442,14 @@ void KMyMoneyComboAction::setAction(int action)
kdDebug(2) << "KMyMoneyComboAction::slotSetAction(" << action << ") invalid. Replaced with 2\n";
action = 2;
}
- QString act;
+ TQString act;
act.setNum(action);
setSelectedItem(act);
}
int KMyMoneyComboAction::action(void) const
{
- QStringList list;
+ TQStringList list;
selector()->selectedItems(list);
if(!list.isEmpty()) {
return list[0].toInt();
@@ -458,35 +458,35 @@ int KMyMoneyComboAction::action(void) const
return 0;
}
-KMyMoneyCashFlowCombo::KMyMoneyCashFlowCombo(QWidget* w, const char* name, MyMoneyAccount::accountTypeE accountType) :
+KMyMoneyCashFlowCombo::KMyMoneyCashFlowCombo(TQWidget* w, const char* name, MyMoneyAccount::accountTypeE accountType) :
KMyMoneyCombo(false, w, name)
{
m_completion = new kMyMoneyCompletion(this, 0);
- QString num;
+ TQString num;
// add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details)
if(accountType == MyMoneyAccount::Income || accountType == MyMoneyAccount::Expense) {
// this is used for income/expense accounts to just show the reverse sense
- selector()->newTopItem(i18n("Activity for expense categories", "Paid"), QString(), num.setNum(KMyMoneyRegister::Deposit));
- selector()->newTopItem(i18n("Activity for income categories", "Received"), QString(), num.setNum(KMyMoneyRegister::Payment));
+ selector()->newTopItem(i18n("Activity for expense categories", "Paid"), TQString(), num.setNum(KMyMoneyRegister::Deposit));
+ selector()->newTopItem(i18n("Activity for income categories", "Received"), TQString(), num.setNum(KMyMoneyRegister::Payment));
} else {
- selector()->newTopItem(i18n("From"), QString(), num.setNum(KMyMoneyRegister::Deposit));
- selector()->newTopItem(i18n("Pay to"), QString(), num.setNum(KMyMoneyRegister::Payment));
+ selector()->newTopItem(i18n("From"), TQString(), num.setNum(KMyMoneyRegister::Deposit));
+ selector()->newTopItem(i18n("Pay to"), TQString(), num.setNum(KMyMoneyRegister::Payment));
}
- selector()->newTopItem(" ", QString(), num.setNum(KMyMoneyRegister::Unknown));
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetDirection(const QString&)));
+ selector()->newTopItem(" ", TQString(), num.setNum(KMyMoneyRegister::Unknown));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetDirection(const TQString&)));
}
void KMyMoneyCashFlowCombo::setDirection(KMyMoneyRegister::CashFlowDirection dir)
{
m_dir = dir;
- QString num;
+ TQString num;
setSelectedItem(num.setNum(dir));
}
-void KMyMoneyCashFlowCombo::slotSetDirection(const QString& id)
+void KMyMoneyCashFlowCombo::slotSetDirection(const TQString& id)
{
- QString num;
+ TQString num;
for(int i = KMyMoneyRegister::Deposit; i <= KMyMoneyRegister::Unknown; ++i) {
num.setNum(i);
if(num == id) {
@@ -500,41 +500,41 @@ void KMyMoneyCashFlowCombo::slotSetDirection(const QString& id)
void KMyMoneyCashFlowCombo::removeDontCare(void)
{
- QString num;
+ TQString num;
selector()->removeItem(num.setNum(KMyMoneyRegister::Unknown));
}
-KMyMoneyActivityCombo::KMyMoneyActivityCombo(QWidget* w, const char* name) :
+KMyMoneyActivityCombo::KMyMoneyActivityCombo(TQWidget* w, const char* name) :
KMyMoneyCombo(false, w, name),
m_activity(MyMoneySplit::UnknownTransactionType)
{
m_completion = new kMyMoneyCompletion(this, 0);
- QString num;
+ TQString num;
// add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details)
- selector()->newTopItem(i18n("Split shares"), QString(), num.setNum(MyMoneySplit::SplitShares));
- selector()->newTopItem(i18n("Remove shares"), QString(), num.setNum(MyMoneySplit::RemoveShares));
- selector()->newTopItem(i18n("Add shares"), QString(), num.setNum(MyMoneySplit::AddShares));
- selector()->newTopItem(i18n("Yield"), QString(), num.setNum(MyMoneySplit::Yield));
- selector()->newTopItem(i18n("Reinvest dividend"), QString(), num.setNum(MyMoneySplit::ReinvestDividend));
- selector()->newTopItem(i18n("Dividend"), QString(), num.setNum(MyMoneySplit::Dividend));
- selector()->newTopItem(i18n("Sell shares"), QString(), num.setNum(MyMoneySplit::SellShares));
- selector()->newTopItem(i18n("Buy shares"), QString(), num.setNum(MyMoneySplit::BuyShares));
+ selector()->newTopItem(i18n("Split shares"), TQString(), num.setNum(MyMoneySplit::SplitShares));
+ selector()->newTopItem(i18n("Remove shares"), TQString(), num.setNum(MyMoneySplit::RemoveShares));
+ selector()->newTopItem(i18n("Add shares"), TQString(), num.setNum(MyMoneySplit::AddShares));
+ selector()->newTopItem(i18n("Yield"), TQString(), num.setNum(MyMoneySplit::Yield));
+ selector()->newTopItem(i18n("Reinvest dividend"), TQString(), num.setNum(MyMoneySplit::ReinvestDividend));
+ selector()->newTopItem(i18n("Dividend"), TQString(), num.setNum(MyMoneySplit::Dividend));
+ selector()->newTopItem(i18n("Sell shares"), TQString(), num.setNum(MyMoneySplit::SellShares));
+ selector()->newTopItem(i18n("Buy shares"), TQString(), num.setNum(MyMoneySplit::BuyShares));
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetActivity(const QString&)));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetActivity(const TQString&)));
}
void KMyMoneyActivityCombo::setActivity(MyMoneySplit::investTransactionTypeE activity)
{
m_activity = activity;
- QString num;
+ TQString num;
setSelectedItem(num.setNum(activity));
}
-void KMyMoneyActivityCombo::slotSetActivity(const QString& id)
+void KMyMoneyActivityCombo::slotSetActivity(const TQString& id)
{
- QString num;
+ TQString num;
for(int i = MyMoneySplit::BuyShares; i <= MyMoneySplit::SplitShares; ++i) {
num.setNum(i);
if(num == id) {
@@ -546,57 +546,57 @@ void KMyMoneyActivityCombo::slotSetActivity(const QString& id)
update();
}
-KMyMoneyPayeeCombo::KMyMoneyPayeeCombo(QWidget* parent, const char * name) :
- KMyMoneyCombo(true, parent, name)
+KMyMoneyPayeeCombo::KMyMoneyPayeeCombo(TQWidget* tqparent, const char * name) :
+ KMyMoneyCombo(true, tqparent, name)
{
m_completion = new kMyMoneyCompletion(this);
// set to ascending sort
selector()->listView()->setSorting(0);
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(textChanged(const QString&)), m_completion, SLOT(slotMakeCompletion(const QString&)));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), m_completion, TQT_SLOT(slotMakeCompletion(const TQString&)));
}
-void KMyMoneyPayeeCombo::loadPayees(const QValueList<MyMoneyPayee>& list)
+void KMyMoneyPayeeCombo::loadPayees(const TQValueList<MyMoneyPayee>& list)
{
selector()->listView()->clear();
- QValueList<MyMoneyPayee>::const_iterator it;
+ TQValueList<MyMoneyPayee>::const_iterator it;
for(it = list.begin(); it != list.end(); ++it) {
- selector()->newTopItem((*it).name(), QString(), (*it).id());
+ selector()->newTopItem((*it).name(), TQString(), (*it).id());
}
}
class KMyMoneyGeneralCombo::Private {
public:
- QMap<QString, int> m_strings;
- void insertItem(const QString& s, int id) { m_strings[s] = id; }
+ TQMap<TQString, int> m_strings;
+ void insertItem(const TQString& s, int id) { m_strings[s] = id; }
- int itemId(const QString& s) const {
- QMap<QString, int>::const_iterator it;
- it = m_strings.find(s);
+ int itemId(const TQString& s) const {
+ TQMap<TQString, int>::const_iterator it;
+ it = m_strings.tqfind(s);
if(it != m_strings.end())
return *it;
return -1;
}
- const QString& itemText(int id) {
- QMap<QString, int>::const_iterator it;
+ const TQString& itemText(int id) {
+ TQMap<TQString, int>::const_iterator it;
for(it = m_strings.begin(); it != m_strings.end(); ++it) {
if(*it == id) {
return it.key();
}
}
- return QString::null;
+ return TQString();
}
};
-KMyMoneyGeneralCombo::KMyMoneyGeneralCombo(QWidget* w, const char* name) :
+KMyMoneyGeneralCombo::KMyMoneyGeneralCombo(TQWidget* w, const char* name) :
KComboBox(w, name),
d(new Private)
{
- connect(this, SIGNAL(highlighted(int)), this, SLOT(slotChangeItem(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotChangeItem(int)));
}
KMyMoneyGeneralCombo::~KMyMoneyGeneralCombo()
@@ -616,7 +616,7 @@ int KMyMoneyGeneralCombo::item(void) const
void KMyMoneyGeneralCombo::setCurrentItem(int id)
{
- const QString& txt = d->itemText(id);
+ const TQString& txt = d->itemText(id);
for(int idx = 0; idx < count(); ++idx) {
if(txt == text(idx)) {
KComboBox::setCurrentItem(idx);
@@ -636,7 +636,7 @@ void KMyMoneyGeneralCombo::clear(void)
KComboBox::clear();
}
-void KMyMoneyGeneralCombo::insertItem(const QString& txt, int id, int idx)
+void KMyMoneyGeneralCombo::insertItem(const TQString& txt, int id, int idx)
{
d->insertItem(txt, id);
KComboBox::insertItem(txt, idx);
@@ -644,7 +644,7 @@ void KMyMoneyGeneralCombo::insertItem(const QString& txt, int id, int idx)
void KMyMoneyGeneralCombo::removeItem(int id)
{
- const QString& txt = d->itemText(id);
+ const TQString& txt = d->itemText(id);
for(int idx = 0; idx < count(); ++idx) {
if(txt == text(idx)) {
KComboBox::removeItem(idx);
@@ -658,8 +658,8 @@ void KMyMoneyGeneralCombo::slotChangeItem(int idx)
emit itemSelected(d->itemId(text(idx)));
}
-KMyMoneyPeriodCombo::KMyMoneyPeriodCombo(QWidget* parent, const char* name) :
- KMyMoneyGeneralCombo(parent, name)
+KMyMoneyPeriodCombo::KMyMoneyPeriodCombo(TQWidget* tqparent, const char* name) :
+ KMyMoneyGeneralCombo(tqparent, name)
{
insertItem(i18n("All dates"), MyMoneyTransactionFilter::allDates);
insertItem(i18n("As of today"), MyMoneyTransactionFilter::asOfToday);
@@ -704,28 +704,28 @@ MyMoneyTransactionFilter::dateOptionE KMyMoneyPeriodCombo::currentItem(void) con
return static_cast<MyMoneyTransactionFilter::dateOptionE>(KMyMoneyGeneralCombo::currentItem());
}
-QDate KMyMoneyPeriodCombo::start(MyMoneyTransactionFilter::dateOptionE id)
+TQDate KMyMoneyPeriodCombo::start(MyMoneyTransactionFilter::dateOptionE id)
{
- QDate start, end;
+ TQDate start, end;
MyMoneyTransactionFilter::translateDateRange(id, start, end);
return start;
}
-QDate KMyMoneyPeriodCombo::end(MyMoneyTransactionFilter::dateOptionE id)
+TQDate KMyMoneyPeriodCombo::end(MyMoneyTransactionFilter::dateOptionE id)
{
- QDate start, end;
+ TQDate start, end;
MyMoneyTransactionFilter::translateDateRange(id, start, end);
return end;
}
#if 0
-void KMyMoneyPeriodCombo::dates(QDate& start, QDate& end, MyMoneyTransactionFilter::dateOptionE id)
+void KMyMoneyPeriodCombo::dates(TQDate& start, TQDate& end, MyMoneyTransactionFilter::dateOptionE id)
{
}
#endif
-KMyMoneyOccurenceCombo::KMyMoneyOccurenceCombo(QWidget* parent, const char* name) :
- KMyMoneyGeneralCombo(parent, name)
+KMyMoneyOccurenceCombo::KMyMoneyOccurenceCombo(TQWidget* tqparent, const char* name) :
+ KMyMoneyGeneralCombo(tqparent, name)
{
}
@@ -734,8 +734,8 @@ MyMoneySchedule::occurenceE KMyMoneyOccurenceCombo::currentItem(void) const
return static_cast<MyMoneySchedule::occurenceE>(KMyMoneyGeneralCombo::currentItem());
}
-KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(QWidget* parent, const char* name) :
- KMyMoneyOccurenceCombo(parent, name)
+KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(TQWidget* tqparent, const char* name) :
+ KMyMoneyOccurenceCombo(tqparent, name)
{
insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE);
insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY);
@@ -745,8 +745,8 @@ KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(QWidget* parent, cons
insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_YEARLY)), MyMoneySchedule::OCCUR_YEARLY);
}
-KMyMoneyFrequencyCombo::KMyMoneyFrequencyCombo(QWidget* parent, const char* name) :
- KMyMoneyOccurenceCombo(parent, name)
+KMyMoneyFrequencyCombo::KMyMoneyFrequencyCombo(TQWidget* tqparent, const char* name) :
+ KMyMoneyOccurenceCombo(tqparent, name)
{
insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE);
insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY);
diff --git a/kmymoney2/widgets/kmymoneycombo.h b/kmymoney2/widgets/kmymoneycombo.h
index c85847d..f889f3e 100644
--- a/kmymoney2/widgets/kmymoneycombo.h
+++ b/kmymoney2/widgets/kmymoneycombo.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtimer.h>
-#include <qmutex.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -51,9 +51,10 @@ class kMyMoneyLineEdit;
class KMyMoneyCombo : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyCombo(QWidget *w = 0, const char *name=0);
- KMyMoneyCombo(bool rw, QWidget *w = 0, const char *name=0);
+ KMyMoneyCombo(TQWidget *w = 0, const char *name=0);
+ KMyMoneyCombo(bool rw, TQWidget *w = 0, const char *name=0);
/**
* This method is used to turn on/off the hint display and to setup the appropriate text.
@@ -62,7 +63,7 @@ public:
*
* @param hint reference to text. If @a hint is empty, no hint will be shown.
*/
- void setHint(const QString& hint) const;
+ void setHint(const TQString& hint) const;
/**
* overridden for internal reasons.
@@ -88,90 +89,90 @@ public:
/**
* This method returns the ids of the currently selected items
*/
- void selectedItems(QStringList& list) const;
+ void selectedItems(TQStringList& list) const;
/**
* This method returns the id of the first selected item.
* Usage makes usually only sense when the selection mode
- * of the associated KMyMoneySelector is QListView::Single.
+ * of the associated KMyMoneySelector is TQListView::Single.
*
* @sa KMyMoneySelector::setSelectionMode()
*
- * @param id reference to QString containing the id. If no item
+ * @param id reference to TQString containing the id. If no item
* is selected id will be empty.
*/
- void selectedItem(QString& id) const KDE_DEPRECATED;
+ void selectedItem(TQString& id) const KDE_DEPRECATED;
/**
* This method returns the id of the first selected item.
* Usage makes usually only sense when the selection mode
- * of the associated KMyMoneySelector is QListView::Single.
+ * of the associated KMyMoneySelector is TQListView::Single.
*
* @sa KMyMoneySelector::setSelectionMode()
*
- * @return reference to QString containing the id. If no item
- * is selected the QString will be empty.
+ * @return reference to TQString containing the id. If no item
+ * is selected the TQString will be empty.
*/
- const QString& selectedItem(void) const { return m_id; }
+ const TQString& selectedItem(void) const { return m_id; }
/**
* This method selects the item with the respective @a id.
*
- * @param id reference to QString containing the id
+ * @param id reference to TQString containing the id
*/
- void setSelectedItem(const QString& id);
+ void setSelectedItem(const TQString& id);
/**
* This method checks if the position @a pos is part of the
* area of the drop down arrow.
*/
- bool isInArrowArea(const QPoint& pos) const;
+ bool isInArrowArea(const TQPoint& pos) const;
void setSuppressObjectCreation(bool suppress) { m_canCreateObjects = !suppress; }
/**
* overridden for internal reasons, no API change
*/
- void setCurrentText(const QString& txt = QString()) { KComboBox::setCurrentText(txt); }
+ void setCurrentText(const TQString& txt = TQString()) { KComboBox::setCurrentText(txt); }
/**
* overridden to set the background color of the lineedit as well
*/
- void setPaletteBackgroundColor(const QColor& color);
+ void setPaletteBackgroundColor(const TQColor& color);
/**
* Overridden to support our own completion box
*/
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
protected slots:
- virtual void slotItemSelected(const QString& id);
+ virtual void slotItemSelected(const TQString& id);
protected:
/**
* reimplemented to support our own popup widget
*/
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
/**
* reimplemented to support our own popup widget
*/
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
/**
* reimplemented to support our own popup widget
*/
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
/**
* reimplemented to support detection of new items
*/
- void focusOutEvent(QFocusEvent* );
+ void focusOutEvent(TQFocusEvent* );
/**
* set the widgets text area based on the item with the given @a id.
*/
- virtual void setCurrentTextById(const QString& id);
+ virtual void setCurrentTextById(const TQString& id);
/**
* Overridden for internal reasons, no API change
@@ -197,16 +198,16 @@ protected:
/**
* The currently selected item
*/
- QString m_id;
+ TQString m_id;
signals:
- void itemSelected(const QString& id);
+ void itemSelected(const TQString& id);
void objectCreation(bool);
- void createItem(const QString&, QString&);
+ void createItem(const TQString&, TQString&);
private:
- QTimer m_timer;
- QMutex m_focusMutex;
+ TQTimer m_timer;
+ TQMutex m_focusMutex;
/**
* Flag to control object creation. Use setSuppressObjectCreation()
* to modify it's setting. Defaults to @a false.
@@ -227,15 +228,16 @@ private:
class KMyMoneyReconcileCombo : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyReconcileCombo(QWidget *w = 0, const char *name=0);
+ KMyMoneyReconcileCombo(TQWidget *w = 0, const char *name=0);
void setState(MyMoneySplit::reconcileFlagE state);
MyMoneySplit::reconcileFlagE state(void) const;
void removeDontCare(void);
protected slots:
- void slotSetState(const QString&);
+ void slotSetState(const TQString&);
};
/**
@@ -248,15 +250,16 @@ protected slots:
class KMyMoneyComboAction : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyComboAction(QWidget *w = 0, const char *name=0);
+ KMyMoneyComboAction(TQWidget *w = 0, const char *name=0);
void setAction(int state);
int action(void) const;
void protectItem(int id, bool protect);
protected slots:
- void slotSetAction(const QString&);
+ void slotSetAction(const TQString&);
signals:
void actionSelected(int);
@@ -270,19 +273,20 @@ signals:
class KMyMoneyCashFlowCombo : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a combo box that contains the entries "Pay to", "From" and
* " " for don't care.
*/
- KMyMoneyCashFlowCombo(QWidget *w = 0, const char *name=0, MyMoneyAccount::accountTypeE type = MyMoneyAccount::Asset);
+ KMyMoneyCashFlowCombo(TQWidget *w = 0, const char *name=0, MyMoneyAccount::accountTypeE type = MyMoneyAccount::Asset);
void setDirection(KMyMoneyRegister::CashFlowDirection dir);
KMyMoneyRegister::CashFlowDirection direction(void) const { return m_dir; }
void removeDontCare(void);
protected slots:
- void slotSetDirection(const QString& id);
+ void slotSetDirection(const TQString& id);
signals:
void directionSelected(KMyMoneyRegister::CashFlowDirection);
@@ -299,17 +303,18 @@ private:
class KMyMoneyActivityCombo : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a combo box that contains the entries "Buy", "Sell" etc.
*/
- KMyMoneyActivityCombo(QWidget *w = 0, const char *name=0);
+ KMyMoneyActivityCombo(TQWidget *w = 0, const char *name=0);
void setActivity(MyMoneySplit::investTransactionTypeE activity);
MyMoneySplit::investTransactionTypeE activity(void) const { return m_activity; }
protected slots:
- void slotSetActivity(const QString& id);
+ void slotSetActivity(const TQString& id);
signals:
void activitySelected(MyMoneySplit::investTransactionTypeE);
@@ -327,7 +332,7 @@ private:
* If any match is found a list selection box is opened and the user can use
* the up/down, page-up/page-down keys or the mouse to navigate in the list. If
* a payee is selected, the selection box is closed. Other key-strokes are
- * directed to the parent object to manipulate the text. The visible contents of
+ * directed to the tqparent object to manipulate the text. The visible contents of
* the selection box is updated with every key-stroke.
*
* This object is a replacement of the kMyMoneyPayee object and should be used
@@ -338,20 +343,22 @@ private:
class KMyMoneyPayeeCombo : public KMyMoneyCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyPayeeCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyPayeeCombo(TQWidget* tqparent = 0, const char* name = 0);
- void loadPayees(const QValueList<MyMoneyPayee>& list);
+ void loadPayees(const TQValueList<MyMoneyPayee>& list);
};
class KMyMoneyGeneralCombo : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyGeneralCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyGeneralCombo(TQWidget* tqparent = 0, const char* name = 0);
virtual ~KMyMoneyGeneralCombo();
- void insertItem(const QString& txt, int id, int idx = -1);
+ void insertItem(const TQString& txt, int id, int idx = -1);
void setItem(int id) KDE_DEPRECATED; // replace with setCurrentItem(id)
int item(void) const KDE_DEPRECATED; // replace with currentItem()
@@ -369,7 +376,7 @@ signals:
protected:
// prevent the caller to use the standard KComboBox insertItem function with a default idx
- void insertItem(const QString&);
+ void insertItem(const TQString&);
protected slots:
void slotChangeItem(int idx);
@@ -389,8 +396,9 @@ private:
class KMyMoneyPeriodCombo : public KMyMoneyGeneralCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyPeriodCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyPeriodCombo(TQWidget* tqparent = 0, const char* name = 0);
MyMoneyTransactionFilter::dateOptionE currentItem(void) const;
void setCurrentItem(MyMoneyTransactionFilter::dateOptionE id);
@@ -398,31 +406,32 @@ public:
/**
* This function returns the actual start date for the given
* period definition given by @p id. For user defined periods
- * the returned value is QDate()
+ * the returned value is TQDate()
*/
- static QDate start(MyMoneyTransactionFilter::dateOptionE id);
+ static TQDate start(MyMoneyTransactionFilter::dateOptionE id);
/**
* This function returns the actual end date for the given
* period definition given by @p id. For user defined periods
- * the returned value is QDate()
+ * the returned value is TQDate()
*/
- static QDate end(MyMoneyTransactionFilter::dateOptionE id);
+ static TQDate end(MyMoneyTransactionFilter::dateOptionE id);
- // static void dates(QDate& start, QDate& end, MyMoneyTransactionFilter::dateOptionE id);
+ // static void dates(TQDate& start, TQDate& end, MyMoneyTransactionFilter::dateOptionE id);
};
/**
* This class implements an occurence selector
- * as a parent class for both OccurencePeriod and Frequency combos
+ * as a tqparent class for both OccurencePeriod and Frequency combos
*
* @author Colin Wright
*/
class KMyMoneyOccurenceCombo : public KMyMoneyGeneralCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyOccurenceCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyOccurenceCombo(TQWidget* tqparent = 0, const char* name = 0);
MyMoneySchedule::occurenceE currentItem(void) const;
};
@@ -435,8 +444,9 @@ public:
class KMyMoneyOccurencePeriodCombo : public KMyMoneyOccurenceCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyOccurencePeriodCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyOccurencePeriodCombo(TQWidget* tqparent = 0, const char* name = 0);
};
/**
@@ -446,8 +456,9 @@ public:
class KMyMoneyFrequencyCombo : public KMyMoneyOccurenceCombo
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyFrequencyCombo(QWidget* parent = 0, const char* name = 0);
+ KMyMoneyFrequencyCombo(TQWidget* tqparent = 0, const char* name = 0);
/**
* This method returns the number of events for the selected payment
diff --git a/kmymoney2/widgets/kmymoneycompletion.cpp b/kmymoney2/widgets/kmymoneycompletion.cpp
index f9bc7a3..55e4d75 100644
--- a/kmymoney2/widgets/kmymoneycompletion.cpp
+++ b/kmymoney2/widgets/kmymoneycompletion.cpp
@@ -23,7 +23,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qapplication.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -40,23 +40,23 @@
const int kMyMoneyCompletion::MAX_ITEMS = 16;
-kMyMoneyCompletion::kMyMoneyCompletion(QWidget *parent, const char *name ) :
- QVBox(parent, name, WType_Popup)
+kMyMoneyCompletion::kMyMoneyCompletion(TQWidget *tqparent, const char *name ) :
+ TQVBox(tqparent, name, WType_Popup)
{
m_selector = new KMyMoneySelector(this);
m_selector->listView()->setFocusProxy(this);
- m_parent = parent;
- setFocusProxy((parent) ? parent : (QWidget*) NoFocus);
- setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
+ m_parent = tqparent;
+ setFocusProxy((tqparent) ? tqparent : (TQWidget*) TQ_NoFocus);
+ setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised);
connectSignals(m_selector, m_selector->listView());
}
-void kMyMoneyCompletion::connectSignals(QWidget* widget, KListView* lv)
+void kMyMoneyCompletion::connectSignals(TQWidget* widget, KListView* lv)
{
m_widget = widget;
m_lv = lv;
- connect(lv, SIGNAL(executed(QListViewItem*,const QPoint&,int)), this, SLOT(slotItemSelected(QListViewItem*,const QPoint&,int)));
+ connect(lv, TQT_SIGNAL(executed(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(slotItemSelected(TQListViewItem*,const TQPoint&,int)));
}
kMyMoneyCompletion::~kMyMoneyCompletion()
@@ -65,7 +65,7 @@ kMyMoneyCompletion::~kMyMoneyCompletion()
void kMyMoneyCompletion::adjustSize(void)
{
- QListViewItemIterator it(m_lv, QListViewItemIterator::Visible);
+ TQListViewItemIterator it(m_lv, TQListViewItemIterator::Visible);
int count = 0;
while(it.current()) {
++count;
@@ -76,17 +76,17 @@ void kMyMoneyCompletion::adjustSize(void)
void kMyMoneyCompletion::adjustSize(const int count)
{
- int w = m_widget->sizeHint().width();
+ int w = m_widget->tqsizeHint().width();
if(m_parent && w < m_parent->width())
w = m_parent->width();
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
if(w < fm.maxWidth()*15)
w = fm.maxWidth()*15;
int h = 0;
- QListViewItemIterator it(m_lv, QListViewItemIterator::Visible);
- QListViewItem* item = it.current();
+ TQListViewItemIterator it(m_lv, TQListViewItemIterator::Visible);
+ TQListViewItem* item = it.current();
if(item)
h = item->height() * (count > MAX_ITEMS ? MAX_ITEMS : count);
@@ -99,11 +99,11 @@ void kMyMoneyCompletion::adjustSize(const int count)
// and modified to our local needs
// this is probably better, once kde switches to requiring qt3.1
- // QRect screenSize = QApplication::desktop()->availableGeometry(d->m_parent);
+ // TQRect screenSize = TQApplication::desktop()->availableGeometry(d->m_parent);
// for now use this since it's qt3.0.x-safe
- QRect screenSize = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(m_parent));
+ TQRect screenSize = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(m_parent));
- QPoint orig = m_parent->mapToGlobal( QPoint(0, m_parent->height()) );
+ TQPoint orig = m_parent->mapToGlobal( TQPoint(0, m_parent->height()) );
int x = orig.x();
int y = orig.y();
@@ -133,7 +133,7 @@ void kMyMoneyCompletion::show(bool presetSelected)
if(m_parent) {
m_parent->installEventFilter(this);
// make sure to install the filter for the combobox lineedit as well
- // We have do this here because QObject::installEventFilter() is not
+ // We have do this here because TQObject::installEventFilter() is not
// declared virtual and we have no chance to override it in KMyMoneyCombo
KMyMoneyCombo* c = dynamic_cast<KMyMoneyCombo*>(m_parent);
if(c && c->lineEdit()) {
@@ -141,7 +141,7 @@ void kMyMoneyCompletion::show(bool presetSelected)
}
}
- QVBox::show();
+ TQVBox::show();
}
void kMyMoneyCompletion::hide(void)
@@ -149,37 +149,37 @@ void kMyMoneyCompletion::hide(void)
if(m_parent) {
m_parent->removeEventFilter(this);
// make sure to uninstall the filter for the combobox lineedit as well
- // We have do this here because QObject::installEventFilter() is not
+ // We have do this here because TQObject::installEventFilter() is not
// declared virtual and we have no chance to override it in KMyMoneyCombo
KMyMoneyCombo* c = dynamic_cast<KMyMoneyCombo*>(m_parent);
if(c && c->lineEdit()) {
c->lineEdit()->removeEventFilter(this);
}
}
- QVBox::hide();
+ TQVBox::hide();
}
-bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e)
+bool kMyMoneyCompletion::eventFilter(TQObject* o, TQEvent* e)
{
int type = e->type();
KMyMoneyCombo *c = dynamic_cast<KMyMoneyCombo*>(m_parent);
- QListViewItem* item;
- if(o == m_parent || (c && o == c->lineEdit())) {
+ TQListViewItem* item;
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_parent) || (c && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(c->lineEdit()))) {
if(isVisible()) {
- if(type == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*> (e);
- QKeyEvent evt(QEvent::KeyPress,
- Key_Down, 0, ev->state(), QString::null,
+ if(type == TQEvent::KeyPress) {
+ TQKeyEvent* ev = TQT_TQKEYEVENT (e);
+ TQKeyEvent evt(TQEvent::KeyPress,
+ Key_Down, 0, ev->state(), TQString(),
ev->isAutoRepeat(), ev->count());
- QKeyEvent evbt(QEvent::KeyPress,
- Key_Up, 0, ev->state(), QString::null,
+ TQKeyEvent evbt(TQEvent::KeyPress,
+ Key_Up, 0, ev->state(), TQString(),
ev->isAutoRepeat(), ev->count());
switch(ev->key()) {
case Key_Tab:
case Key_BackTab:
- slotItemSelected(m_lv->currentItem(), QPoint(0,0), 0);
+ slotItemSelected(m_lv->currentItem(), TQPoint(0,0), 0);
break;
case Key_Down:
@@ -222,7 +222,7 @@ bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e)
case Key_Enter:
case Key_Return:
- slotItemSelected(m_lv->currentItem(), QPoint(0,0), 0);
+ slotItemSelected(m_lv->currentItem(), TQPoint(0,0), 0);
ev->accept();
return true;
@@ -264,10 +264,10 @@ bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e)
}
}
}
- return QVBox::eventFilter(o, e);
+ return TQVBox::eventFilter(o, e);
}
-void kMyMoneyCompletion::slotMakeCompletion(const QString& txt)
+void kMyMoneyCompletion::slotMakeCompletion(const TQString& txt)
{
int cnt = selector()->slotMakeCompletion(txt.stripWhiteSpace());
@@ -282,11 +282,11 @@ void kMyMoneyCompletion::slotMakeCompletion(const QString& txt)
}
}
-void kMyMoneyCompletion::slotItemSelected(QListViewItem *item, const QPoint&, int)
+void kMyMoneyCompletion::slotItemSelected(TQListViewItem *item, const TQPoint&, int)
{
KMyMoneyListViewItem* it_v = static_cast<KMyMoneyListViewItem*>(item);
if(it_v && it_v->isSelectable()) {
- QString id = it_v->id();
+ TQString id = it_v->id();
// hide the widget, so we can debug the slots that are connect
// to the signal we emit very soon
hide();
@@ -295,7 +295,7 @@ void kMyMoneyCompletion::slotItemSelected(QListViewItem *item, const QPoint&, in
}
}
-void kMyMoneyCompletion::setSelected(const QString& id)
+void kMyMoneyCompletion::setSelected(const TQString& id)
{
m_id = id;
m_selector->setSelected(id, true);
diff --git a/kmymoney2/widgets/kmymoneycompletion.h b/kmymoney2/widgets/kmymoneycompletion.h
index 1efea63..ca83f0b 100644
--- a/kmymoney2/widgets/kmymoneycompletion.h
+++ b/kmymoney2/widgets/kmymoneycompletion.h
@@ -26,10 +26,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qvbox.h>
-#include <qregexp.h>
-class QListViewItem;
+#include <tqwidget.h>
+#include <tqvbox.h>
+#include <tqregexp.h>
+class TQListViewItem;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -45,12 +45,13 @@ class KMyMoneySelector;
* @author Thomas Baumgart
*/
-class kMyMoneyCompletion : public QVBox
+class kMyMoneyCompletion : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyCompletion(QWidget *parent=0, const char *name=0);
+ kMyMoneyCompletion(TQWidget *tqparent=0, const char *name=0);
virtual ~kMyMoneyCompletion();
/**
@@ -70,21 +71,21 @@ public:
*
* @param id id of account to be selected
*/
- void setSelected(const QString& id);
+ void setSelected(const TQString& id);
virtual KMyMoneySelector* selector(void) const { return m_selector; }
public slots:
- void slotMakeCompletion(const QString& txt);
+ void slotMakeCompletion(const TQString& txt);
- void slotItemSelected(QListViewItem *item, const QPoint& pos, int col);
+ void slotItemSelected(TQListViewItem *item, const TQPoint& pos, int col);
protected:
/**
* Reimplemented from kMyMoneyAccountSelector to get events from the viewport (to hide
* this widget on mouse-click, Escape-presses, etc.
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* This method resizes the widget to show a maximum of @p count
@@ -100,20 +101,20 @@ protected:
*/
void adjustSize(void);
- void connectSignals(QWidget *widget, KListView* lv);
+ void connectSignals(TQWidget *widget, KListView* lv);
void show(bool presetSelected);
signals:
- void itemSelected(const QString& id);
+ void itemSelected(const TQString& id);
protected:
- QWidget* m_parent;
- QWidget* m_widget;
- QString m_id;
+ TQWidget* m_parent;
+ TQWidget* m_widget;
+ TQString m_id;
KListView* m_lv;
KMyMoneySelector* m_selector;
- QRegExp m_lastCompletion;
+ TQRegExp m_lastCompletion;
static const int MAX_ITEMS;
diff --git a/kmymoney2/widgets/kmymoneycurrencyselector.cpp b/kmymoney2/widgets/kmymoneycurrencyselector.cpp
index 009dc2b..4b50e4d 100644
--- a/kmymoney2/widgets/kmymoneycurrencyselector.cpp
+++ b/kmymoney2/widgets/kmymoneycurrencyselector.cpp
@@ -23,8 +23,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpixmap.h>
-#include <qbitmap.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,22 +36,22 @@
#include "kmymoneycurrencyselector.h"
-KMyMoneySecuritySelector::KMyMoneySecuritySelector(QWidget *parent, const char *name ) :
- KComboBox(parent, name),
+KMyMoneySecuritySelector::KMyMoneySecuritySelector(TQWidget *tqparent, const char *name ) :
+ KComboBox(tqparent, name),
m_displayItem(FullName),
m_displayOnly(false),
m_displayType(TypeAll)
{
- // update(QString());
+ // update(TQString());
}
-KMyMoneySecuritySelector::KMyMoneySecuritySelector(displayTypeE type, QWidget *parent, const char *name ) :
- KComboBox(parent,name),
+KMyMoneySecuritySelector::KMyMoneySecuritySelector(displayTypeE type, TQWidget *tqparent, const char *name ) :
+ KComboBox(tqparent,name),
m_displayItem(FullName),
m_displayOnly(false),
m_displayType(type)
{
- // update(QString());
+ // update(TQString());
}
KMyMoneySecuritySelector::~KMyMoneySecuritySelector()
@@ -61,13 +61,13 @@ KMyMoneySecuritySelector::~KMyMoneySecuritySelector()
void KMyMoneySecuritySelector::selectDisplayItem(KMyMoneySecuritySelector::displayItemE item)
{
m_displayItem = item;
- update(QString());
+ update(TQString());
}
-void KMyMoneySecuritySelector::update(const QString& id)
+void KMyMoneySecuritySelector::update(const TQString& id)
{
MyMoneySecurity curr = MyMoneyFile::instance()->baseCurrency();
- QString baseCurrency = curr.id();
+ TQString baseCurrency = curr.id();
if(!id.isEmpty())
curr = m_currency;
@@ -82,23 +82,23 @@ void KMyMoneySecuritySelector::update(const QString& id)
// sort
qHeapSort(m_list);
- QValueList<MyMoneySecurity>::ConstIterator it;
+ TQValueList<MyMoneySecurity>::ConstIterator it;
// construct a transparent 16x16 pixmap
- QPixmap empty(16, 16);
- empty.setMask(QBitmap(16, 16, true));
+ TQPixmap empty(16, 16);
+ empty.setMask(TQBitmap(16, 16, true));
int itemId = 0;
int m_selectedItemId = 0;
for(it = m_list.begin(); it != m_list.end(); ++it) {
- QString display;
+ TQString display;
switch(m_displayItem) {
default:
case FullName:
if((*it).isCurrency()) {
- display = QString("%2 (%1)").arg((*it).id()).arg((*it).name());
+ display = TQString("%2 (%1)").tqarg((*it).id()).tqarg((*it).name());
} else
- display = QString("%2 (%1)").arg((*it).tradingSymbol()).arg((*it).name());
+ display = TQString("%2 (%1)").tqarg((*it).tradingSymbol()).tqarg((*it).name());
break;
break;
@@ -110,7 +110,7 @@ void KMyMoneySecuritySelector::update(const QString& id)
break;
}
if((*it).id() == baseCurrency) {
- insertItem(QPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png")),
+ insertItem(TQPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png")),
display, itemId);
} else {
insertItem(empty, display, itemId);
@@ -133,10 +133,10 @@ void KMyMoneySecuritySelector::setDisplayOnly(const bool disp)
switch(disp) {
case true:
- connect(this, SIGNAL(activated(int)), this, SLOT(slotSetInitialCurrency()));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetInitialCurrency()));
break;
case false:
- disconnect(this, SIGNAL(activated(int)), this, SLOT(slotSetInitialCurrency()));
+ disconnect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetInitialCurrency()));
break;
}
m_displayOnly = disp;
@@ -155,11 +155,11 @@ const MyMoneySecurity& KMyMoneySecuritySelector::security(void) const
void KMyMoneySecuritySelector::setSecurity(const MyMoneySecurity& currency)
{
m_currency = currency;
- update(QString("x"));
+ update(TQString("x"));
}
-KMyMoneyCurrencySelector::KMyMoneyCurrencySelector(QWidget *parent, const char *name ) :
- KMyMoneySecuritySelector(TypeCurrencies, parent, name)
+KMyMoneyCurrencySelector::KMyMoneyCurrencySelector(TQWidget *tqparent, const char *name ) :
+ KMyMoneySecuritySelector(TypeCurrencies, tqparent, name)
{
}
diff --git a/kmymoney2/widgets/kmymoneycurrencyselector.h b/kmymoney2/widgets/kmymoneycurrencyselector.h
index e733eb2..00e3af6 100644
--- a/kmymoney2/widgets/kmymoneycurrencyselector.h
+++ b/kmymoney2/widgets/kmymoneycurrencyselector.h
@@ -26,7 +26,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
+#include <tqwidget.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -45,6 +45,7 @@
class KMyMoneySecuritySelector : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
enum displayItemE {
Symbol = 0,
@@ -57,8 +58,8 @@ public:
TypeAll = 0x03
};
- KMyMoneySecuritySelector(QWidget *parent=0, const char *name=0);
- KMyMoneySecuritySelector(displayTypeE type = TypeAll, QWidget *parent=0, const char *name=0);
+ KMyMoneySecuritySelector(TQWidget *tqparent=0, const char *name=0);
+ KMyMoneySecuritySelector(displayTypeE type = TypeAll, TQWidget *tqparent=0, const char *name=0);
virtual ~KMyMoneySecuritySelector();
const MyMoneySecurity& security(void) const;
@@ -66,7 +67,7 @@ public:
void selectDisplayItem(KMyMoneySecuritySelector::displayItemE item);
void setDisplayOnly(const bool disp);
- void update(const QString& id);
+ void update(const TQString& id);
public slots:
void slotSetInitialSecurity(void);
@@ -77,13 +78,13 @@ private:
int m_selectedItemId;
bool m_displayOnly;
displayTypeE m_displayType;
- QValueList<MyMoneySecurity> m_list;
+ TQValueList<MyMoneySecurity> m_list;
};
class KMyMoneyCurrencySelector : public KMyMoneySecuritySelector
{
public:
- KMyMoneyCurrencySelector(QWidget *parent=0, const char *name=0);
+ KMyMoneyCurrencySelector(TQWidget *tqparent=0, const char *name=0);
virtual ~KMyMoneyCurrencySelector() {}
};
diff --git a/kmymoney2/widgets/kmymoneydateinput.cpp b/kmymoney2/widgets/kmymoneydateinput.cpp
index e1b4be8..d0fd547 100644
--- a/kmymoney2/widgets/kmymoneydateinput.cpp
+++ b/kmymoney2/widgets/kmymoneydateinput.cpp
@@ -18,18 +18,18 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qpoint.h>
-#include <qvalidator.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qdesktopwidget.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqpoint.h>
+#include <tqvalidator.h>
+#include <tqtimer.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqdesktopwidget.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -50,47 +50,47 @@ namespace {
const int DATE_POPUP_TIMEOUT = 1500;
}
-bool KMyMoneyDateEdit::event(QEvent* e)
+bool KMyMoneyDateEdit::event(TQEvent* e)
{
// make sure that we keep the current date setting of a kMyMoneyDateInput object
- // across the QDateEdit::event(FocusOutEvent)
+ // across the TQDateEdit::event(FocusOutEvent)
bool rc;
- kMyMoneyDateInput* p = dynamic_cast<kMyMoneyDateInput*>(parentWidget());
- if(e->type() == QEvent::FocusOut && p) {
- QDate d = p->date();
- rc = QDateEdit::event(e);
+ kMyMoneyDateInput* p = dynamic_cast<kMyMoneyDateInput*>(tqparentWidget());
+ if(e->type() == TQEvent::FocusOut && p) {
+ TQDate d = p->date();
+ rc = TQDateEdit::event(e);
if(d.isValid())
d = p->date();
p->loadDate(d);
} else {
- rc = QDateEdit::event(e);
+ rc = TQDateEdit::event(e);
}
return rc;
}
-kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::AlignmentFlags flags)
- : QHBox(parent,name)
+kMyMoneyDateInput::kMyMoneyDateInput(TQWidget *tqparent, const char *name, TQt::AlignmentFlags flags)
+ : TQHBox(tqparent,name)
{
- m_qtalignment = flags;
- m_date = QDate::currentDate();
+ m_qttqalignment = flags;
+ m_date = TQDate::tqcurrentDate();
dateEdit = new KMyMoneyDateEdit(m_date, this, "dateEdit");
setFocusProxy(dateEdit);
- focusWidget()->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events
+ tqfocusWidget()->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events
dateEdit->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events
m_datePopup = new KPassivePopup(dateEdit, "datePopup");
m_datePopup->setTimeout(DATE_POPUP_TIMEOUT);
- m_datePopup->setView(new QLabel(KGlobal::locale()->formatDate(m_date), m_datePopup, "datePopupLabel"));
+ m_datePopup->setView(new TQLabel(KGlobal::locale()->formatDate(m_date), m_datePopup, "datePopupLabel"));
- m_dateFrame = new QVBox(this, 0, WType_Popup);
- m_dateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
+ m_dateFrame = new TQVBox(this, 0, WType_Popup);
+ m_dateFrame->setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised);
m_dateFrame->setLineWidth(3);
m_dateFrame->hide();
- QString dateFormat = KGlobal::locale()->dateFormatShort().lower();
- QString order, separator;
+ TQString dateFormat = KGlobal::locale()->dateFormatShort().lower();
+ TQString order, separator;
for(unsigned i = 0; i < dateFormat.length(); ++i) {
// DD.MM.YYYY is %d.%m.%y
// dD.mM.YYYY is %e.%n.%y
@@ -110,16 +110,16 @@ kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::Alig
// see if we find a known format. If it's unknown, then we use YMD (international)
// set m_focusDatePart to the day position (0-2)
if(order == "mdy") {
- dateEdit->setOrder(QDateEdit::MDY);
+ dateEdit->setOrder(TQDateEdit::MDY);
m_focusDatePart = 1;
} else if(order == "dmy") {
- dateEdit->setOrder(QDateEdit::DMY);
+ dateEdit->setOrder(TQDateEdit::DMY);
m_focusDatePart = 0;
} else if(order == "ydm") {
- dateEdit->setOrder(QDateEdit::YDM);
+ dateEdit->setOrder(TQDateEdit::YDM);
m_focusDatePart = 1;
} else {
- dateEdit->setOrder(QDateEdit::YMD);
+ dateEdit->setOrder(TQDateEdit::YMD);
m_focusDatePart = 2;
separator = '-';
}
@@ -132,46 +132,46 @@ kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::Alig
#endif
// the next line is a try to add an icon to the button
- m_dateButton = new KPushButton(QIconSet(QPixmap(KGlobal::iconLoader()->iconPath("date", -KIcon::SizeSmall))), QString(""), this);
+ m_dateButton = new KPushButton(TQIconSet(TQPixmap(KGlobal::iconLoader()->iconPath("date", -KIcon::SizeSmall))), TQString(""), this);
m_dateButton->setMinimumWidth(30);
- connect(m_dateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
- connect(dateEdit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotDateChosenRef(const QDate&)));
- connect(m_datePicker, SIGNAL(dateSelected(QDate)), this, SLOT(slotDateChosen(QDate)));
- connect(m_datePicker, SIGNAL(dateEntered(QDate)), this, SLOT(slotDateChosen(QDate)));
- connect(m_datePicker, SIGNAL(dateSelected(QDate)), m_dateFrame, SLOT(hide()));
+ connect(m_dateButton,TQT_SIGNAL(clicked()),TQT_SLOT(toggleDatePicker()));
+ connect(dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotDateChosenRef(const TQDate&)));
+ connect(m_datePicker, TQT_SIGNAL(dateSelected(TQDate)), this, TQT_SLOT(slotDateChosen(TQDate)));
+ connect(m_datePicker, TQT_SIGNAL(dateEntered(TQDate)), this, TQT_SLOT(slotDateChosen(TQDate)));
+ connect(m_datePicker, TQT_SIGNAL(dateSelected(TQDate)), m_dateFrame, TQT_SLOT(hide()));
}
-void kMyMoneyDateInput::markAsBadDate(bool bad, const QColor& color)
+void kMyMoneyDateInput::markAsBadDate(bool bad, const TQColor& color)
{
if(dateEdit->focusProxy()) {
- dateEdit->focusProxy()->setPaletteForegroundColor(paletteForegroundColor());
+ TQT_TQWIDGET(dateEdit->focusProxy())->setPaletteForegroundColor(paletteForegroundColor());
if(bad)
- dateEdit->focusProxy()->setPaletteForegroundColor(color);
+ TQT_TQWIDGET(dateEdit->focusProxy())->setPaletteForegroundColor(color);
}
}
void kMyMoneyDateInput::show(void)
{
// don't forget the standard behaviour ;-)
- QHBox::show();
+ TQHBox::show();
// If the widget is shown, the size must be fixed a little later
// to be appropriate. I saw this in some other places and the only
// way to solve this problem is to postpone the setup of the size
// to the time when the widget is on the screen.
- QTimer::singleShot(50, this, SLOT(fixSize()));
+ TQTimer::singleShot(50, this, TQT_SLOT(fixSize()));
}
void kMyMoneyDateInput::fixSize(void)
{
- // According to a hint in the documentation of KDatePicker::sizeHint()
+ // According to a hint in the documentation of KDatePicker::tqsizeHint()
// 28 pixels should be added in each direction to obtain a better
// display of the month button. I decided, (22,14) is good
// enough and save some space on the screen (ipwizard)
- m_dateFrame->setFixedSize(m_datePicker->sizeHint() + QSize(22, 14));
+ m_dateFrame->setFixedSize(m_datePicker->tqsizeHint() + TQSize(22, 14));
- dateEdit->setMinimumWidth(dateEdit->minimumSizeHint().width() + 6);
+ dateEdit->setMinimumWidth(dateEdit->tqminimumSizeHint().width() + 6);
}
kMyMoneyDateInput::~kMyMoneyDateInput()
@@ -191,16 +191,16 @@ void kMyMoneyDateInput::toggleDatePicker()
}
else
{
- QPoint tmpPoint = mapToGlobal(m_dateButton->geometry().bottomRight());
+ TQPoint tmpPoint = mapToGlobal(m_dateButton->tqgeometry().bottomRight());
// usually, the datepicker widget is shown underneath the dateEdit widget
// if it does not fit on the screen, we show it above this widget
- if(tmpPoint.y() + h > QApplication::desktop()->height()) {
+ if(tmpPoint.y() + h > TQApplication::desktop()->height()) {
tmpPoint.setY(tmpPoint.y() - h - m_dateButton->height());
}
- if((m_qtalignment == Qt::AlignRight && tmpPoint.x()+w <= QApplication::desktop()->width())
+ if((m_qttqalignment == TQt::AlignRight && tmpPoint.x()+w <= TQApplication::desktop()->width())
|| (tmpPoint.x()-w < 0) )
{
m_dateFrame->setGeometry(tmpPoint.x()-width(), tmpPoint.y(), w, h);
@@ -217,14 +217,14 @@ void kMyMoneyDateInput::toggleDatePicker()
}
else
{
- m_datePicker->setDate(QDate::currentDate());
+ m_datePicker->setDate(TQDate::tqcurrentDate());
}
m_dateFrame->show();
}
}
-void kMyMoneyDateInput::resizeEvent(QResizeEvent* ev)
+void kMyMoneyDateInput::resizeEvent(TQResizeEvent* ev)
{
m_dateButton->setMaximumHeight(ev->size().height());
m_dateButton->setMaximumWidth(ev->size().height());
@@ -234,12 +234,12 @@ void kMyMoneyDateInput::resizeEvent(QResizeEvent* ev)
}
-/** Overriding QWidget::keyPressEvent
+/** Overriding TQWidget::keyPressEvent
*
* increments/decrements the date upon +/- or Up/Down key input
* sets the date to current date when the 'T' key is pressed
*/
-void kMyMoneyDateInput::keyPressEvent(QKeyEvent * k)
+void kMyMoneyDateInput::keyPressEvent(TQKeyEvent * k)
{
KShortcut today(i18n("Enter todays date into date input widget", "T"));
@@ -255,31 +255,31 @@ void kMyMoneyDateInput::keyPressEvent(QKeyEvent * k)
default:
if(today.contains(KKey(k)) || k->key() == Key_T) {
- slotDateChosen(QDate::currentDate());
+ slotDateChosen(TQDate::tqcurrentDate());
}
break;
}
}
/**
- * This function receives all events that are sent to focusWidget().
+ * This function receives all events that are sent to tqfocusWidget().
* Some KeyPress events are intercepted and passed to keyPressEvent.
- * Otherwise they would be consumed by QDateEdit.
+ * Otherwise they would be consumed by TQDateEdit.
*/
-bool kMyMoneyDateInput::eventFilter(QObject *, QEvent *e)
+bool kMyMoneyDateInput::eventFilter(TQObject *, TQEvent *e)
{
- if (e->type() == QEvent::FocusIn) {
+ if (e->type() == TQEvent::FocusIn) {
m_datePopup->show();
// The cast to the base class is needed since setFocusSection
- // is protected in QDateEdit. This causes some logic in
- // QDateEdit::setFocusSection not to be executed but this does
+ // is protected in TQDateEdit. This causes some logic in
+ // TQDateEdit::setFocusSection not to be executed but this does
// not hurt here, because the widget just receives focus.
- static_cast<QDateTimeEditBase *>(dateEdit)->setFocusSection(m_focusDatePart);
+ static_cast<TQDateTimeEditBase *>(dateEdit)->setFocusSection(m_focusDatePart);
}
- else if (e->type() == QEvent::FocusOut)
+ else if (e->type() == TQEvent::FocusOut)
m_datePopup->hide();
- else if (e->type() == QEvent::KeyPress) {
- if (QKeyEvent *k = dynamic_cast<QKeyEvent*>(e)) {
+ else if (e->type() == TQEvent::KeyPress) {
+ if (TQKeyEvent *k = dynamic_cast<TQKeyEvent*>(e)) {
if (k->key() == Key_Minus) {
keyPressEvent(k);
return true;
@@ -290,13 +290,13 @@ bool kMyMoneyDateInput::eventFilter(QObject *, QEvent *e)
return false; // Don't filter the event
}
-void kMyMoneyDateInput::slotDateChosenRef(const QDate& date)
+void kMyMoneyDateInput::slotDateChosenRef(const TQDate& date)
{
if(date.isValid()) {
emit dateChanged(date);
m_date = date;
- QLabel *lbl = static_cast<QLabel*>(m_datePopup->view());
+ TQLabel *lbl = static_cast<TQLabel*>(m_datePopup->view());
lbl->setText(KGlobal::locale()->formatDate(date));
lbl->adjustSize();
if(m_datePopup->isVisible() || hasFocus())
@@ -304,7 +304,7 @@ void kMyMoneyDateInput::slotDateChosenRef(const QDate& date)
}
}
-void kMyMoneyDateInput::slotDateChosen(QDate date)
+void kMyMoneyDateInput::slotDateChosen(TQDate date)
{
if(date.isValid()) {
// the next line implies a call to slotDateChosenRef() above
@@ -312,17 +312,17 @@ void kMyMoneyDateInput::slotDateChosen(QDate date)
}
}
-QDate kMyMoneyDateInput::date(void) const
+TQDate kMyMoneyDateInput::date(void) const
{
return dateEdit->date();
}
-void kMyMoneyDateInput::setDate(QDate date)
+void kMyMoneyDateInput::setDate(TQDate date)
{
slotDateChosen(date);
}
-void kMyMoneyDateInput::loadDate(const QDate& date)
+void kMyMoneyDateInput::loadDate(const TQDate& date)
{
m_date = m_prevDate = date;
@@ -337,11 +337,11 @@ void kMyMoneyDateInput::resetDate(void)
setDate(m_prevDate);
}
-QWidget* kMyMoneyDateInput::focusWidget(void) const
+TQWidget* kMyMoneyDateInput::tqfocusWidget(void) const
{
- QWidget* w = dateEdit;
+ TQWidget* w = dateEdit;
while(w->focusProxy())
- w = w->focusProxy();
+ w = TQT_TQWIDGET(w->focusProxy());
return w;
}
diff --git a/kmymoney2/widgets/kmymoneydateinput.h b/kmymoney2/widgets/kmymoneydateinput.h
index 4561d63..0093a2d 100644
--- a/kmymoney2/widgets/kmymoneydateinput.h
+++ b/kmymoney2/widgets/kmymoneydateinput.h
@@ -20,11 +20,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qdatetime.h>
-#include <qdatetimeedit.h>
-#include <qvbox.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqdatetime.h>
+#include <tqdatetimeedit.h>
+#include <tqvbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,47 +43,49 @@ class KPassivePopup;
/**
* Provided to be able to catch the focusOut events before the contents gets changed
*/
-class KMyMoneyDateEdit : public QDateEdit
+class KMyMoneyDateEdit : public TQDateEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyDateEdit(const QDate& date, QWidget *parent=0, const char *name=0) : QDateEdit(date, parent, name) {}
+ KMyMoneyDateEdit(const TQDate& date, TQWidget *tqparent=0, const char *name=0) : TQDateEdit(date, tqparent, name) {}
protected:
/** reimplemented for internal reasons */
- bool event(QEvent* e);
+ bool event(TQEvent* e);
};
/**
* This class provides the general widget used for date selection
- * throughout the KMyMoney project. It provides an QDateEdit widget
- * which is based on an edit field with spin boxes and adds a QPushButton
+ * throughout the KMyMoney project. It provides an TQDateEdit widget
+ * which is based on an edit field with spin boxes and adds a TQPushButton
* to open a KDatePicker.
*/
-class kMyMoneyDateInput : public QHBox
+class kMyMoneyDateInput : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyDateInput(QWidget *parent=0, const char *name=0, Qt::AlignmentFlags flags=Qt::AlignLeft);
+ kMyMoneyDateInput(TQWidget *tqparent=0, const char *name=0, TQt::AlignmentFlags flags=TQt::AlignLeft);
~kMyMoneyDateInput();
// Replace calls to this with the new date() method
- // QDate getQDate(void) KDE_DEPRECATED;
+ // TQDate getTQDate(void) KDE_DEPRECATED;
- QDate date(void) const;
- void setDate(QDate date);
- void loadDate(const QDate& date);
+ TQDate date(void) const;
+ void setDate(TQDate date);
+ void loadDate(const TQDate& date);
void resetDate(void);
- QWidget* focusWidget(void) const;
- virtual void setRange(const QDate & min, const QDate & max) { dateEdit->setRange(min, max); }
- void markAsBadDate(bool bad = false, const QColor& = QColor());
+ TQWidget* tqfocusWidget(void) const;
+ virtual void setRange(const TQDate & min, const TQDate & max) { dateEdit->setRange(min, max); }
+ void markAsBadDate(bool bad = false, const TQColor& = TQColor());
public slots:
virtual void show(void);
signals:
- void dateChanged(const QDate& date);
+ void dateChanged(const TQDate& date);
protected:
/**
@@ -93,27 +95,27 @@ protected:
* The actual key for this to happen might be overridden through
* an i18n package. The 'T'-key is always possible.
*/
- void keyPressEvent(QKeyEvent * k);
- void resizeEvent(QResizeEvent*);
+ void keyPressEvent(TQKeyEvent * k);
+ void resizeEvent(TQResizeEvent*);
- /** To intercept events sent to focusWidget() */
- bool eventFilter(QObject *o, QEvent *e);
+ /** To intercept events sent to tqfocusWidget() */
+ bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
- void slotDateChosen(QDate date);
+ void slotDateChosen(TQDate date);
void toggleDatePicker();
private slots:
- void slotDateChosenRef(const QDate& date);
+ void slotDateChosenRef(const TQDate& date);
void fixSize(void);
private:
- QDateEdit *dateEdit;
+ TQDateEdit *dateEdit;
KDatePicker *m_datePicker;
- QDate m_date; // The date !
- QDate m_prevDate;
- Qt::AlignmentFlags m_qtalignment;
- QVBox *m_dateFrame;
+ TQDate m_date; // The date !
+ TQDate m_prevDate;
+ TQt::AlignmentFlags m_qttqalignment;
+ TQVBox *m_dateFrame;
KPushButton *m_dateButton;
KPassivePopup *m_datePopup;
int m_focusDatePart;
diff --git a/kmymoney2/widgets/kmymoneydatetbl.cpp b/kmymoney2/widgets/kmymoneydatetbl.cpp
index e48e01e..08a44e6 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.cpp
+++ b/kmymoney2/widgets/kmymoneydatetbl.cpp
@@ -44,12 +44,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qglobal.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qpen.h>
-#include <qpainter.h>
-#include <qdialog.h>
+#include <tqglobal.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -69,8 +69,8 @@
// Project Includes
#include "kmymoneydatetbl.h"
-kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name, WFlags f)
- : QGridView(parent, name, f)
+kMyMoneyDateTbl::kMyMoneyDateTbl(TQWidget *tqparent, TQDate date_, const char* name, WFlags f)
+ : TQGridView(tqparent, name, f)
{
// call this first to make sure that member variables are initialized
setType(MONTHLY);
@@ -80,9 +80,9 @@ kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name,
if(!date_.isValid())
{
kdDebug() << "kMyMoneyDateTbl ctor: WARNING: Given date is invalid, using current date." << endl;
- date_=QDate::currentDate();
+ date_=TQDate::tqcurrentDate();
}
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
viewport()->setEraseColor(KGlobalSettings::baseColor());
@@ -90,21 +90,21 @@ kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name,
setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth
// So we can emit hoverDate
-// QApplication::setGlobalMouseTracking(true);
+// TQApplication::setGlobalMouseTracking(true);
viewport()->setMouseTracking(true);
}
void
-kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
+kMyMoneyDateTbl::paintCell(TQPainter *painter, int row, int col)
{
- QRect rect;
- QString text;
- QPen pen;
+ TQRect rect;
+ TQString text;
+ TQPen pen;
int w=cellWidth();
int h=cellHeight();
- QBrush brushBlue(KGlobalSettings::activeTitleColor());
- QBrush brushLightblue(KGlobalSettings::baseColor());
- QFont font=KGlobalSettings::generalFont();
+ TQBrush brushBlue(KGlobalSettings::activeTitleColor());
+ TQBrush brushLightblue(KGlobalSettings::baseColor());
+ TQFont font=KGlobalSettings::generalFont();
// -----
font.setPointSize(fontsize);
@@ -122,7 +122,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
font.setBold(true);
painter->setFont(font);
bool normalday = true;
- QString daystr;
+ TQString daystr;
if ( col+firstWeekDay < 8 )
daystr = WEEK_DAY_NAME(col+firstWeekDay, true);
else
@@ -163,22 +163,13 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
painter->setPen(KGlobalSettings::activeTextColor());
int year=date.year();
- QString headerText;
-#if QT_VERSION > 0x030005
+ TQString headerText;
// FIXME: Shouldn't that be i18n()'ed as well
- QString weekStr = QString::number(date.weekNumber(&year));
- QString yearStr = QString::number(year);
+ TQString weekStr = TQString::number(date.weekNumber(&year));
+ TQString yearStr = TQString::number(year);
headerText = i18n("Week %1 for year %2.")
- .arg(weekStr)
- .arg(yearStr);
-#else
- // FIXME: include code to display the same as for KDE >= 3.0.5
- QString weekStr = QString::number(weekNumber(date, &year));
- QString yearStr = QString::number(year);
- headerText = i18n("Week %1 for year %2.")
- .arg(weekStr)
- .arg(yearStr);
-#endif
+ .tqarg(weekStr)
+ .tqarg(yearStr);
painter->drawText(0, 0, w, h-1, AlignCenter, headerText, -1, &rect);
@@ -187,7 +178,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
if(rect.height()>maxCell.height())
maxCell.setHeight(rect.height());
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
int athird = width()/3;
@@ -212,7 +203,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
{
int pos;
- QDate drawDate(date);
+ TQDate drawDate(date);
if (m_type == MONTHLY)
{
@@ -245,7 +236,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
else if (m_type == WEEKLY)
{
// TODO: Handle other start weekdays than Monday
- text = QDate::shortDayName(row);
+ text = TQDate::shortDayName(row);
text += " ";
int dayOfWeek = date.dayOfWeek();
@@ -262,7 +253,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
drawDate = date.addDays(diff);
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
}
@@ -271,52 +262,52 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col)
}
void
-kMyMoneyDateTbl::keyPressEvent( QKeyEvent *e )
+kMyMoneyDateTbl::keyPressEvent( TQKeyEvent *e )
{
- if ( e->key() == Qt::Key_Prior ) {
+ if ( e->key() == TQt::Key_Prior ) {
setDate(date.addMonths(-1));
return;
}
- if ( e->key() == Qt::Key_Next ) {
+ if ( e->key() == TQt::Key_Next ) {
setDate(date.addMonths(1));
return;
}
- if ( e->key() == Qt::Key_Up ) {
+ if ( e->key() == TQt::Key_Up ) {
if ( date.day() > 7 ) {
setDate(date.addDays(-7));
return;
}
}
- if ( e->key() == Qt::Key_Down ) {
+ if ( e->key() == TQt::Key_Down ) {
if ( date.day() <= date.daysInMonth()-7 ) {
setDate(date.addDays(7));
return;
}
}
- if ( e->key() == Qt::Key_Left ) {
+ if ( e->key() == TQt::Key_Left ) {
if ( date.day() > 1 ) {
setDate(date.addDays(-1));
return;
}
}
- if ( e->key() == Qt::Key_Right ) {
+ if ( e->key() == TQt::Key_Right ) {
if ( date.day() < date.daysInMonth() ) {
setDate(date.addDays(1));
return;
}
}
- if ( e->key() == Qt::Key_Minus ) {
+ if ( e->key() == TQt::Key_Minus ) {
setDate(date.addDays(-1));
return;
}
- if ( e->key() == Qt::Key_Plus ) {
+ if ( e->key() == TQt::Key_Plus ) {
setDate(date.addDays(1));
return;
}
- if ( e->key() == Qt::Key_N ) {
- setDate(QDate::currentDate());
+ if ( e->key() == TQt::Key_N ) {
+ setDate(TQDate::tqcurrentDate());
return;
}
@@ -324,10 +315,10 @@ kMyMoneyDateTbl::keyPressEvent( QKeyEvent *e )
}
void
-kMyMoneyDateTbl::viewportResizeEvent(QResizeEvent * e)
+kMyMoneyDateTbl::viewportResizeEvent(TQResizeEvent * e)
{
if (e)
- QGridView::viewportResizeEvent(e);
+ TQGridView::viewportResizeEvent(e);
setCellWidth(viewport()->width()/m_colCount);
setCellHeight(viewport()->height()/m_rowCount);
@@ -337,8 +328,8 @@ void
kMyMoneyDateTbl::setFontSize(int size)
{
int count;
- QFontMetrics metrics(fontMetrics());
- QRect rect;
+ TQFontMetrics metrics(fontMetrics());
+ TQRect rect;
// ----- store rectangles:
fontsize=size;
@@ -350,8 +341,8 @@ kMyMoneyDateTbl::setFontSize(int size)
for(count=0; count<m_colCount; ++count)
{
rect=metrics.boundingRect(WEEK_DAY_NAME(count+1, true));
- maxCell.setWidth(QMAX(maxCell.width(), rect.width()));
- maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
+ maxCell.setWidth(TQMAX(maxCell.width(), rect.width()));
+ maxCell.setHeight(TQMAX(maxCell.height(), rect.height()));
}
if (m_type == WEEKLY)
@@ -361,22 +352,22 @@ kMyMoneyDateTbl::setFontSize(int size)
}
// ----- compare with a real wide number and add some space:
- rect=metrics.boundingRect(QString::fromLatin1("88"));
- maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
- maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
+ rect=metrics.boundingRect(TQString::tqfromLatin1("88"));
+ maxCell.setWidth(TQMAX(maxCell.width()+2, rect.width()));
+ maxCell.setHeight(TQMAX(maxCell.height()+4, rect.height()));
}
void
-kMyMoneyDateTbl::wheelEvent ( QWheelEvent * e )
+kMyMoneyDateTbl::wheelEvent ( TQWheelEvent * e )
{
setDate(date.addMonths( -(int)(e->delta()/120)) );
e->accept();
}
void
-kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e)
+kMyMoneyDateTbl::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- if (e->type()!=QEvent::MouseButtonRelease)
+ if (e->type()!=TQEvent::MouseButtonRelease)
{ // the KDatePicker only reacts on mouse press events:
return;
}
@@ -395,7 +386,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e)
// -----
int row, col, pos, temp;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
@@ -432,7 +423,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e)
}
temp = firstday + date.day() - dayoff % 7 - 1;
- setDate(QDate(date.year(), date.month(), pos - firstday + dayoff % 7));
+ setDate(TQDate(date.year(), date.month(), pos - firstday + dayoff % 7));
updateCell(temp/7+1, temp%7); // Update the previously selected cell
}
@@ -453,7 +444,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e)
setDate(date.addDays(diff));
updateCell(dayOfWeek, 0);
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
}
@@ -463,10 +454,10 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e)
}
bool
-kMyMoneyDateTbl::setDate(const QDate& date_)
+kMyMoneyDateTbl::setDate(const TQDate& date_)
{
bool changed=false;
- QDate temp;
+ TQDate temp;
// -----
if(!date_.isValid())
{
@@ -499,42 +490,42 @@ kMyMoneyDateTbl::setDate(const QDate& date_)
if (changed)
{
- repaintContents(false);
+ tqrepaintContents(false);
}
emit(dateChanged(date));
return true;
}
-const QDate&
+const TQDate&
kMyMoneyDateTbl::getDate() const
{
return date;
}
-// what are those repaintContents() good for? (pfeiffer)
-void kMyMoneyDateTbl::focusInEvent( QFocusEvent *e )
+// what are those tqrepaintContents() good for? (pfeiffer)
+void kMyMoneyDateTbl::focusInEvent( TQFocusEvent *e )
{
-// repaintContents(false);
- QGridView::focusInEvent( e );
+// tqrepaintContents(false);
+ TQGridView::focusInEvent( e );
}
-void kMyMoneyDateTbl::focusOutEvent( QFocusEvent *e )
+void kMyMoneyDateTbl::focusOutEvent( TQFocusEvent *e )
{
-// repaintContents(false);
- QGridView::focusOutEvent( e );
+// tqrepaintContents(false);
+ TQGridView::focusOutEvent( e );
}
-QSize
-kMyMoneyDateTbl::sizeHint() const
+TQSize
+kMyMoneyDateTbl::tqsizeHint() const
{
if (maxCell.height()>0 && maxCell.width()>0)
{
- return QSize(maxCell.width()*numCols()+2*frameWidth(),
+ return TQSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
- kdDebug() << "kMyMoneyDateTbl::sizeHint: obscure failure - " << endl;
- return QSize(-1, -1);
+ kdDebug() << "kMyMoneyDateTbl::tqsizeHint: obscure failure - " << endl;
+ return TQSize(-1, -1);
}
}
@@ -547,11 +538,11 @@ void kMyMoneyDateTbl::setType(calendarType type)
m_colCount = 1;
m_type = WEEKLY;
}
- else if (type == QUARTERLY)
+ else if (type == TQUARTERLY)
{
m_rowCount = 7;
m_colCount = 21;
- m_type = QUARTERLY;
+ m_type = TQUARTERLY;
}
else // default to monthly
{
@@ -567,10 +558,10 @@ void kMyMoneyDateTbl::setType(calendarType type)
viewportResizeEvent(NULL);
}
-void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
+void kMyMoneyDateTbl::contentsMouseMoveEvent(TQMouseEvent* e)
{
int row, col, pos;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
mouseCoord = e->pos();
row = rowAt(mouseCoord.y());
@@ -586,8 +577,8 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
int firstWeekDay = KGlobal::locale()->weekStartDay();
#endif
- QDate drawDate(date);
- QString text;
+ TQDate drawDate(date);
+ TQString text;
if (m_type == MONTHLY)
{
@@ -620,7 +611,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
else if (m_type == WEEKLY)
{
// TODO: Handle other start weekdays than Monday
- text = QDate::shortDayName(row);
+ text = TQDate::shortDayName(row);
text += " ";
int dayOfWeek = date.dayOfWeek();
@@ -637,7 +628,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
drawDate = date.addDays(diff);
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
}
@@ -647,52 +638,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
emit hoverDate(drawDate);
}
- QGridView::contentsMouseMoveEvent(e);
-}
-
-#if QT_VERSION <= 0x030005
-// The following code is borrowed from QT 3.2 QDate::weekNumber()
-// and slightly modified
-int kMyMoneyDateTbl::weekNumber(const QDate& date, int *yearNumber) const
-{
- if ( !date.isValid() )
- return 0;
-
- int dow = date.dayOfWeek();
- int doy = date.dayOfYear();
- int currYear = date.year();
- int jan1WeekDay = QDate( currYear, 1, 1 ).dayOfWeek();
- int yearNum;
- int weekNum;
-
- if ( doy <= (8 - jan1WeekDay) && jan1WeekDay > 4 ) {
- yearNum = currYear - 1;
- weekNum = 52;
- if ( jan1WeekDay == 5 ||
- (jan1WeekDay == 6 && QDate::leapYear(yearNum)) )
- weekNum++;
- } else {
- int totalDays = 365;
- if ( QDate::leapYear(currYear) )
- totalDays++;
-
- if ( (totalDays - doy < 4 - dow)
- || (jan1WeekDay == 7 && totalDays - doy < 3) ) {
- yearNum = currYear + 1;
- weekNum = 1;
- } else {
- int j = doy + ( 7 - dow ) + ( jan1WeekDay - 1 );
- yearNum = currYear;
- weekNum = j / 7;
- if ( jan1WeekDay > 4 )
- weekNum--;
- }
- }
- if ( yearNumber )
- *yearNumber = yearNum;
- return weekNum;
-
+ TQGridView::contentsMouseMoveEvent(e);
}
-#endif
#include "kmymoneydatetbl.moc"
diff --git a/kmymoney2/widgets/kmymoneydatetbl.h b/kmymoney2/widgets/kmymoneydatetbl.h
index 7ff6610..f46d661 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.h
+++ b/kmymoney2/widgets/kmymoneydatetbl.h
@@ -46,8 +46,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qgridview.h>
-#include <qdatetime.h>
+#include <tqgridview.h>
+#include <tqdatetime.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -62,28 +62,29 @@
/**
* @author Michael Edwardes
*/
-class kMyMoneyDateTbl : public QGridView {
+class kMyMoneyDateTbl : public TQGridView {
Q_OBJECT
+ TQ_OBJECT
public:
enum calendarType { WEEKLY,
MONTHLY,
- QUARTERLY };
+ TQUARTERLY };
public:
/**
* The constructor.
*/
- kMyMoneyDateTbl(QWidget *parent=0,
- QDate date=QDate::currentDate(),
+ kMyMoneyDateTbl(TQWidget *tqparent=0,
+ TQDate date=TQDate::tqcurrentDate(),
const char* name=0, WFlags f=0);
/**
* Returns a recommended size for the widget.
* To save some time, the size of the largest used cell content is
* calculated in each paintCell() call, since all calculations have
* to be done there anyway. The size is stored in maxCell. The
- * sizeHint() simply returns a multiple of maxCell.
+ * tqsizeHint() simply returns a multiple of maxCell.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/**
* Set the font size of the date table.
*/
@@ -91,8 +92,8 @@ public:
/**
* Select and display this date.
*/
- virtual bool setDate(const QDate&);
- virtual const QDate& getDate() const;
+ virtual bool setDate(const TQDate&);
+ virtual const TQDate& getDate() const;
virtual void setType(calendarType type);
virtual calendarType type(void) const { return m_type; }
@@ -101,7 +102,7 @@ signals:
/**
* The selected date changed.
*/
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/**
* A date has been selected by clicking on the table.
*/
@@ -110,29 +111,29 @@ signals:
/**
*
**/
- virtual void hoverDate(QDate);
+ virtual void hoverDate(TQDate);
protected:
/**
* Paint a cell.
*/
- virtual void paintCell(QPainter*, int, int);
+ virtual void paintCell(TQPainter*, int, int);
/**
* Handle the resize events.
*/
- virtual void viewportResizeEvent(QResizeEvent *);
+ virtual void viewportResizeEvent(TQResizeEvent *);
/**
* React on mouse clicks that select a date.
*/
- virtual void contentsMouseReleaseEvent(QMouseEvent *);
- virtual void wheelEvent( QWheelEvent * e );
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void focusInEvent( QFocusEvent *e );
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *);
+ virtual void wheelEvent( TQWheelEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
- virtual void drawCellContents(QPainter *painter, int row, int col, const QDate& theDate) = 0;
+ virtual void drawCellContents(TQPainter *painter, int row, int col, const TQDate& theDate) = 0;
- virtual void contentsMouseMoveEvent(QMouseEvent* e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e);
/**
* The font size of the displayed text.
@@ -141,7 +142,7 @@ protected:
/**
* The currently selected date.
*/
- QDate date;
+ TQDate date;
/**
* The day of the first day in the month [1..7].
*/
@@ -162,7 +163,7 @@ protected:
/**
* Save the size of the largest used cell content.
*/
- QRect maxCell;
+ TQRect maxCell;
/**
* Type related variables
@@ -172,12 +173,9 @@ protected:
int m_rowCount;
///
- QDate m_drawDateOrig;
+ TQDate m_drawDateOrig;
private:
-#if QT_VERSION <= 0x030005
- int weekNumber(const QDate&, int *yr) const;
-#endif
#if KDE_IS_VERSION(3,2,0)
#define WEEK_DAY_NAME(a,b) KGlobal::locale()->calendar()->weekDayName(a,b)
diff --git a/kmymoney2/widgets/kmymoneyedit.cpp b/kmymoney2/widgets/kmymoneyedit.cpp
index 87be674..2e59e32 100644
--- a/kmymoney2/widgets/kmymoneyedit.cpp
+++ b/kmymoney2/widgets/kmymoneyedit.cpp
@@ -19,10 +19,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qapplication.h>
-#include <qdesktopwidget.h>
-#include <qwidget.h>
-#include <qvbox.h>
+#include <tqapplication.h>
+#include <tqdesktopwidget.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -42,14 +42,14 @@
#include "kmymoneycalculator.h"
#include "../mymoney/mymoneymoney.h"
-kMyMoneyMoneyValidator::kMyMoneyMoneyValidator(QObject * parent, const char * name) :
- QDoubleValidator(parent, name)
+kMyMoneyMoneyValidator::kMyMoneyMoneyValidator(TQObject * tqparent, const char * name) :
+ TQDoubleValidator(tqparent, name)
{
}
kMyMoneyMoneyValidator::kMyMoneyMoneyValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name ) :
- QDoubleValidator(bottom, top, decimals, parent, name)
+ TQObject * tqparent, const char * name ) :
+ TQDoubleValidator(bottom, top, decimals, tqparent, name)
{
}
@@ -57,9 +57,9 @@ kMyMoneyMoneyValidator::kMyMoneyMoneyValidator( double bottom, double top, int d
* The code of the following function is taken from kdeui/knumvalidator.cpp
* and adjusted to always use the monetary symbols defined in the KDE control center
*/
-QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) const
+TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p ) const
{
- QString s = input;
+ TQString s = input;
KLocale * l = KGlobal::locale();
// ok, we have to re-format the number to have:
// 1. decimalSymbol == '.'
@@ -67,62 +67,62 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p )
// 3. positiveSign == <empty>
// 4. thousandsSeparator() == <empty> (we don't check that there
// are exactly three decimals between each separator):
- QString d = l->monetaryDecimalSymbol(),
+ TQString d = l->monetaryDecimalSymbol(),
n = l->negativeSign(),
p = l->positiveSign(),
t = l->monetaryThousandsSeparator();
// first, delete p's and t's:
if ( !p.isEmpty() )
- for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) )
+ for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) )
s.remove( idx, p.length() );
if ( !t.isEmpty() )
- for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) )
+ for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) )
s.remove( idx, t.length() );
// then, replace the d's and n's
- if ( ( !n.isEmpty() && n.find('.') != -1 ) ||
- ( !d.isEmpty() && d.find('-') != -1 ) ) {
+ if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) ||
+ ( !d.isEmpty() && d.tqfind('-') != -1 ) ) {
// make sure we don't replace something twice:
- kdWarning() << "KDoubleValidator: decimal symbol contains '-' or "
- "negative sign contains '.' -> improve algorithm" << endl;
+ kdWarning() << "KDoubleValidator: decimal symbol tqcontains '-' or "
+ "negative sign tqcontains '.' -> improve algorithm" << endl;
return Invalid;
}
if ( !d.isEmpty() && d != "." )
- for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) )
- s.replace( idx, d.length(), ".");
+ for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) )
+ s.tqreplace( idx, d.length(), ".");
if ( !n.isEmpty() && n != "-" )
- for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) )
- s.replace( idx, n.length(), "-" );
+ for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) )
+ s.tqreplace( idx, n.length(), "-" );
// Take care of monetary parens around the value if selected via
// the locale settings.
// If the lead-in or lead-out paren is present, remove it
- // before passing the string to the QDoubleValidator
+ // before passing the string to the TQDoubleValidator
if(l->negativeMonetarySignPosition() == KLocale::ParensAround
|| l->positiveMonetarySignPosition() == KLocale::ParensAround) {
- QRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$");
- if(s.find(regExp) != -1) {
+ TQRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$");
+ if(s.tqfind(regExp) != -1) {
s = regExp.cap(2);
}
}
- // check for non numeric values (QDoubleValidator allows an 'e', we don't)
- QRegExp nonNumeric("[^\\d-\\.]+");
- if(s.find(nonNumeric) != -1)
+ // check for non numeric values (TQDoubleValidator allows an 'e', we don't)
+ TQRegExp nonNumeric("[^\\d-\\.]+");
+ if(s.tqfind(nonNumeric) != -1)
return Invalid;
// check for minus sign trailing the number
- QRegExp trailingMinus("^([^-]*)\\w*-$");
- if(s.find(trailingMinus) != -1) {
- s = QString("-%1").arg(trailingMinus.cap(1));
+ TQRegExp trailingMinus("^([^-]*)\\w*-$");
+ if(s.tqfind(trailingMinus) != -1) {
+ s = TQString("-%1").tqarg(trailingMinus.cap(1));
}
// check for the maximum allowed number of decimal places
- int decPos = s.find('.');
+ int decPos = s.tqfind('.');
if(decPos != -1) {
if(decimals() == 0)
return Invalid;
@@ -131,10 +131,10 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p )
}
// If we have just a single minus sign, we are done
- if(s == QString("-"))
+ if(s == TQString("-"))
return Acceptable;
- QValidator::State rc = QDoubleValidator::validate( s, _p );
+ TQValidator::State rc = TQDoubleValidator::validate( s, _p );
if(rc == Acceptable) {
// If the numeric value is acceptable, we check if the parens
@@ -144,7 +144,7 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p )
// only, if the locale settings have it enabled.
if(l->negativeMonetarySignPosition() == KLocale::ParensAround
|| l->positiveMonetarySignPosition() == KLocale::ParensAround) {
- int tmp = input.contains('(') - input.contains(')');
+ int tmp = input.tqcontains('(') - input.tqcontains(')');
if(tmp > 0)
rc = Intermediate;
else if(tmp < 0)
@@ -154,8 +154,8 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p )
return rc;
}
-kMyMoneyEdit::kMyMoneyEdit(QWidget *parent, const char *name, const int prec)
- : QHBox(parent, name)
+kMyMoneyEdit::kMyMoneyEdit(TQWidget *tqparent, const char *name, const int prec)
+ : TQHBox(tqparent, name)
{
m_prec = prec;
if(prec < -1 || prec > 20)
@@ -163,8 +163,8 @@ kMyMoneyEdit::kMyMoneyEdit(QWidget *parent, const char *name, const int prec)
init();
}
-kMyMoneyEdit::kMyMoneyEdit(const MyMoneySecurity& sec, QWidget *parent, const char *name)
- : QHBox(parent, name)
+kMyMoneyEdit::kMyMoneyEdit(const MyMoneySecurity& sec, TQWidget *tqparent, const char *name)
+ : TQHBox(tqparent, name)
{
m_prec = MyMoneyMoney::denomToPrec(sec.smallestAccountFraction());
init();
@@ -209,29 +209,29 @@ void kMyMoneyEdit::init(void)
setFocusProxy(m_edit);
// Yes, just a simple double validator !
- kMyMoneyMoneyValidator *validator = new kMyMoneyMoneyValidator(this);
+ kMyMoneyMoneyValidator *validator = new kMyMoneyMoneyValidator(TQT_TQOBJECT(this));
m_edit->setValidator(validator);
- m_edit->setAlignment(AlignRight | AlignVCenter);
+ m_edit->tqsetAlignment(AlignRight | AlignVCenter);
- m_calculatorFrame = new QVBox(this, 0, WType_Popup);
+ m_calculatorFrame = new TQVBox(this, 0, WType_Popup);
- m_calculatorFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
+ m_calculatorFrame->setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised);
m_calculatorFrame->setLineWidth(3);
m_calculator = new kMyMoneyCalculator(m_calculatorFrame);
m_calculatorFrame->setFixedSize(m_calculator->width()+3, m_calculator->height()+3);
m_calculatorFrame->hide();
- m_calcButton = new KPushButton(QIconSet(QPixmap(KGlobal::iconLoader()->iconPath("kcalc", -KIcon::SizeSmall))), QString(""), this);
- m_calcButton->setFixedWidth( m_calcButton->sizeHint().width() );
- m_calcButton->setFixedHeight(m_edit->sizeHint().height());
+ m_calcButton = new KPushButton(TQIconSet(TQPixmap(KGlobal::iconLoader()->iconPath("kcalc", -KIcon::SizeSmall))), TQString(""), this);
+ m_calcButton->setFixedWidth( m_calcButton->tqsizeHint().width() );
+ m_calcButton->setFixedHeight(m_edit->tqsizeHint().height());
m_calcButton->setFocusProxy(m_edit);
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.loadFromData(resetButtonImage, sizeof(resetButtonImage), "PNG", 0);
- m_resetButton = new KPushButton(QIconSet(pixmap), QString(""), this);
- m_resetButton->setFixedWidth( m_resetButton->sizeHint().width() );
- m_resetButton->setFixedHeight(m_edit->sizeHint().height());
+ m_resetButton = new KPushButton(TQIconSet(pixmap), TQString(""), this);
+ m_resetButton->setFixedWidth( m_resetButton->tqsizeHint().width() );
+ m_resetButton->setFixedHeight(m_edit->tqsizeHint().height());
m_resetButton->setEnabled(false);
m_resetButton->setFocusProxy(m_edit);
@@ -242,13 +242,13 @@ void kMyMoneyEdit::init(void)
setSpacing(0);
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(theTextChanged(const QString&)));
- connect(m_calculator, SIGNAL(signalResultAvailable()), this, SLOT(slotCalculatorResult()));
- connect(m_calcButton, SIGNAL(clicked()), this, SLOT(slotCalculatorOpen()));
- connect(m_resetButton, SIGNAL(clicked()), this, SLOT(resetText()));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(theTextChanged(const TQString&)));
+ connect(m_calculator, TQT_SIGNAL(signalResultAvailable()), this, TQT_SLOT(slotCalculatorResult()));
+ connect(m_calcButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCalculatorOpen()));
+ connect(m_resetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetText()));
}
-void kMyMoneyEdit::setValidator(const QValidator* v)
+void kMyMoneyEdit::setValidator(const TQValidator* v)
{
m_edit->setValidator(v);
}
@@ -281,7 +281,7 @@ bool kMyMoneyEdit::isValid(void) const
MyMoneyMoney kMyMoneyEdit::value(void) const
{
- QString txt = m_edit->text();
+ TQString txt = m_edit->text();
ensureFractionalPart(txt);
MyMoneyMoney money(txt);
if(m_prec != -1)
@@ -292,11 +292,11 @@ MyMoneyMoney kMyMoneyEdit::value(void) const
void kMyMoneyEdit::setValue(const MyMoneyMoney& value)
{
// load the value into the widget but don't use thousandsSeparators
- QString txt = value.formatMoney("", m_prec, false);
+ TQString txt = value.formatMoney("", m_prec, false);
loadText(txt);
}
-void kMyMoneyEdit::loadText(const QString& txt)
+void kMyMoneyEdit::loadText(const TQString& txt)
{
m_edit->setText(txt);
if(isEnabled() && !txt.isEmpty())
@@ -307,7 +307,7 @@ void kMyMoneyEdit::loadText(const QString& txt)
void kMyMoneyEdit::clearText(void)
{
- m_text = QString();
+ m_text = TQString();
m_edit->setText(m_text);
}
@@ -317,12 +317,12 @@ void kMyMoneyEdit::resetText(void)
m_resetButton->setEnabled(false);
}
-void kMyMoneyEdit::theTextChanged(const QString & theText)
+void kMyMoneyEdit::theTextChanged(const TQString & theText)
{
KLocale * l = KGlobal::locale();
- QString d = l->monetaryDecimalSymbol();
- QString l_text = theText;
- QString nsign, psign;
+ TQString d = l->monetaryDecimalSymbol();
+ TQString l_text = theText;
+ TQString nsign, psign;
if(l->negativeMonetarySignPosition() == KLocale::ParensAround
|| l->positiveMonetarySignPosition() == KLocale::ParensAround) {
nsign = psign = "(";
@@ -333,14 +333,14 @@ void kMyMoneyEdit::theTextChanged(const QString & theText)
int i = 0;
if(isEnabled()) {
- QValidator::State state = m_edit->validator()->validate( l_text, i);
- if(state == QValidator::Intermediate) {
+ TQValidator::State state = m_edit->validator()->validate( l_text, i);
+ if(state == TQValidator::Intermediate) {
if(l_text.length() == 1) {
if(l_text != d && l_text != nsign && l_text != psign && l_text != "-")
- state = QValidator::Invalid;
+ state = TQValidator::Invalid;
}
}
- if (state==QValidator::Invalid)
+ if (state==TQValidator::Invalid)
m_edit->setText(previousText);
else {
previousText = l_text;
@@ -352,16 +352,16 @@ void kMyMoneyEdit::theTextChanged(const QString & theText)
void kMyMoneyEdit::ensureFractionalPart(void)
{
- QString s(m_edit->text());
+ TQString s(m_edit->text());
ensureFractionalPart(s);
m_edit->setText(s);
}
-void kMyMoneyEdit::ensureFractionalPart(QString& s) const
+void kMyMoneyEdit::ensureFractionalPart(TQString& s) const
{
KLocale* locale = KGlobal::locale();
- QString decimalSymbol = locale->monetaryDecimalSymbol();
+ TQString decimalSymbol = locale->monetaryDecimalSymbol();
if(decimalSymbol.isEmpty())
decimalSymbol = ".";
@@ -369,19 +369,19 @@ void kMyMoneyEdit::ensureFractionalPart(QString& s) const
// followed by the required number of 0s
if (!s.isEmpty()) {
if(m_prec > 0) {
- if (!s.contains(decimalSymbol)) {
+ if (!s.tqcontains(decimalSymbol)) {
s += decimalSymbol;
for (int i=0; i < m_prec; i++)
s += "0";
}
} else if(m_prec == 0) {
- while(s.contains(decimalSymbol)) {
- int pos = s.findRev(decimalSymbol);
+ while(s.tqcontains(decimalSymbol)) {
+ int pos = s.tqfindRev(decimalSymbol);
if(pos != -1) {
s.truncate(pos);
}
}
- } else if(s.contains(decimalSymbol)) { // m_prec == -1 && fraction
+ } else if(s.tqcontains(decimalSymbol)) { // m_prec == -1 && fraction
// no trailing zeroes
while(s.endsWith("0")) {
s.truncate(s.length()-1);
@@ -393,19 +393,19 @@ void kMyMoneyEdit::ensureFractionalPart(QString& s) const
}
}
-bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e )
+bool kMyMoneyEdit::eventFilter(TQObject * /* o */ , TQEvent *e )
{
bool rc = false;
// we want to catch some keys that are usually handled by
// the base class (e.g. '+', '-', etc.)
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent *k = static_cast<QKeyEvent *> (e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent *k = TQT_TQKEYEVENT (e);
rc = true;
switch(k->key()) {
- case Qt::Key_Plus:
- case Qt::Key_Minus:
+ case TQt::Key_Plus:
+ case TQt::Key_Minus:
if(m_edit->hasSelectedText()) {
m_edit->cut();
}
@@ -416,7 +416,7 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e )
// in case of '-' we do not enter the calculator when
// the current position is the beginning and there is
// no '-' sign at the first position.
- if(k->key() == Qt::Key_Minus) {
+ if(k->key() == TQt::Key_Minus) {
if(m_edit->cursorPosition() == 0 && m_edit->text()[0] != '-') {
rc = false;
break;
@@ -424,9 +424,9 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e )
}
// otherwise, tricky fall through here!
- case Qt::Key_Slash:
- case Qt::Key_Asterisk:
- case Qt::Key_Percent:
+ case TQt::Key_Slash:
+ case TQt::Key_Asterisk:
+ case TQt::Key_Percent:
if(m_edit->hasSelectedText()) {
// remove the selected text
m_edit->cut();
@@ -439,7 +439,7 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e )
break;
}
- } else if(e->type() == QEvent::FocusOut) {
+ } else if(e->type() == TQEvent::FocusOut) {
if(!m_edit->text().isEmpty() || !allowEmpty)
ensureFractionalPart();
@@ -457,7 +457,7 @@ void kMyMoneyEdit::slotCalculatorOpen(void)
calculatorOpen(0);
}
-void kMyMoneyEdit::calculatorOpen(QKeyEvent* k)
+void kMyMoneyEdit::calculatorOpen(TQKeyEvent* k)
{
m_calculator->setInitialValues(m_edit->text(), k);
@@ -466,18 +466,18 @@ void kMyMoneyEdit::calculatorOpen(QKeyEvent* k)
// usually, the calculator widget is shown underneath the MoneyEdit widget
// if it does not fit on the screen, we show it above this widget
- QPoint p = mapToGlobal(QPoint(0,0));
- if(p.y() + height() + h > QApplication::desktop()->height())
+ TQPoint p = mapToGlobal(TQPoint(0,0));
+ if(p.y() + height() + h > TQApplication::desktop()->height())
p.setY(p.y() - h);
else
p.setY(p.y() + height());
// usually, it is shown left aligned. If it does not fit, we align it
// to the right edge of the widget
- if(p.x() + w > QApplication::desktop()->width())
+ if(p.x() + w > TQApplication::desktop()->width())
p.setX(p.x() + width() - w);
- QRect r = m_calculator->geometry();
+ TQRect r = m_calculator->tqgeometry();
r.moveTopLeft(p);
m_calculatorFrame->setGeometry(r);
m_calculatorFrame->show();
@@ -486,7 +486,7 @@ void kMyMoneyEdit::calculatorOpen(QKeyEvent* k)
void kMyMoneyEdit::slotCalculatorResult(void)
{
- QString result;
+ TQString result;
if(m_calculator != 0) {
m_calculatorFrame->hide();
m_edit->setText(m_calculator->result());
@@ -496,11 +496,11 @@ void kMyMoneyEdit::slotCalculatorResult(void)
}
}
-QWidget* kMyMoneyEdit::focusWidget(void) const
+TQWidget* kMyMoneyEdit::tqfocusWidget(void) const
{
- QWidget* w = m_edit;
+ TQWidget* w = m_edit;
while(w->focusProxy())
- w = w->focusProxy();
+ w = TQT_TQWIDGET(w->focusProxy());
return w;
}
@@ -534,7 +534,7 @@ bool kMyMoneyEdit::isEmptyAllowed(void) const
return allowEmpty;
}
-void kMyMoneyEdit::setHint(const QString& hint) const
+void kMyMoneyEdit::setHint(const TQString& hint) const
{
if(m_edit)
m_edit->setHint(hint);
@@ -549,11 +549,11 @@ bool kMyMoneyEdit::isReadOnly(void) const
void kMyMoneyEdit::setReadOnly(bool readOnly)
{
- // we use the QLineEdit::setReadOnly() method directly to avoid
+ // we use the TQLineEdit::setReadOnly() method directly to avoid
// changing the background between readonly and read/write mode
// as it is done by the KLineEdit code.
if(m_edit)
- m_edit->QLineEdit::setReadOnly(readOnly);
+ m_edit->TQLineEdit::setReadOnly(readOnly);
}
#include "kmymoneyedit.moc"
diff --git a/kmymoney2/widgets/kmymoneyedit.h b/kmymoney2/widgets/kmymoneyedit.h
index 6415a0c..6df557d 100644
--- a/kmymoney2/widgets/kmymoneyedit.h
+++ b/kmymoney2/widgets/kmymoneyedit.h
@@ -22,11 +22,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qhbox.h>
-#include <qvalidator.h>
+#include <tqhbox.h>
+#include <tqvalidator.h>
-class QVBox;
-class QWidget;
+class TQVBox;
+class TQWidget;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,7 +43,7 @@ class MyMoneyMoney;
class kMyMoneyCalculator;
#if KDE_VERSION <= KDE_MAKE_VERSION(3,1,0)
- #define KDoubleValidator QDoubleValidator
+ #define KDoubleValidator TQDoubleValidator
#endif
/**
@@ -53,31 +53,32 @@ class kMyMoneyCalculator;
*
* @author Thomas Baumgart
*/
-class kMyMoneyMoneyValidator : public QDoubleValidator
+class kMyMoneyMoneyValidator : public TQDoubleValidator
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constuct a locale-aware KDoubleValidator with default range
- * (whatever QDoubleValidator uses for that) and parent @p
- * parent
+ * (whatever TQDoubleValidator uses for that) and tqparent @p
+ * tqparent
*/
- kMyMoneyMoneyValidator( QObject * parent, const char * name=0 );
+ kMyMoneyMoneyValidator( TQObject * tqparent, const char * name=0 );
/**
* Constuct a locale-aware KDoubleValidator for range [@p bottom,@p
* top] and a precision of @p decimals decimals after the decimal
* point.
*/
kMyMoneyMoneyValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name=0 );
+ TQObject * tqparent, const char * name=0 );
/**
* Destructs the validator.
*/
virtual ~kMyMoneyMoneyValidator() {}
/** Overloaded for internal reasons. The API is not affected. */
- virtual QValidator::State validate( QString & input, int & pos ) const;
+ virtual TQValidator::State validate( TQString & input, int & pos ) const;
};
/**
@@ -88,19 +89,20 @@ public:
*
* @author Michael Edwardes, Thomas Baumgart
*/
-class kMyMoneyEdit : public QHBox
+class kMyMoneyEdit : public TQHBox
{
Q_OBJECT
- Q_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible);
- Q_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible);
- Q_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty);
- Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly )
+ TQ_OBJECT
+ TQ_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible);
+ TQ_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible);
+ TQ_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty);
+ TQ_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly )
private:
- QString previousText; // keep track of what has been typed
- QString m_text; // keep track of what was the original value
+ TQString previousText; // keep track of what has been typed
+ TQString m_text; // keep track of what was the original value
kMyMoneyCalculator* m_calculator;
- QVBox* m_calculatorFrame;
+ TQVBox* m_calculatorFrame;
kMyMoneyLineEdit* m_edit;
KPushButton* m_calcButton;
KPushButton* m_resetButton;
@@ -112,7 +114,7 @@ private:
/**
* Internal helper function for value() and ensureFractionalPart(void).
*/
- void ensureFractionalPart(QString& txt) const;
+ void ensureFractionalPart(TQString& txt) const;
protected:
/**
@@ -126,9 +128,9 @@ protected:
* event pointed to by @p ev. If @p ev is 0, then no key
* event is replayed.
*
- * @param ev pointer to QKeyEvent that started the calculator.
+ * @param ev pointer to TQKeyEvent that started the calculator.
*/
- void calculatorOpen(QKeyEvent* ev);
+ void calculatorOpen(TQKeyEvent* ev);
/**
* Helper method for constructors.
@@ -136,13 +138,13 @@ protected:
void init(void);
protected slots:
- void theTextChanged(const QString & text);
+ void theTextChanged(const TQString & text);
void slotCalculatorResult(void);
void slotCalculatorOpen(void);
public:
- kMyMoneyEdit(QWidget *parent=0, const char *name=0, const int prec = -2);
- kMyMoneyEdit(const MyMoneySecurity& eq, QWidget *parent=0, const char *name=0);
+ kMyMoneyEdit(TQWidget *tqparent=0, const char *name=0, const int prec = -2);
+ kMyMoneyEdit(const MyMoneySecurity& eq, TQWidget *tqparent=0, const char *name=0);
~kMyMoneyEdit();
/**
@@ -156,13 +158,13 @@ public:
bool isValid(void) const;
- virtual bool eventFilter(QObject * , QEvent * );
+ virtual bool eventFilter(TQObject * , TQEvent * );
/**
* This method returns the value of the edit field in "numerator/denominator" format.
* If you want to get the text of the edit field, use lineedit()->text() instead.
*/
- QString text(void) const { return value().toString(); };
+ TQString text(void) const { return value().toString(); };
void setMinimumWidth(int w) { m_edit->setMinimumWidth(w); };
@@ -182,7 +184,7 @@ public:
*/
int precision(void) { return m_prec; };
- QWidget* focusWidget(void) const;
+ TQWidget* tqfocusWidget(void) const;
/**
* This method allows to modify the behavior of the widget
@@ -196,7 +198,7 @@ public:
void setAllowEmpty(bool allowed = true);
/** Overloaded for internal reasons. The API is not affected. */
- void setValidator(const QValidator* v);
+ void setValidator(const TQValidator* v);
bool isCalculatorButtonVisible(void) const;
@@ -206,16 +208,16 @@ public:
KLineEdit* lineedit(void) const;
- void setHint(const QString& hint) const;
+ void setHint(const TQString& hint) const;
bool isReadOnly(void) const;
public slots:
- void loadText(const QString& text);
+ void loadText(const TQString& text);
void resetText(void);
void clearText(void);
- void setText(const QString& txt) { setValue(MyMoneyMoney(txt)); };
+ void setText(const TQString& txt) { setValue(MyMoneyMoney(txt)); };
/**
* This method allows to show/hide the calculator button of the widget.
@@ -235,9 +237,9 @@ signals: // Signals
* This signal is sent, when the focus leaves this widget and
* the amount has been changed by user during this session.
*/
- void valueChanged(const QString& text);
+ void valueChanged(const TQString& text);
- void textChanged(const QString& text);
+ void textChanged(const TQString& text);
};
#endif
diff --git a/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp b/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp
index 684997e..6bfd1c2 100644
--- a/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp
+++ b/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp
@@ -18,10 +18,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpalette.h>
-#include <qpen.h>
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqpalette.h>
+#include <tqpen.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -33,8 +33,8 @@
#include <kmymoney/kmymoneyglobalsettings.h>
-KMyMoneyForecastListViewItem::KMyMoneyForecastListViewItem (QListView* parent, QListViewItem* after, bool isNegative) :
- KListViewItem(parent, after),
+KMyMoneyForecastListViewItem::KMyMoneyForecastListViewItem (TQListView* tqparent, TQListViewItem* after, bool isNegative) :
+ KListViewItem(tqparent, after),
m_negative(isNegative)
{
}
@@ -43,18 +43,18 @@ KMyMoneyForecastListViewItem::~KMyMoneyForecastListViewItem()
{
}
-void KMyMoneyForecastListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KMyMoneyForecastListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{
- QColorGroup _cg = cg;
- QColor textColour;
+ TQColorGroup _cg = cg;
+ TQColor textColour;
if(m_negative == true) {
textColour = KMyMoneyGlobalSettings::listNegativeValueColor(); //if the item is marked is marked as negative, all columns will be painted negative
} else {
textColour = m_columnsColor[column]; //otherwise, respect the color for each column
}
- _cg.setColor(QColorGroup::Text, textColour);
+ _cg.setColor(TQColorGroup::Text, textColour);
- KListViewItem::paintCell(p, _cg, column, width, alignment);
+ KListViewItem::paintCell(p, _cg, column, width, tqalignment);
}
void KMyMoneyForecastListViewItem::setNegative(bool isNegative)
@@ -62,13 +62,13 @@ void KMyMoneyForecastListViewItem::setNegative(bool isNegative)
m_negative = isNegative;
}
-void KMyMoneyForecastListViewItem::setText( int column, const QString &text, const bool &negative)
+void KMyMoneyForecastListViewItem::setText( int column, const TQString &text, const bool &negative)
{
//if negative set the map to negative color according to KMyMoneySettings
if(negative) {
m_columnsColor[column] = KMyMoneyGlobalSettings::listNegativeValueColor();
} else {
- m_columnsColor[column] = QColorGroup::Text;
+ m_columnsColor[column] = TQColorGroup::Text;
}
KListViewItem::setText(column, text);
diff --git a/kmymoney2/widgets/kmymoneyforecastlistviewitem.h b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h
index 7e48945..9c4b568 100644
--- a/kmymoney2/widgets/kmymoneyforecastlistviewitem.h
+++ b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qobject.h>
+#include <tqobject.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -41,25 +41,25 @@ class KMyMoneyForecastListViewItem : public KListViewItem
{
public:
- KMyMoneyForecastListViewItem(QListView* parent, QListViewItem* after, bool isNegative);
+ KMyMoneyForecastListViewItem(TQListView* tqparent, TQListViewItem* after, bool isNegative);
~KMyMoneyForecastListViewItem();
void setNegative(bool isNegative);
- void setText( int column, const QString &text, const bool &negative = false );
+ void setText( int column, const TQString &text, const bool &negative = false );
/**
* use my own paint method
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment);
private:
bool m_negative;
- QMap<int, QColor> m_columnsColor;
+ TQMap<int, TQColor> m_columnsColor;
};
#endif
diff --git a/kmymoney2/widgets/kmymoneygpgconfig.cpp b/kmymoney2/widgets/kmymoneygpgconfig.cpp
index f168e69..a64e709 100644
--- a/kmymoney2/widgets/kmymoneygpgconfig.cpp
+++ b/kmymoney2/widgets/kmymoneygpgconfig.cpp
@@ -18,8 +18,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -38,8 +38,8 @@
#define RECOVER_KEY_ID "0xD2B08440"
-kMyMoneyGPGConfig::kMyMoneyGPGConfig(QWidget *parent, const char *name )
- : kMyMoneyGPGConfigDecl(parent, name),
+kMyMoneyGPGConfig::kMyMoneyGPGConfig(TQWidget *tqparent, const char *name )
+ : kMyMoneyGPGConfigDecl(tqparent, name),
m_checkCount(0)
{
m_idGroup->setEnabled(KGPGFile::GPGAvailable());
@@ -48,8 +48,8 @@ kMyMoneyGPGConfig::kMyMoneyGPGConfig(QWidget *parent, const char *name )
m_userKeyFound->off();
m_recoverKeyFound->off();
- connect(m_useEncryption, SIGNAL(toggled(bool)), this, SLOT(slotStatusChanged(bool)));
- connect(m_userId, SIGNAL(textChanged(const QString&)), this, SLOT(slotIdChanged(const QString&)));
+ connect(m_useEncryption, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotStatusChanged(bool)));
+ connect(m_userId, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotIdChanged(const TQString&)));
}
void kMyMoneyGPGConfig::resetConfig(void)
@@ -81,7 +81,7 @@ void kMyMoneyGPGConfig::writeConfig(void)
config->writeEntry("GPG-Recipient", m_userId->text());
}
-void kMyMoneyGPGConfig::slotIdChanged(const QString& /*txt*/)
+void kMyMoneyGPGConfig::slotIdChanged(const TQString& /*txt*/)
{
// this looks a bit awkward. Here's why: KGPGFile::keyAvailable() starts
// an external task and processes UI events while it waits for the external
diff --git a/kmymoney2/widgets/kmymoneygpgconfig.h b/kmymoney2/widgets/kmymoneygpgconfig.h
index 9d2bdc7..b66c941 100644
--- a/kmymoney2/widgets/kmymoneygpgconfig.h
+++ b/kmymoney2/widgets/kmymoneygpgconfig.h
@@ -40,8 +40,9 @@
class kMyMoneyGPGConfig : public kMyMoneyGPGConfigDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyGPGConfig(QWidget* parent, const char *name);
+ kMyMoneyGPGConfig(TQWidget* tqparent, const char *name);
virtual ~kMyMoneyGPGConfig() {}
void writeConfig(void);
@@ -49,11 +50,11 @@ public:
void resetConfig(void);
protected slots:
- void slotIdChanged(const QString& txt);
+ void slotIdChanged(const TQString& txt);
void slotStatusChanged(bool);
private:
- QString m_resetUserId;
+ TQString m_resetUserId;
bool m_resetUseEncryption;
bool m_resetRecover;
int m_checkCount;
diff --git a/kmymoney2/widgets/kmymoneygpgconfigdecl.ui b/kmymoney2/widgets/kmymoneygpgconfigdecl.ui
index 4aa12eb..aeb9224 100644
--- a/kmymoney2/widgets/kmymoneygpgconfigdecl.ui
+++ b/kmymoney2/widgets/kmymoneygpgconfigdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>kMyMoneyGPGConfigDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyGPGConfigDecl</cstring>
</property>
@@ -24,7 +24,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_useEncryption</cstring>
</property>
@@ -32,7 +32,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<string>Use GPG encryption</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>m_idGroup</cstring>
</property>
@@ -43,7 +43,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -53,19 +53,19 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -96,7 +96,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>m_recoveryGroup</cstring>
</property>
@@ -107,15 +107,15 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_recover</cstring>
</property>
@@ -133,7 +133,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>51</width>
<height>20</height>
@@ -156,7 +156,7 @@ The &lt;i&gt;Recovery encryption&lt;/i&gt; group is only accessible, if the nece
</widget>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -168,7 +168,7 @@ This mechanism is provided for the case that you have lost your key and cannot a
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -184,7 +184,7 @@ This mechanism is provided for the case that you have lost your key and cannot a
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
@@ -193,5 +193,5 @@ This mechanism is provided for the case that you have lost your key and cannot a
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
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);
diff --git a/kmymoney2/widgets/kmymoneylineedit.h b/kmymoney2/widgets/kmymoneylineedit.h
index 2351082..f92bd08 100644
--- a/kmymoney2/widgets/kmymoneylineedit.h
+++ b/kmymoney2/widgets/kmymoneylineedit.h
@@ -45,16 +45,17 @@
class kMyMoneyLineEdit : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * @param w pointer to parent
+ * @param w pointer to tqparent
* @param name pointer to name of object
* @param forceMonetaryDecimalSymbol if @a true, the numeric keypad comma key will have a fixed
- * value and does not follow the keyboard layout (default: @p false)
- * @param alignment Controls the alignment of the text. Default is Qt::AlignLeft | Qt::AlignVCenter.
- * See Qt::AlignmentFlags for other possible values.
+ * value and does not follow the keyboard tqlayout (default: @p false)
+ * @param tqalignment Controls the tqalignment of the text. Default is TQt::AlignLeft | TQt::AlignVCenter.
+ * See TQt::AlignmentFlags for other possible values.
*/
- kMyMoneyLineEdit(QWidget *w = 0, const char* name = 0, bool forceMonetaryDecimalSymbol = false, int alignment = (AlignLeft | AlignVCenter));
+ kMyMoneyLineEdit(TQWidget *w = 0, const char* name = 0, bool forceMonetaryDecimalSymbol = false, int tqalignment = (AlignLeft | AlignVCenter));
~kMyMoneyLineEdit();
/**
@@ -66,50 +67,50 @@ public:
/**
* This method is used to turn on/off the hint display
*/
- void setHint(const QString& hint) { m_hint = hint; };
+ void setHint(const TQString& hint) { m_hint = hint; };
public slots:
- void loadText(const QString& text);
+ void loadText(const TQString& text);
signals:
/**
* This signal is emitted when the focus leaves the object and the text
* has been changed. The new text is passed as @a str.
*/
- void lineChanged(const QString& str);
+ void lineChanged(const TQString& str);
protected:
- void focusOutEvent(QFocusEvent *ev);
+ void focusOutEvent(TQFocusEvent *ev);
/** reimplemented to support the hint display */
- void drawContents( QPainter *);
+ void drawContents( TQPainter *);
/**
* Overridden so that the period key on the numeric keypad always sends
* out the currently selected monetary decimal symbol instead of the
* key defined by the keymap.
*
- * Example: If you have set the keymap (keyboard layout) as English, then
+ * Example: If you have set the keymap (keyboard tqlayout) as English, then
* the numeric keypad will send a period but if you have set the keymap to
* be German, the same key will send a comma.
*
- * @param ev pointer to current QKeyEvent
+ * @param ev pointer to current TQKeyEvent
*/
- void keyPressEvent(QKeyEvent* ev);
+ void keyPressEvent(TQKeyEvent* ev);
/**
* Overridden so that the period key on the numeric keypad always sends
* out the currently selected monetary decimal symbol instead of the
* key defined by the keymap.
*
- * Example: If you have set the keymap (keyboard layout) as English, then
+ * Example: If you have set the keymap (keyboard tqlayout) as English, then
* the numeric keypad will send a period but if you have set the keymap to
* be German, the same key will send a comma.
*
- * @param ev pointer to current QKeyEvent
+ * @param ev pointer to current TQKeyEvent
*/
- void keyReleaseEvent(QKeyEvent* ev);
+ void keyReleaseEvent(TQKeyEvent* ev);
private:
/**
@@ -118,12 +119,12 @@ private:
* and as comparison during focusOutEvent() to emit the lineChanged
* signal if the current text is different.
*/
- QString m_text;
+ TQString m_text;
/**
* This member tells what to display as hint as long as the field is empty
*/
- QString m_hint;
+ TQString m_hint;
/**
* This member keeps the status if overriding the numeric keypad comma key
diff --git a/kmymoney2/widgets/kmymoneylistviewitem.cpp b/kmymoney2/widgets/kmymoneylistviewitem.cpp
index 26367ad..d85fe77 100644
--- a/kmymoney2/widgets/kmymoneylistviewitem.cpp
+++ b/kmymoney2/widgets/kmymoneylistviewitem.cpp
@@ -23,7 +23,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpalette.h>
+#include <tqpalette.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -35,8 +35,8 @@
#include "kmymoneychecklistitem.h"
#include "../kmymoneyglobalsettings.h"
-KMyMoneyListViewItem::KMyMoneyListViewItem(QListView* parent, const QString& txt, const QString& key, const QString& id) :
- KListViewItem(parent, txt),
+KMyMoneyListViewItem::KMyMoneyListViewItem(TQListView* tqparent, const TQString& txt, const TQString& key, const TQString& id) :
+ KListViewItem(tqparent, txt),
m_key(key),
m_id(id),
m_isOdd(0),
@@ -46,8 +46,8 @@ KMyMoneyListViewItem::KMyMoneyListViewItem(QListView* parent, const QString& txt
m_key = txt;
}
-KMyMoneyListViewItem::KMyMoneyListViewItem(QListViewItem* parent, const QString& txt, const QString& key, const QString& id) :
- KListViewItem(parent, txt),
+KMyMoneyListViewItem::KMyMoneyListViewItem(TQListViewItem* tqparent, const TQString& txt, const TQString& key, const TQString& id) :
+ KListViewItem(tqparent, txt),
m_key(key),
m_id(id),
m_isOdd(0),
@@ -61,7 +61,7 @@ KMyMoneyListViewItem::~KMyMoneyListViewItem()
{
}
-QString KMyMoneyListViewItem::key(int column, bool ascending) const
+TQString KMyMoneyListViewItem::key(int column, bool ascending) const
{
Q_UNUSED(ascending);
@@ -71,18 +71,18 @@ QString KMyMoneyListViewItem::key(int column, bool ascending) const
}
-void KMyMoneyListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KMyMoneyListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{
- QColorGroup _cg = cg;
- _cg.setColor(QColorGroup::Base, backgroundColor());
+ TQColorGroup _cg = cg;
+ _cg.setColor(TQColorGroup::Base, backgroundColor());
// make sure to bypass KListViewItem::paintCell() as
// we don't like it's logic - that's why we do this
// here ;-) (ipwizard)
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ TQListViewItem::paintCell(p, _cg, column, width, tqalignment);
}
-const QColor KMyMoneyListViewItem::backgroundColor()
+const TQColor KMyMoneyListViewItem::backgroundColor()
{
return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor();
}
@@ -102,15 +102,15 @@ bool KMyMoneyListViewItem::isAlternate(void)
KMyMoneyCheckListItem* clItem;
KMyMoneyListViewItem* liItem;
bool previous = true;
- if(QListViewItem::parent()) {
- clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent());
- liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent());
+ if(TQListViewItem::tqparent()) {
+ clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent());
+ liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent());
if(clItem)
previous = clItem->m_isOdd;
else
previous = liItem->m_isOdd;
- clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()->firstChild());
- liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()->firstChild());
+ clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()->firstChild());
+ liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()->firstChild());
} else {
clItem = dynamic_cast<KMyMoneyCheckListItem *>(listView()->firstChild());
liItem = dynamic_cast<KMyMoneyListViewItem*>(listView()->firstChild());
diff --git a/kmymoney2/widgets/kmymoneylistviewitem.h b/kmymoney2/widgets/kmymoneylistviewitem.h
index 64f7562..4009aef 100644
--- a/kmymoney2/widgets/kmymoneylistviewitem.h
+++ b/kmymoney2/widgets/kmymoneylistviewitem.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qobject.h>
+#include <tqobject.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -34,32 +34,33 @@
class KMyMoneyCheckListItem;
/**
- * This class implements a derived version of a QListViewItem that
+ * This class implements a derived version of a TQListViewItem that
* allows the storage of an engine object id with the object
*
* @author Thomas Baumgart
*/
-class KMyMoneyListViewItem : public QObject, public KListViewItem
+class KMyMoneyListViewItem : public TQObject, public KListViewItem
{
friend class KMyMoneyCheckListItem;
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyListViewItem(QListView *parent, const QString& txt, const QString& key, const QString& id);
- KMyMoneyListViewItem(QListViewItem *parent, const QString& txt, const QString& key, const QString& id);
+ KMyMoneyListViewItem(TQListView *tqparent, const TQString& txt, const TQString& key, const TQString& id);
+ KMyMoneyListViewItem(TQListViewItem *tqparent, const TQString& txt, const TQString& key, const TQString& id);
~KMyMoneyListViewItem();
- const QString& id(void) const { return m_id; };
+ const TQString& id(void) const { return m_id; };
/**
* use my own paint method
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment);
/**
* use my own backgroundColor method
*/
- const QColor backgroundColor();
+ const TQColor backgroundColor();
/**
* This method returns a const reference to the key passed to the constructor. The column
@@ -67,7 +68,7 @@ public:
* the constructor concatenated with the value returned by text(0) is returned. For @a column
* equals to 1, the @a key as passed to the constructor except the first character is returned.
*/
- QString key(int column, bool ascending) const;
+ TQString key(int column, bool ascending) const;
/**
@@ -76,8 +77,8 @@ public:
bool isAlternate(void);
private:
- QString m_key;
- QString m_id;
+ TQString m_key;
+ TQString m_id;
// copied from KListViewItem()
unsigned int m_isOdd : 1;
unsigned int m_isKnown : 1;
diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp
index 125cc13..6704c9c 100644
--- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp
+++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp
@@ -18,7 +18,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qregexp.h>
+#include <tqregexp.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -38,11 +38,11 @@
#include "kmymoneyonlinequoteconfig.h"
#include "../converter/webpricequote.h"
-kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char *name )
- : kMyMoneyOnlineQuoteConfigDecl(parent, name)
+kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(TQWidget *tqparent, const char *name )
+ : kMyMoneyOnlineQuoteConfigDecl(tqparent, name)
{
#if 1
- QStringList groups = WebPriceQuote::quoteSources();
+ TQStringList groups = WebPriceQuote::quoteSources();
loadList(true /*updateResetList*/);
@@ -50,35 +50,35 @@ kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char
KIconLoader* il = KGlobal::iconLoader();
KGuiItem updateButtenItem( i18n("&Update" ),
- QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)),
+ TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)),
i18n("Accepts the entered data and stores it"),
i18n("Use this to accept the modified data."));
m_updateButton->setGuiItem(updateButtenItem);
KGuiItem deleteButtenItem( i18n( "&Delete" ),
- QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)),
+ TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)),
i18n("Delete the selected source entry"),
i18n("Use this to delete the selected online source entry"));
m_deleteButton->setGuiItem(deleteButtenItem);
KGuiItem newButtenItem( i18n( "&New..." ),
- QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)),
+ TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)),
i18n("Create a new source entry for online quotes"),
i18n("Use this to create a new entry for online quotes"));
m_newButton->setGuiItem(newButtenItem);
- connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdateEntry()));
- connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewEntry()));
+ connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateEntry()));
+ connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewEntry()));
- connect(m_quoteSourceList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*)));
- connect(m_quoteSourceList, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*)));
- connect(m_quoteSourceList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)), this, SLOT(slotEntryRenamed(QListViewItem*,const QString&,int)));
+ connect(m_quoteSourceList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*)));
+ connect(m_quoteSourceList, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*)));
+ connect(m_quoteSourceList, TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)), this, TQT_SLOT(slotEntryRenamed(TQListViewItem*,const TQString&,int)));
- connect(m_editURL, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged()));
- connect(m_editSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged()));
- connect(m_editDate, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged()));
- connect(m_editDateFormat, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged()));
- connect(m_editPrice, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged()));
+ connect(m_editURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged()));
+ connect(m_editSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged()));
+ connect(m_editDate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged()));
+ connect(m_editDateFormat, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged()));
+ connect(m_editPrice, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged()));
// FIXME deleting a source is not yet implemented
m_deleteButton->setEnabled(false);
@@ -87,30 +87,30 @@ kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char
void kMyMoneyOnlineQuoteConfig::loadList(const bool updateResetList)
{
- QStringList groups = WebPriceQuote::quoteSources();
+ TQStringList groups = WebPriceQuote::quoteSources();
if(updateResetList)
m_resetList.clear();
m_quoteSourceList->clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = groups.begin(); it != groups.end(); ++it) {
- new QListViewItem(m_quoteSourceList, *it);
+ new TQListViewItem(m_quoteSourceList, *it);
if(updateResetList)
m_resetList += WebPriceQuoteSource(*it);
}
- QListViewItem* first = m_quoteSourceList->firstChild();
+ TQListViewItem* first = m_quoteSourceList->firstChild();
if(first)
m_quoteSourceList->setSelected(first, true);
slotLoadWidgets(first);
- m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0);
+ m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0);
}
void kMyMoneyOnlineQuoteConfig::resetConfig(void)
{
- QStringList::ConstIterator it;
- QStringList groups = WebPriceQuote::quoteSources();
+ TQStringList::ConstIterator it;
+ TQStringList groups = WebPriceQuote::quoteSources();
// delete all currently defined entries
for(it = groups.begin(); it != groups.end(); ++it) {
@@ -118,7 +118,7 @@ void kMyMoneyOnlineQuoteConfig::resetConfig(void)
}
// and write back the one's from the reset list
- QValueList<WebPriceQuoteSource>::ConstIterator itr;
+ TQValueList<WebPriceQuoteSource>::ConstIterator itr;
for(itr = m_resetList.begin(); itr != m_resetList.end(); ++itr) {
(*itr).write();
}
@@ -126,17 +126,17 @@ void kMyMoneyOnlineQuoteConfig::resetConfig(void)
loadList();
}
-void kMyMoneyOnlineQuoteConfig::slotLoadWidgets(QListViewItem* item)
+void kMyMoneyOnlineQuoteConfig::slotLoadWidgets(TQListViewItem* item)
{
m_editURL->setEnabled(true);
m_editSymbol->setEnabled(true);
m_editPrice->setEnabled(true);
m_editDate->setEnabled(true);
- m_editURL->setText(QString());
- m_editSymbol->setText(QString());
- m_editPrice->setText(QString());
- m_editDate->setText(QString());
- m_editDateFormat->setText(QString());
+ m_editURL->setText(TQString());
+ m_editSymbol->setText(TQString());
+ m_editPrice->setText(TQString());
+ m_editDate->setText(TQString());
+ m_editDateFormat->setText(TQString());
if(item) {
m_currentItem = WebPriceQuoteSource(item->text(0));
@@ -185,17 +185,17 @@ void kMyMoneyOnlineQuoteConfig::slotNewEntry(void)
WebPriceQuoteSource newSource(i18n("New Quote Source"));
newSource.write();
loadList();
- QListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0);
+ TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0);
if(item) {
m_quoteSourceList->setSelected(item, true);
slotLoadWidgets(item);
}
}
-void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(QListViewItem* item, const QString& text, int /* col */)
+void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(TQListViewItem* item, const TQString& text, int /* col */)
{
int nameCount = 0;
- QListViewItemIterator it(m_quoteSourceList);
+ TQListViewItemIterator it(m_quoteSourceList);
while(it.current()) {
if(it.current()->text(0) == text)
++nameCount;
@@ -208,7 +208,7 @@ void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(QListViewItem* item, const QStr
} else {
item->setText(0, m_currentItem.m_name);
}
- m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0);
+ m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0);
}
#include "kmymoneyonlinequoteconfig.moc"
diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.h b/kmymoney2/widgets/kmymoneyonlinequoteconfig.h
index f00cbdb..6a7a02c 100644
--- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.h
+++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.h
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#ifndef KMYMONEYONLINEQUOTECONFIG_H
-#define KMYMONEYONLINEQUOTECONFIG_H
+#ifndef KMYMONEYONLINETQUOTECONFIG_H
+#define KMYMONEYONLINETQUOTECONFIG_H
// ----------------------------------------------------------------------------
// QT Includes
@@ -33,8 +33,9 @@
class kMyMoneyOnlineQuoteConfig : public kMyMoneyOnlineQuoteConfigDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyOnlineQuoteConfig(QWidget* parent, const char *name);
+ kMyMoneyOnlineQuoteConfig(TQWidget* tqparent, const char *name);
virtual ~kMyMoneyOnlineQuoteConfig() {}
void writeConfig(void) {}
@@ -43,16 +44,16 @@ public:
protected slots:
void slotUpdateEntry(void);
- void slotLoadWidgets(QListViewItem* item);
+ void slotLoadWidgets(TQListViewItem* item);
void slotEntryChanged(void);
void slotNewEntry(void);
- void slotEntryRenamed(QListViewItem* item, const QString& text, int col);
+ void slotEntryRenamed(TQListViewItem* item, const TQString& text, int col);
protected:
void loadList(const bool updateResetList = false);
private:
- QValueList<WebPriceQuoteSource> m_resetList;
+ TQValueList<WebPriceQuoteSource> m_resetList;
WebPriceQuoteSource m_currentItem;
};
diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui b/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui
index 0131edd..fcd6250 100644
--- a/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui
+++ b/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>kMyMoneyOnlineQuoteConfigDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyOnlineQuoteConfigDecl</cstring>
</property>
@@ -12,7 +12,7 @@
<height>487</height>
</rect>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -58,7 +58,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupParsing</cstring>
</property>
@@ -69,15 +69,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -85,7 +85,7 @@
<string>Date</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -128,7 +128,7 @@
<string>Enter the URL from which stock quotes will be fetched. &lt;b&gt;%1&lt;/b&gt; will be replaced with the symbol for the security being quoted. For currency conversions, &lt;b&gt;%2&lt;/b&gt; will be replaced with the currency to be quoted and &lt;b&gt;%1&lt;/b&gt; with the currency the quote is based on.</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -144,7 +144,7 @@
<string>Regular Expression to extract the date from the downloaded data</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -152,7 +152,7 @@
<string>Date Format</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -162,7 +162,7 @@
</widget>
</grid>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -172,9 +172,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<hbox>
<property name="name">
@@ -206,7 +206,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>240</width>
<height>20</height>
@@ -227,5 +227,5 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneypriceview.cpp b/kmymoney2/widgets/kmymoneypriceview.cpp
index 1b884d2..d1b5c85 100644
--- a/kmymoney2/widgets/kmymoneypriceview.cpp
+++ b/kmymoney2/widgets/kmymoneypriceview.cpp
@@ -23,11 +23,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qheader.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -62,7 +62,7 @@
#define SOURCE_COL 4
KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) :
- KMyMoneyListViewItem(view, QString(), QString(), QString()),
+ KMyMoneyListViewItem(view, TQString(), TQString(), TQString()),
m_pr(pr)
{
MyMoneySecurity from, to;
@@ -74,7 +74,7 @@ KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) :
m_pr = MyMoneyFile::instance()->price(m_pr.from(), m_pr.to(), m_pr.date());
if(m_pr.isValid()) {
- QString priceBase = m_pr.to();
+ TQString priceBase = m_pr.to();
from = MyMoneyFile::instance()->security(m_pr.from());
to = MyMoneyFile::instance()->security(m_pr.to());
if(!to.isCurrency()) {
@@ -91,7 +91,7 @@ KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) :
}
}
-int KMyMoneyPriceItem::compare(QListViewItem* i, int col, bool ascending) const
+int KMyMoneyPriceItem::compare(TQListViewItem* i, int col, bool ascending) const
{
KMyMoneyPriceItem* item = static_cast<KMyMoneyPriceItem*>(i);
int rc = 0;
@@ -105,21 +105,21 @@ int KMyMoneyPriceItem::compare(QListViewItem* i, int col, bool ascending) const
break;
case PRICE_COL: // value
- if(m_pr.rate(QString()) > item->m_pr.rate(QString()))
+ if(m_pr.rate(TQString()) > item->m_pr.rate(TQString()))
rc = 1;
- else if(m_pr.rate(QString()) < item->m_pr.rate(QString()))
+ else if(m_pr.rate(TQString()) < item->m_pr.rate(TQString()))
rc = -1;
break;
default:
- rc = QListViewItem::compare(i, col, ascending);
+ rc = TQListViewItem::compare(i, col, ascending);
break;
}
return rc;
}
-KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) :
- KListView(parent,name),
+KMyMoneyPriceView::KMyMoneyPriceView(TQWidget *tqparent, const char *name ) :
+ KListView(tqparent,name),
m_contextMenu(0),
m_showAll(false)
{
@@ -130,8 +130,8 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) :
addColumn(i18n("Source"));
setAllColumnsShowFocus(true);
setMultiSelection(false);
- setColumnWidthMode(0, QListView::Maximum);
- setColumnWidthMode(1, QListView::Maximum);
+ setColumnWidthMode(0, TQListView::Maximum);
+ setColumnWidthMode(1, TQListView::Maximum);
setShowSortIndicator(true);
setSorting(COMMODITY_COL);
@@ -143,24 +143,24 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) :
m_contextMenu->insertTitle(i18n("Price Options"));
m_contextMenu->insertItem(kiconloader->loadIcon("filenew", KIcon::Small),
i18n("New..."),
- this, SIGNAL(newPrice()));
+ this, TQT_SIGNAL(newPrice()));
m_contextMenu->insertItem(kiconloader->loadIcon("edit", KIcon::Small),
i18n("Edit..."),
- this, SIGNAL(editPrice()));
+ this, TQT_SIGNAL(editPrice()));
m_contextMenu->insertItem(kiconloader->loadIcon("connect_creating", KIcon::Small),
i18n("Online Price Update..."),
- this, SIGNAL(onlinePriceUpdate()));
+ this, TQT_SIGNAL(onlinePriceUpdate()));
m_contextMenu->insertItem(kiconloader->loadIcon("delete", KIcon::Small),
i18n("Delete..."),
- this, SIGNAL(deletePrice()));
+ this, TQT_SIGNAL(deletePrice()));
- connect(this, SIGNAL(rightButtonClicked(QListViewItem* , const QPoint&, int)),
- this, SLOT(slotListClicked(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(rightButtonClicked(TQListViewItem* , const TQPoint&, int)),
+ this, TQT_SLOT(slotListClicked(TQListViewItem*, const TQPoint&, int)));
- // connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadWidget()));
+ // connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadWidget()));
// slotReloadWidget();
@@ -169,7 +169,7 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) :
// way to solve this problem is to postpone the setup of the size
// to the time when the widget is on the screen.
resize(width()-1, height()-1);
- QTimer::singleShot(50, this, SLOT(slotTimerDone()));
+ TQTimer::singleShot(50, this, TQT_SLOT(slotTimerDone()));
}
KMyMoneyPriceView::~KMyMoneyPriceView()
@@ -209,7 +209,7 @@ void KMyMoneyPriceView::slotReloadWidget(void)
}
#endif
-void KMyMoneyPriceView::resizeEvent(QResizeEvent* e)
+void KMyMoneyPriceView::resizeEvent(TQResizeEvent* e)
{
int w = visibleWidth()/5;
@@ -223,7 +223,7 @@ void KMyMoneyPriceView::resizeEvent(QResizeEvent* e)
KListView::resizeEvent(e);
}
-void KMyMoneyPriceView::slotListClicked(QListViewItem* item, const QPoint&, int)
+void KMyMoneyPriceView::slotListClicked(TQListViewItem* item, const TQPoint&, int)
{
int editId = m_contextMenu->idAt(2);
int updateId = m_contextMenu->idAt(3);
@@ -248,7 +248,7 @@ void KMyMoneyPriceView::slotListClicked(QListViewItem* item, const QPoint&, int)
else
m_contextMenu->setItemEnabled(updateId, false );
- m_contextMenu->exec(QCursor::pos());
+ m_contextMenu->exec(TQCursor::pos());
}
#if 0
@@ -269,7 +269,7 @@ void KMyMoneyPriceView::slotNewPrice(void)
m_priceHistory->setSelected(p, true);
// If the user cancels the following operation, we delete the new item
// and re-select any previously selected one
- if(slotEditPrice() == QDialog::Rejected) {
+ if(slotEditPrice() == TQDialog::Rejected) {
delete p;
if(item)
m_priceHistory->setSelected(item, true);
@@ -279,7 +279,7 @@ void KMyMoneyPriceView::slotNewPrice(void)
int KMyMoneyPriceView::slotEditPrice(void)
{
- int rc = QDialog::Rejected;
+ int rc = TQDialog::Rejected;
kMyMoneyPriceItem* item = dynamic_cast<kMyMoneyPriceItem*>(m_priceHistory->selectedItem());
if(item) {
MyMoneySecurity from(MyMoneyFile::instance()->security(item->price().from()));
@@ -333,7 +333,7 @@ void KMyMoneyPriceView::slotOnlinePriceUpdate(void)
if(item)
{
KEquityPriceUpdateDlg dlg(this, (item->text(COMMODITY_COL)+" "+item->text(CURRENCY_COL)).utf8());
- if(dlg.exec() == QDialog::Accepted)
+ if(dlg.exec() == TQDialog::Accepted)
dlg.storePrices();
}
}
diff --git a/kmymoney2/widgets/kmymoneypriceview.h b/kmymoney2/widgets/kmymoneypriceview.h
index 56907ac..0de47ef 100644
--- a/kmymoney2/widgets/kmymoneypriceview.h
+++ b/kmymoney2/widgets/kmymoneypriceview.h
@@ -21,8 +21,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-// class QListViewItem;
+#include <tqwidget.h>
+// class TQListViewItem;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -47,7 +47,7 @@ public:
KMyMoneyPriceItem(KListView *, const MyMoneyPrice& pr);
~KMyMoneyPriceItem() {}
- int compare(QListViewItem *p, int col, bool ascending) const;
+ int compare(TQListViewItem *p, int col, bool ascending) const;
const MyMoneyPrice& price(void) const { return m_pr; };
@@ -59,16 +59,17 @@ private:
class KMyMoneyPriceView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyPriceView(QWidget *parent=0, const char *name=0);
+ KMyMoneyPriceView(TQWidget *tqparent=0, const char *name=0);
~KMyMoneyPriceView();
protected:
/// the resize event
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
protected slots:
- void slotListClicked(QListViewItem* item, const QPoint&, int);
+ void slotListClicked(TQListViewItem* item, const TQPoint&, int);
private slots:
void slotTimerDone(void);
diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui
index 0d94537..a744590 100644
--- a/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui
+++ b/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>kMyMoneyReportConfigTab1Decl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyReportConfigTab1Decl</cstring>
</property>
@@ -25,15 +25,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout35</cstring>
+ <cstring>tqlayout35</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -41,7 +41,7 @@
<string>Report Name</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>m_editName</cstring>
</property>
@@ -51,15 +51,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout36</cstring>
+ <cstring>tqlayout36</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -67,7 +67,7 @@
<string>Comment</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>m_editComment</cstring>
</property>
@@ -77,7 +77,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkCurrency</cstring>
</property>
@@ -89,7 +89,7 @@
<comment>Convert 'em!!</comment>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkFavorite</cstring>
</property>
@@ -110,7 +110,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -119,5 +119,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui
index 1ad7cf0..ac0c5f3 100644
--- a/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui
+++ b/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>kMyMoneyReportConfigTab2Decl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyReportConfigTab2Decl</cstring>
</property>
@@ -25,23 +25,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -49,7 +49,7 @@
<string>Detail</string>
</property>
</widget>
- <widget class="QComboBox" row="3" column="1">
+ <widget class="TQComboBox" row="3" column="1">
<item>
<property name="text">
<string>All</string>
@@ -77,7 +77,7 @@
<string>&lt;p&gt;Choose what kind of accounts to display as the rows of this report.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QFrame" row="0" column="2">
+ <widget class="TQFrame" row="0" column="2">
<property name="name">
<cstring>m_budgetFrame</cstring>
</property>
@@ -97,7 +97,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -112,7 +112,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -120,7 +120,7 @@
<string>Columns</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>Daily</string>
@@ -158,7 +158,7 @@
<string>&lt;p&gt;Choose how large of a time period each column should encompass&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>Income &amp; Expenses</string>
@@ -176,7 +176,7 @@
<string>&lt;p&gt;Choose what kind of accounts to display as the rows of this report.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -184,7 +184,7 @@
<string>Rows</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>m_checkTotalColumn</cstring>
</property>
@@ -195,7 +195,7 @@
<string>Show totals column</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -203,7 +203,7 @@
<string>Average days</string>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="1">
+ <widget class="TQSpinBox" row="4" column="1">
<property name="name">
<cstring>m_movingAverageDays</cstring>
</property>
@@ -226,7 +226,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>94</width>
<height>21</height>
@@ -235,7 +235,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkScheduled</cstring>
</property>
@@ -243,7 +243,7 @@
<string>Include scheduled transactions</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkTransfers</cstring>
</property>
@@ -251,7 +251,7 @@
<string>Include transfers</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkUnused</cstring>
</property>
@@ -269,7 +269,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -278,5 +278,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui
index 2284c1f..3a29c6e 100644
--- a/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui
+++ b/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>kMyMoneyReportConfigTab3Decl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyReportConfigTab3Decl</cstring>
</property>
@@ -33,15 +33,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -61,7 +61,7 @@
<string>Organize by:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Categories</string>
@@ -125,7 +125,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>358</width>
<height>16</height>
@@ -134,15 +134,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -170,11 +170,11 @@
<property name="spacing">
<number>2</number>
</property>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>m_checkMemo</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -187,7 +187,7 @@
<string>&lt;p&gt;Select this option to show the Memo column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="3">
+ <widget class="TQCheckBox" row="0" column="3">
<property name="name">
<cstring>m_checkShares</cstring>
</property>
@@ -198,7 +198,7 @@
<string>&lt;p&gt;Select this option to show the Shares column for investments&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="3">
+ <widget class="TQCheckBox" row="1" column="3">
<property name="name">
<cstring>m_checkPrice</cstring>
</property>
@@ -209,7 +209,7 @@
<string>&lt;p&gt;Select this option to show the Price column for investments&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="2">
+ <widget class="TQCheckBox" row="1" column="2">
<property name="name">
<cstring>m_checkReconciled</cstring>
</property>
@@ -220,7 +220,7 @@
<string>&lt;p&gt;Select this option to show the Reconciled column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="2">
+ <widget class="TQCheckBox" row="0" column="2">
<property name="name">
<cstring>m_checkAccount</cstring>
</property>
@@ -231,11 +231,11 @@
<string>&lt;p&gt;Select this option to show the Account column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_checkNumber</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -248,11 +248,11 @@
<string>&lt;p&gt;Select this option to show the Number column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>m_checkPayee</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -265,11 +265,11 @@
<string>&lt;p&gt;Select this option to show the Payee column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>m_checkCategory</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -282,7 +282,7 @@
<string>&lt;p&gt;Select this option to show the Category column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="4">
+ <widget class="TQCheckBox" row="0" column="4">
<property name="name">
<cstring>m_checkAction</cstring>
</property>
@@ -293,7 +293,7 @@
<string>&lt;p&gt;Select this option to show the Action column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="4">
+ <widget class="TQCheckBox" row="1" column="4">
<property name="name">
<cstring>m_checkBalance</cstring>
</property>
@@ -316,7 +316,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>205</width>
<height>20</height>
@@ -325,15 +325,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>m_checkLoans</cstring>
</property>
@@ -341,7 +341,7 @@
<string>Include only Loan accounts</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>m_checkInvestments</cstring>
</property>
@@ -352,7 +352,7 @@
<string>&lt;p&gt;Check this box to include only those categories which have been marked to "Include on Tax Reports"&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>m_checkHideSplitDetails</cstring>
</property>
@@ -363,7 +363,7 @@
<string>Do not display the individual transactions that make up a split transaction</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_checkTax</cstring>
</property>
@@ -386,7 +386,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -433,5 +433,5 @@
<slot>setDisabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui b/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui
index 2aa9126..07415f9 100644
--- a/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui
+++ b/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0">
<class>kMyMoneyReportConfigTabChartDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyReportConfigTabChartDecl</cstring>
</property>
@@ -25,15 +25,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -52,7 +52,7 @@
<string>&lt;p&gt;Select what form you would like the chart to be drawn as.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Line</string>
@@ -92,7 +92,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>121</width>
<height>20</height>
@@ -101,7 +101,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkGridLines</cstring>
</property>
@@ -112,7 +112,7 @@
<string>&lt;p&gt;Select this option to show horizontal and vertical grid lines on the chart.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkValues</cstring>
</property>
@@ -123,7 +123,7 @@
<string>&lt;p&gt;Select this option to draw the numeric values for data points next to their plot location.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkShowChart</cstring>
</property>
@@ -134,15 +134,15 @@
<string>&lt;p&gt;Select this option to cause the report to be shown as a chart when you first open the report. Otherwise, it will come up as a text report.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -161,7 +161,7 @@
<string>&lt;p&gt;Select what width should be used to draw the line on the chart&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>m_lineWidth</cstring>
</property>
@@ -182,7 +182,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>121</width>
<height>20</height>
@@ -201,7 +201,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -210,5 +210,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneyreportcontroldecl.ui b/kmymoney2/widgets/kmymoneyreportcontroldecl.ui
index 2d0e0e3..697d0a8 100644
--- a/kmymoney2/widgets/kmymoneyreportcontroldecl.ui
+++ b/kmymoney2/widgets/kmymoneyreportcontroldecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>kMyMoneyReportControlDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kMyMoneyReportControlDecl</cstring>
</property>
@@ -25,11 +25,11 @@
<property name="spacing">
<number>1</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonChart</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -42,11 +42,11 @@
<string>Show the chart version of this report</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonConfigure</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -59,11 +59,11 @@
<string>Configure this report</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonNew</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -76,11 +76,11 @@
<string>Create a new report based on this one</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCopy</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -93,11 +93,11 @@
<string>Copy this report to the clipboard</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonExport</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -110,11 +110,11 @@
<string>Export this report as an HTML or CSV file</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDelete</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -127,11 +127,11 @@
<string>Permanently delete this report</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonClose</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -146,5 +146,5 @@
</widget>
</hbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp b/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp
index 6c17a33..0e203cc 100644
--- a/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp
+++ b/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp
@@ -22,8 +22,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpushbutton.h>
-#include <qkeysequence.h>
+#include <tqpushbutton.h>
+#include <tqkeysequence.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,19 +36,19 @@
#include "../widgets/kmymoneyscheduledcalendar.h"
#include "../mymoney/mymoneyfile.h"
-kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(QWidget *parent, const char *name )
- : kMyMoneyCalendar(parent,name)
+kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(TQWidget *tqparent, const char *name )
+ : kMyMoneyCalendar(tqparent,name)
{
- QPushButton *pb1 = new QPushButton(i18n("Select Schedules"), this);
+ TQPushButton *pb1 = new TQPushButton(i18n("Select Schedules"), this);
kpopupmenu = new KPopupMenu(this);
kpopupmenu->setCheckable(true);
kpopupmenu->insertItem(i18n("Bills"), 0);
kpopupmenu->insertItem(i18n("Deposits"), 1);
kpopupmenu->insertItem(i18n("Transfers"), 2);
- kpopupmenu->connectItem(0, this, SLOT(slotSetViewBills()));
- kpopupmenu->connectItem(1, this, SLOT(slotSetViewDeposits()));
- kpopupmenu->connectItem(2, this, SLOT(slotSetViewTransfers()));
+ kpopupmenu->connectItem(0, this, TQT_SLOT(slotSetViewBills()));
+ kpopupmenu->connectItem(1, this, TQT_SLOT(slotSetViewDeposits()));
+ kpopupmenu->connectItem(2, this, TQT_SLOT(slotSetViewTransfers()));
kpopupmenu->setItemChecked(0, true);
kpopupmenu->setItemChecked(1, true);
kpopupmenu->setItemChecked(2, true);
@@ -59,12 +59,12 @@ kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(QWidget *parent, const char
setUserButton1(true, pb1);
- init( QDate::currentDate() );
+ init( TQDate::tqcurrentDate() );
- connect(m_scheduledDateTable, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)),
- this, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)));
- connect(m_scheduledDateTable, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)),
- this, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)));
+ connect(m_scheduledDateTable, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)),
+ this, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)));
+ connect(m_scheduledDateTable, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)),
+ this, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)));
}
kMyMoneyScheduledCalendar::~kMyMoneyScheduledCalendar()
diff --git a/kmymoney2/widgets/kmymoneyscheduledcalendar.h b/kmymoney2/widgets/kmymoneyscheduledcalendar.h
index 1543b5a..b8e9096 100644
--- a/kmymoney2/widgets/kmymoneyscheduledcalendar.h
+++ b/kmymoney2/widgets/kmymoneyscheduledcalendar.h
@@ -49,12 +49,13 @@ class kMyMoneyDateTbl;
**/
class kMyMoneyScheduledCalendar : public kMyMoneyCalendar {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Standard constructor.
**/
- kMyMoneyScheduledCalendar(QWidget *parent=0, const char *name=0);
+ kMyMoneyScheduledCalendar(TQWidget *tqparent=0, const char *name=0);
/**
* Standard destructor.
@@ -68,11 +69,11 @@ public:
void refresh() { m_scheduledDateTable->refresh(); }
- void setFilterAccounts(const QStringList& list) { m_scheduledDateTable->setFilterAccounts(list); }
+ void setFilterAccounts(const TQStringList& list) { m_scheduledDateTable->setFilterAccounts(list); }
signals:
- void enterClicked(const MyMoneySchedule&, const QDate&);
- void skipClicked(const MyMoneySchedule&, const QDate&);
+ void enterClicked(const MyMoneySchedule&, const TQDate&);
+ void skipClicked(const MyMoneySchedule&, const TQDate&);
protected slots:
void slotSetViewBills();
diff --git a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
index 870abd5..6490b7f 100644
--- a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
+++ b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
@@ -42,13 +42,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qstring.h>
-#include <qpen.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qdrawutil.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqdrawutil.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -62,34 +62,34 @@
#include "kmymoneyscheduleddatetbl.h"
#include "../mymoney/mymoneyfile.h"
-kMyMoneyScheduledDateTbl::kMyMoneyScheduledDateTbl(QWidget *parent, QDate date_, const char* name, WFlags f )
- : kMyMoneyDateTbl(parent, date_, name, f),
+kMyMoneyScheduledDateTbl::kMyMoneyScheduledDateTbl(TQWidget *tqparent, TQDate date_, const char* name, WFlags f )
+ : kMyMoneyDateTbl(tqparent, date_, name, f),
m_filterBills(false), m_filterDeposits(false), m_filterTransfers(false)
{
- connect(&briefWidget, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)), this, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)));
- connect(&briefWidget, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)), this, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)));
+ connect(&briefWidget, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)));
+ connect(&briefWidget, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)));
}
kMyMoneyScheduledDateTbl::~kMyMoneyScheduledDateTbl()
{
}
-void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, int /*col*/, const QDate& theDate)
+void kMyMoneyScheduledDateTbl::drawCellContents(TQPainter *painter, int /*row*/, int /*col*/, const TQDate& theDate)
{
- QRect rect;
- QString text;
+ TQRect rect;
+ TQString text;
int w=cellWidth();
int h=cellHeight();
- QPen pen;
- QBrush brushBlue(KGlobalSettings::activeTitleColor());
- QBrush brushLightblue(KGlobalSettings::baseColor());
- QFont font=KGlobalSettings::generalFont();
+ TQPen pen;
+ TQBrush brushBlue(KGlobalSettings::activeTitleColor());
+ TQBrush brushLightblue(KGlobalSettings::baseColor());
+ TQFont font=KGlobalSettings::generalFont();
MyMoneyFile *file = MyMoneyFile::instance();
// -----
font.setPointSize(fontsize);
- QFont fontLarge(font);
- QFont fontSmall(font);
+ TQFont fontLarge(font);
+ TQFont fontSmall(font);
fontLarge.setPointSize(fontsize*2);
fontSmall.setPointSize(fontsize-1);
@@ -101,11 +101,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
if (theDate.month() != date.month())
{
painter->setFont(fontSmall);
- pen = lightGray;
+ pen = TQPen(lightGray);
}
else
{
- pen = gray;
+ pen = TQPen(gray);
}
if (theDate == date)
@@ -114,11 +114,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
{ // draw the currently selected date
painter->setPen(KGlobalSettings::highlightColor());
painter->setBrush(KGlobalSettings::highlightColor());
- pen=white;
+ pen=TQPen(white);
} else {
painter->setPen(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor()));
painter->setBrush(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor()));
- pen=white;
+ pen=TQPen(white);
}
} else {
painter->setBrush(KGlobalSettings::baseColor());
@@ -126,12 +126,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
}
painter->drawRect(0, 0, w, h);
painter->setPen(pen);
- text = QString::number(theDate.day());
+ text = TQString::number(theDate.day());
addDayPostfix(text);
painter->drawText(0, 0, w-2, h, AlignRight, text, -1, &rect);
MyMoneyFile *file = MyMoneyFile::instance();
- QValueList<MyMoneySchedule> schedules;
+ TQValueList<MyMoneySchedule> schedules;
try
{
@@ -171,12 +171,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
if (schedules.count() >= 1)
{
- QValueList<MyMoneySchedule>::Iterator iter;
+ TQValueList<MyMoneySchedule>::Iterator iter;
bool anyOverdue=false;
for (iter=schedules.begin(); iter!=schedules.end(); ++iter)
{
MyMoneySchedule schedule = *iter;
- if (theDate < QDate::currentDate())
+ if (theDate < TQDate::tqcurrentDate())
{
if (schedule.isOverdue())
{
@@ -192,12 +192,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
painter->setPen(darkGray);
painter->setFont(fontLarge);
- painter->drawText(0, 0, w, h, AlignCenter, QString::number(schedules.count()),
+ painter->drawText(0, 0, w, h, AlignCenter, TQString::number(schedules.count()),
-1, &rect);
}
painter->setPen(lightGray);
- painter->setBrush(Qt::NoBrush);
+ painter->setBrush(TQt::NoBrush);
painter->drawRect(0, 0, w, h);
}
else if (m_type == WEEKLY)
@@ -216,17 +216,17 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
painter->setPen(lightGray);
painter->drawRect(0, 0, w, h);
- text = QString::number(theDate.day());
+ text = TQString::number(theDate.day());
addDayPostfix(text);
- painter->drawText(0, 0, w-2, h, AlignRight, QDate::shortDayName(theDate.dayOfWeek()) + " " + text, -1, &rect);
+ painter->drawText(0, 0, w-2, h, AlignRight, TQDate::shortDayName(theDate.dayOfWeek()) + " " + text, -1, &rect);
- QValueList<MyMoneySchedule> billSchedules;
- QValueList<MyMoneySchedule> depositSchedules;
- QValueList<MyMoneySchedule> transferSchedules;
+ TQValueList<MyMoneySchedule> billSchedules;
+ TQValueList<MyMoneySchedule> depositSchedules;
+ TQValueList<MyMoneySchedule> transferSchedules;
try
{
- text = QString();
+ text = TQString();
if (!m_filterBills)
{
@@ -238,7 +238,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
if (billSchedules.count() >= 1)
{
- text += i18n("%1 Bills.").arg(QString::number(billSchedules.count()));
+ text += i18n("%1 Bills.").tqarg(TQString::number(billSchedules.count()));
}
}
@@ -254,7 +254,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
{
if(!text.isEmpty())
text += " ";
- text += i18n("%1 Deposits.").arg(QString::number(depositSchedules.count()));
+ text += i18n("%1 Deposits.").tqarg(TQString::number(depositSchedules.count()));
}
}
@@ -270,7 +270,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
{
if(!text.isEmpty())
text += " ";
- text += i18n("%1 Transfers.").arg(QString::number(transferSchedules.count()));
+ text += i18n("%1 Transfers.").tqarg(TQString::number(transferSchedules.count()));
}
}
}
@@ -282,11 +282,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
}
bool anyOverdue=false;
- QValueList<MyMoneySchedule>::Iterator iter;
+ TQValueList<MyMoneySchedule>::Iterator iter;
for (iter=transferSchedules.begin(); iter!=transferSchedules.end(); ++iter)
{
MyMoneySchedule schedule = *iter;
- if (theDate < QDate::currentDate())
+ if (theDate < TQDate::tqcurrentDate())
{
if (schedule.isOverdue())
{
@@ -301,7 +301,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
for (iter=depositSchedules.begin(); iter!=depositSchedules.end(); ++iter)
{
MyMoneySchedule schedule = *iter;
- if (theDate < QDate::currentDate())
+ if (theDate < TQDate::tqcurrentDate())
{
if (schedule.isOverdue())
{
@@ -316,7 +316,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
for (iter=billSchedules.begin(); iter!=billSchedules.end(); ++iter)
{
MyMoneySchedule schedule = *iter;
- if (theDate < QDate::currentDate())
+ if (theDate < TQDate::tqcurrentDate())
{
if (schedule.isOverdue())
{
@@ -337,7 +337,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
painter->drawText(0, 0, w, h, AlignCenter, text,
-1, &rect);
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
painter->setBrush(KGlobalSettings::baseColor());
@@ -346,26 +346,26 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/,
}
}
-void kMyMoneyScheduledDateTbl::addDayPostfix(QString& text)
+void kMyMoneyScheduledDateTbl::addDayPostfix(TQString& text)
{
int d = text.toInt();
if (d >= 1 && d <= 31)
{
- QStringList postfixList = QStringList::split("-", i18n("st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st"), true);
+ TQStringList postfixList = TQStringList::split("-", i18n("st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st"), true);
text += postfixList[d-1];
}
}
void kMyMoneyScheduledDateTbl::refresh()
{
- repaintContents(false);
+ tqrepaintContents(false);
}
-void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
+void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(TQMouseEvent* e)
{
int row, col, pos;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
if (isActiveWindow() || briefWidget.isVisible())
{
@@ -383,8 +383,8 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
int firstWeekDay = KGlobal::locale()->weekStartDay();
#endif
- QDate drawDate(date);
- QString text;
+ TQDate drawDate(date);
+ TQString text;
if (m_type == MONTHLY)
{
@@ -417,7 +417,7 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
else if (m_type == WEEKLY)
{
// TODO: Handle other start weekdays than Monday
- text = QDate::shortDayName(row);
+ text = TQDate::shortDayName(row);
text += " ";
int dayOfWeek = date.dayOfWeek();
@@ -434,13 +434,13 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
drawDate = date.addDays(diff);
}
- else if (m_type == QUARTERLY)
+ else if (m_type == TQUARTERLY)
{
}
m_drawDateOrig = drawDate;
MyMoneyFile *file = MyMoneyFile::instance();
- QValueList<MyMoneySchedule> schedules;
+ TQValueList<MyMoneySchedule> schedules;
try
{
@@ -484,15 +484,15 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
// Take off five pixels so the mouse cursor
// will be over the widget
- QPoint p = QCursor::pos();
- if (p.y() + h > QApplication::desktop()->height())
+ TQPoint p = TQCursor::pos();
+ if (p.y() + h > TQApplication::desktop()->height())
{
p.setY(p.y() - (h-5));
}
else
p.setY(p.y() - 5);
- if (p.x() + w > QApplication::desktop()->width())
+ if (p.x() + w > TQApplication::desktop()->width())
{
p.setX(p.x() - (w-5));
}
@@ -512,19 +512,19 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e)
void kMyMoneyScheduledDateTbl::filterBills(bool enable)
{
m_filterBills = enable;
- repaintContents(false);
+ tqrepaintContents(false);
}
void kMyMoneyScheduledDateTbl::filterDeposits(bool enable)
{
m_filterDeposits = enable;
- repaintContents(false);
+ tqrepaintContents(false);
}
void kMyMoneyScheduledDateTbl::filterTransfers(bool enable)
{
m_filterTransfers = enable;
- repaintContents(false);
+ tqrepaintContents(false);
}
#include "kmymoneyscheduleddatetbl.moc"
diff --git a/kmymoney2/widgets/kmymoneyscheduleddatetbl.h b/kmymoney2/widgets/kmymoneyscheduleddatetbl.h
index 5985a6b..e04097a 100644
--- a/kmymoney2/widgets/kmymoneyscheduleddatetbl.h
+++ b/kmymoney2/widgets/kmymoneyscheduleddatetbl.h
@@ -43,9 +43,10 @@
class kMyMoneyScheduledDateTbl : public kMyMoneyDateTbl
{
Q_OBJECT
+ TQ_OBJECT
public:
- kMyMoneyScheduledDateTbl(QWidget *parent=0,
- QDate date=QDate::currentDate(),
+ kMyMoneyScheduledDateTbl(TQWidget *tqparent=0,
+ TQDate date=TQDate::tqcurrentDate(),
const char* name=0, WFlags f=0);
~kMyMoneyScheduledDateTbl();
@@ -53,20 +54,20 @@ public:
void filterBills(bool enable);
void filterDeposits(bool enable);
void filterTransfers(bool enable);
- void setFilterAccounts(const QStringList& list) { m_filterAccounts = list; repaintContents(false); }
+ void setFilterAccounts(const TQStringList& list) { m_filterAccounts = list; tqrepaintContents(false); }
signals:
- void enterClicked(const MyMoneySchedule&, const QDate&);
- void skipClicked(const MyMoneySchedule&, const QDate&);
+ void enterClicked(const MyMoneySchedule&, const TQDate&);
+ void skipClicked(const MyMoneySchedule&, const TQDate&);
protected:
- void drawCellContents(QPainter *painter, int row, int col, const QDate& theDate);
- void addDayPostfix(QString& text);
- void contentsMouseMoveEvent(QMouseEvent* e);
+ void drawCellContents(TQPainter *painter, int row, int col, const TQDate& theDate);
+ void addDayPostfix(TQString& text);
+ void contentsMouseMoveEvent(TQMouseEvent* e);
private:
bool m_filterBills, m_filterDeposits, m_filterTransfers;
- QStringList m_filterAccounts;
+ TQStringList m_filterAccounts;
KMyMoneyBriefSchedule briefWidget;
};
diff --git a/kmymoney2/widgets/kmymoneyselector.cpp b/kmymoney2/widgets/kmymoneyselector.cpp
index 6ae07ca..5e16bf1 100644
--- a/kmymoney2/widgets/kmymoneyselector.cpp
+++ b/kmymoney2/widgets/kmymoneyselector.cpp
@@ -18,11 +18,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qheader.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqtimer.h>
+#include <tqstyle.h>
+#include <tqregexp.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,25 +36,25 @@
#include "../kmymoneyglobalsettings.h"
-KMyMoneySelector::KMyMoneySelector(QWidget *parent, const char *name, QWidget::WFlags flags) :
- QWidget(parent, name, flags)
+KMyMoneySelector::KMyMoneySelector(TQWidget *tqparent, const char *name, TQWidget::WFlags flags) :
+ TQWidget(tqparent, name, flags)
{
- m_selMode = QListView::Single;
+ m_selMode = TQListView::Single;
m_listView = new KListView(this);
// don't show horizontal scroll bar
- m_listView->setHScrollBarMode(QScrollView::AlwaysOff);
+ m_listView->setHScrollBarMode(TQScrollView::AlwaysOff);
m_listView->setSorting(-1);
- if(parent) {
- setFocusProxy(parent->focusProxy());
- m_listView->setFocusProxy(parent->focusProxy());
+ if(tqparent) {
+ setFocusProxy(tqparent->focusProxy());
+ m_listView->setFocusProxy(tqparent->focusProxy());
}
m_listView->setAllColumnsShowFocus(true);
- m_layout = new QHBoxLayout( this, 0, 6);
+ m_layout = new TQHBoxLayout( this, 0, 6);
m_listView->addColumn( "Hidden" );
m_listView->header()->hide();
@@ -64,10 +64,10 @@ KMyMoneySelector::KMyMoneySelector(QWidget *parent, const char *name, QWidget::W
m_layout->addWidget( m_listView );
// force init
- m_selMode = QListView::Multi;
- setSelectionMode(QListView::Single);
+ m_selMode = TQListView::Multi;
+ setSelectionMode(TQListView::Single);
- connect(m_listView, SIGNAL(rightButtonPressed(QListViewItem* , const QPoint&, int)), this, SLOT(slotListRightMouse(QListViewItem*, const QPoint&, int)));
+ connect(m_listView, TQT_SIGNAL(rightButtonPressed(TQListViewItem* , const TQPoint&, int)), this, TQT_SLOT(slotListRightMouse(TQListViewItem*, const TQPoint&, int)));
}
KMyMoneySelector::~KMyMoneySelector()
@@ -80,28 +80,28 @@ void KMyMoneySelector::clear(void)
m_visibleItem = 0;
}
-void KMyMoneySelector::setSelectionMode(const QListView::SelectionMode mode)
+void KMyMoneySelector::setSelectionMode(const TQListView::SelectionMode mode)
{
if(m_selMode != mode) {
m_selMode = mode;
clear();
// make sure, it's either Multi or Single
- if(mode != QListView::Multi) {
- m_selMode = QListView::Single;
- connect(m_listView, SIGNAL(selectionChanged(void)), this, SIGNAL(stateChanged(void)));
- connect(m_listView, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*)));
+ if(mode != TQListView::Multi) {
+ m_selMode = TQListView::Single;
+ connect(m_listView, TQT_SIGNAL(selectionChanged(void)), this, TQT_SIGNAL(stateChanged(void)));
+ connect(m_listView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
} else {
- disconnect(m_listView, SIGNAL(selectionChanged(void)), this, SIGNAL(stateChanged(void)));
- disconnect(m_listView, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*)));
+ disconnect(m_listView, TQT_SIGNAL(selectionChanged(void)), this, TQT_SIGNAL(stateChanged(void)));
+ disconnect(m_listView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
}
}
- QWidget::update();
+ TQWidget::update();
}
-void KMyMoneySelector::slotItemSelected(QListViewItem *item)
+void KMyMoneySelector::slotItemSelected(TQListViewItem *item)
{
- if(m_selMode == QListView::Single) {
+ if(m_selMode == TQListView::Single) {
KMyMoneyListViewItem* l_item = dynamic_cast<KMyMoneyListViewItem*>(item);
if(l_item && l_item->isSelectable()) {
emit itemSelected(l_item->id());
@@ -109,9 +109,9 @@ void KMyMoneySelector::slotItemSelected(QListViewItem *item)
}
}
-QListViewItem* KMyMoneySelector::newItem(const QString& name, QListViewItem* after, const QString& key, const QString& id, QCheckListItem::Type type)
+TQListViewItem* KMyMoneySelector::newItem(const TQString& name, TQListViewItem* after, const TQString& key, const TQString& id, TQCheckListItem::Type type)
{
- QListViewItem* item;
+ TQListViewItem* item;
if(after)
item = new KMyMoneyCheckListItem(m_listView, after, name, key, id, type);
else
@@ -122,49 +122,49 @@ QListViewItem* KMyMoneySelector::newItem(const QString& name, QListViewItem* aft
return item;
}
-QListViewItem* KMyMoneySelector::newItem(const QString& name, const QString& key, const QString& id, QCheckListItem::Type type)
+TQListViewItem* KMyMoneySelector::newItem(const TQString& name, const TQString& key, const TQString& id, TQCheckListItem::Type type)
{
return newItem(name, 0, key, id, type);
}
-QListViewItem* KMyMoneySelector::newTopItem(const QString& name, const QString& key, const QString& id)
+TQListViewItem* KMyMoneySelector::newTopItem(const TQString& name, const TQString& key, const TQString& id)
{
- QListViewItem* p;
+ TQListViewItem* p;
- if(m_selMode == QListView::Multi) {
+ if(m_selMode == TQListView::Multi) {
KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(m_listView, name, key, id);
- connect(q, SIGNAL(stateChanged(bool)), this, SIGNAL(stateChanged(void)));
- p = static_cast<QListViewItem*> (q);
+ connect(q, TQT_SIGNAL(stateChanged(bool)), this, TQT_SIGNAL(stateChanged(void)));
+ p = static_cast<TQListViewItem*> (q);
} else {
KMyMoneyListViewItem* q = new KMyMoneyListViewItem(m_listView, name, key, id);
- p = static_cast<QListViewItem*> (q);
+ p = static_cast<TQListViewItem*> (q);
}
return p;
}
-QListViewItem* KMyMoneySelector::newItem(QListViewItem* parent, const QString& name, const QString& key, const QString& id)
+TQListViewItem* KMyMoneySelector::newItem(TQListViewItem* tqparent, const TQString& name, const TQString& key, const TQString& id)
{
- QListViewItem* p;
+ TQListViewItem* p;
- if(m_selMode == QListView::Multi) {
- KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(parent, name, key, id);
- connect(q, SIGNAL(stateChanged(bool)), this, SIGNAL(stateChanged(void)));
- p = static_cast<QListViewItem*> (q);
+ if(m_selMode == TQListView::Multi) {
+ KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(tqparent, name, key, id);
+ connect(q, TQT_SIGNAL(stateChanged(bool)), this, TQT_SIGNAL(stateChanged(void)));
+ p = static_cast<TQListViewItem*> (q);
} else {
- KMyMoneyListViewItem* q = new KMyMoneyListViewItem(parent, name, key, id);
- p = static_cast<QListViewItem*> (q);
+ KMyMoneyListViewItem* q = new KMyMoneyListViewItem(tqparent, name, key, id);
+ p = static_cast<TQListViewItem*> (q);
}
return p;
}
-void KMyMoneySelector::protectItem(const QString& itemId, const bool protect)
+void KMyMoneySelector::protectItem(const TQString& itemId, const bool protect)
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
+ TQListViewItem* it_v;
KMyMoneyListViewItem* it_l;
KMyMoneyCheckListItem* it_c;
@@ -189,10 +189,10 @@ void KMyMoneySelector::protectItem(const QString& itemId, const bool protect)
}
}
-QListViewItem* KMyMoneySelector::item(const QString& id) const
+TQListViewItem* KMyMoneySelector::item(const TQString& id) const
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
+ TQListViewItem* it_v;
KMyMoneyListViewItem* it_l;
KMyMoneyCheckListItem* it_c;
@@ -213,17 +213,17 @@ QListViewItem* KMyMoneySelector::item(const QString& id) const
int KMyMoneySelector::optimizedWidth(void) const
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
+ TQListViewItem* it_v;
KMyMoneyListViewItem* it_l;
KMyMoneyCheckListItem* it_c;
// scan items
int w = 0;
#ifndef KMM_DESIGNER
- QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont());
+ TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont());
#else
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
#endif
while((it_v = it.current()) != 0) {
it_l = dynamic_cast<KMyMoneyListViewItem*>(it_v);
@@ -254,15 +254,15 @@ void KMyMoneySelector::setOptimizedWidth(void)
bool KMyMoneySelector::allItemsSelected(void) const
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
- if(m_selMode == QListView::Single)
+ if(m_selMode == TQListView::Single)
return false;
for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
- QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v);
+ if(it_c->type() == TQCheckListItem::CheckBox) {
if(!(it_c->isOn() && allItemsSelected(it_v)))
return false;
} else {
@@ -274,13 +274,13 @@ bool KMyMoneySelector::allItemsSelected(void) const
return true;
}
-bool KMyMoneySelector::allItemsSelected(const QListViewItem *item) const
+bool KMyMoneySelector::allItemsSelected(const TQListViewItem *item) const
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
- QCheckListItem* it_c = static_cast<QCheckListItem*>(it_v);
+ TQCheckListItem* it_c = static_cast<TQCheckListItem*>(it_v);
if(!(it_c->isOn() && allItemsSelected(it_v)))
return false;
}
@@ -288,16 +288,16 @@ bool KMyMoneySelector::allItemsSelected(const QListViewItem *item) const
return true;
}
-void KMyMoneySelector::removeItem(const QString& id)
+void KMyMoneySelector::removeItem(const TQString& id)
{
- QListViewItem* it_v;
- QListViewItemIterator it;
+ TQListViewItem* it_v;
+ TQListViewItemIterator it;
- it = QListViewItemIterator(m_listView);
+ it = TQListViewItemIterator(m_listView);
while((it_v = it.current()) != 0) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
if(id == it_c->id()) {
if(it_c->firstChild()) {
it_c->setSelectable(false);
@@ -319,8 +319,8 @@ void KMyMoneySelector::removeItem(const QString& id)
it++;
}
- // get rid of top items that just lost the last children (e.g. Favorites)
- it = QListViewItemIterator(m_listView, QListViewItemIterator::NotSelectable);
+ // get rid of top items that just lost the last tqchildren (e.g. Favorites)
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::NotSelectable);
while((it_v = it.current()) != 0) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
@@ -336,12 +336,12 @@ void KMyMoneySelector::removeItem(const QString& id)
void KMyMoneySelector::selectAllItems(const bool state)
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
- QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v);
+ if(it_c->type() == TQCheckListItem::CheckBox) {
it_c->setOn(state);
}
selectAllSubItems(it_v, state);
@@ -350,14 +350,14 @@ void KMyMoneySelector::selectAllItems(const bool state)
emit stateChanged();
}
-void KMyMoneySelector::selectItems(const QStringList& itemList, const bool state)
+void KMyMoneySelector::selectItems(const TQStringList& itemList, const bool state)
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox && itemList.contains(it_c->id())) {
+ if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) {
it_c->setOn(state);
}
selectSubItems(it_v, itemList, state);
@@ -366,14 +366,14 @@ void KMyMoneySelector::selectItems(const QStringList& itemList, const bool state
emit stateChanged();
}
-void KMyMoneySelector::selectSubItems(QListViewItem* item, const QStringList& itemList, const bool state)
+void KMyMoneySelector::selectSubItems(TQListViewItem* item, const TQStringList& itemList, const bool state)
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox && itemList.contains(it_c->id())) {
+ if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) {
it_c->setOn(state);
}
selectSubItems(it_v, itemList, state);
@@ -381,14 +381,14 @@ void KMyMoneySelector::selectSubItems(QListViewItem* item, const QStringList& it
}
}
-void KMyMoneySelector::selectAllSubItems(QListViewItem* item, const bool state)
+void KMyMoneySelector::selectAllSubItems(TQListViewItem* item, const bool state)
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
- QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v);
+ if(it_c->type() == TQCheckListItem::CheckBox) {
it_c->setOn(state);
}
selectAllSubItems(it_v, state);
@@ -396,12 +396,12 @@ void KMyMoneySelector::selectAllSubItems(QListViewItem* item, const bool state)
}
}
-void KMyMoneySelector::selectedItems(QStringList& list) const
+void KMyMoneySelector::selectedItems(TQStringList& list) const
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
list.clear();
- if(m_selMode == QListView::Single) {
+ if(m_selMode == TQListView::Single) {
KMyMoneyListViewItem* it_c = dynamic_cast<KMyMoneyListViewItem*>(m_listView->selectedItem());
if(it_c != 0)
list << it_c->id();
@@ -410,7 +410,7 @@ void KMyMoneySelector::selectedItems(QStringList& list) const
for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
if(it_c->isOn())
list << (*it_c).id();
}
@@ -420,14 +420,14 @@ void KMyMoneySelector::selectedItems(QStringList& list) const
}
}
-void KMyMoneySelector::selectedItems(QStringList& list, QListViewItem* item) const
+void KMyMoneySelector::selectedItems(TQStringList& list, TQListViewItem* item) const
{
- QListViewItem* it_v;
+ TQListViewItem* it_v;
for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
if(it_c->isOn())
list << (*it_c).id();
selectedItems(list, it_v);
@@ -436,17 +436,17 @@ void KMyMoneySelector::selectedItems(QStringList& list, QListViewItem* item) con
}
}
-void KMyMoneySelector::itemList(QStringList& list) const
+void KMyMoneySelector::itemList(TQStringList& list) const
{
- QListViewItemIterator it;
- QListViewItem* it_v;
+ TQListViewItemIterator it;
+ TQListViewItem* it_v;
- it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable);
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable);
while((it_v = it.current()) != 0) {
{
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
list << it_c->id();
}
} else if(it_v->rtti() == 0) {
@@ -458,18 +458,18 @@ void KMyMoneySelector::itemList(QStringList& list) const
}
}
-void KMyMoneySelector::setSelected(const QString& id, const bool state)
+void KMyMoneySelector::setSelected(const TQString& id, const bool state)
{
- QListViewItemIterator it;
- QListViewItem* it_v;
- QListViewItem* it_visible = 0;
+ TQListViewItemIterator it;
+ TQListViewItem* it_v;
+ TQListViewItem* it_visible = 0;
- it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable);
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable);
while((it_v = it.current()) != 0) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
Q_CHECK_PTR(it_c);
- if(it_c->type() == QCheckListItem::CheckBox) {
+ if(it_c->type() == TQCheckListItem::CheckBox) {
if(it_c->id() == id) {
it_c->setOn(state);
m_listView->setSelected(it_v, true);
@@ -496,18 +496,18 @@ void KMyMoneySelector::setSelected(const QString& id, const bool state)
ensureItemVisible(it_visible);
}
-void KMyMoneySelector::ensureItemVisible(const QListViewItem *it_v)
+void KMyMoneySelector::ensureItemVisible(const TQListViewItem *it_v)
{
// for some reason, I could only use the ensureItemVisible() method
- // of QListView successfully, after the widget was drawn on the screen.
+ // of TQListView successfully, after the widget was drawn on the screen.
// If called before it had no effect (if the item was not visible).
//
// The solution was to store the item we wanted to see in a local var
- // and call QListView::ensureItemVisible() about 10ms later in
+ // and call TQListView::ensureItemVisible() about 10ms later in
// the slot slotShowSelected. (ipwizard, 12/29/2003)
m_visibleItem = it_v;
- QTimer::singleShot(100, this, SLOT(slotShowSelected()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotShowSelected()));
}
void KMyMoneySelector::slotShowSelected(void)
@@ -516,61 +516,61 @@ void KMyMoneySelector::slotShowSelected(void)
m_listView->ensureItemVisible(m_visibleItem);
}
-int KMyMoneySelector::slotMakeCompletion(const QString& _txt)
+int KMyMoneySelector::slotMakeCompletion(const TQString& _txt)
{
- QString txt(QRegExp::escape(_txt));
+ TQString txt(TQRegExp::escape(_txt));
if(KMyMoneyGlobalSettings::stringMatchFromStart() && this->isA("KMyMoneySelector") )
txt.prepend('^');
- return slotMakeCompletion(QRegExp(txt, false));
+ return slotMakeCompletion(TQRegExp(txt, false));
}
-bool KMyMoneySelector::match(const QRegExp& exp, QListViewItem* item) const
+bool KMyMoneySelector::match(const TQRegExp& exp, TQListViewItem* item) const
{
return exp.search(item->text(0)) != -1;
}
-int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
+int KMyMoneySelector::slotMakeCompletion(const TQRegExp& exp)
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItem* it_v;
// The logic used here seems to be awkward. The problem is, that
- // QListViewItem::setVisible works recursively on all it's children
- // and grand-children.
+ // TQListViewItem::setVisible works recursively on all it's tqchildren
+ // and grand-tqchildren.
//
// The way out of this is as follows: Make all items visible.
// Then go through the list again and perform the checks.
- // If an item does not have any children (last leaf in the tree view)
- // perform the check. Then check recursively on the parent of this
- // leaf that it has no visible children. If that is the case, make the
- // parent invisible and continue this check with it's parent.
+ // If an item does not have any tqchildren (last leaf in the tree view)
+ // perform the check. Then check recursively on the tqparent of this
+ // leaf that it has no visible tqchildren. If that is the case, make the
+ // tqparent invisible and continue this check with it's tqparent.
while((it_v = it.current()) != 0) {
it_v->setVisible(true);
++it;
}
- QListViewItem* firstMatch = 0;
+ TQListViewItem* firstMatch = 0;
if(!exp.pattern().isEmpty()) {
- it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable);
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable);
while((it_v = it.current()) != 0) {
if(it_v->firstChild() == 0) {
if(!match(exp, it_v)) {
// this is a node which does not contain the
- // text and does not have children. So we can
- // safely hide it. Then we check, if the parent
- // has more children which are still visible. If
- // none are found, the parent node is hidden also. We
+ // text and does not have tqchildren. So we can
+ // safely hide it. Then we check, if the tqparent
+ // has more tqchildren which are still visible. If
+ // none are found, the tqparent node is hidden also. We
// continue until the top of the tree or until we
- // find a node that still has visible children.
+ // find a node that still has visible tqchildren.
bool hide = true;
while(hide) {
it_v->setVisible(false);
- it_v = it_v->parent();
+ it_v = it_v->tqparent();
if(it_v && it_v->isSelectable()) {
hide = !match(exp, it_v);
- QListViewItem* child = it_v->firstChild();
+ TQListViewItem* child = it_v->firstChild();
for(; child && hide; child = child->nextSibling()) {
if(child->isVisible())
hide = false;
@@ -587,15 +587,15 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
if(!firstMatch) {
firstMatch = it_v;
}
- // a node with children contains the text. We want
+ // a node with tqchildren contains the text. We want
// to display all child nodes in this case, so we need
// to advance the iterator to the next sibling of the
// current node. This could well be the sibling of a
- // parent or grandparent node.
- QListViewItem* curr = it_v;
- QListViewItem* item;
+ // tqparent or grandtqparent node.
+ TQListViewItem* curr = it_v;
+ TQListViewItem* item;
while((item = curr->nextSibling()) == 0) {
- curr = curr->parent();
+ curr = curr->tqparent();
if(curr == 0)
break;
if(match(exp, curr))
@@ -606,7 +606,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
} while(it.current() && it.current() != item);
} else {
- // It's a node with children that does not match. We don't
+ // It's a node with tqchildren that does not match. We don't
// change it's status here.
++it;
}
@@ -615,7 +615,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
// make the first match the one that is selected
// if we have no match, make sure none is selected
- if(m_selMode == QListView::Single) {
+ if(m_selMode == TQListView::Single) {
if(firstMatch) {
m_listView->setSelected(firstMatch, true);
ensureItemVisible(firstMatch);
@@ -626,7 +626,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
// Get the number of visible nodes for the return code
int cnt = 0;
- it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable | QListViewItemIterator::Visible);
+ it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable | TQListViewItemIterator::Visible);
while((it_v = it.current()) != 0) {
cnt++;
it++;
@@ -634,10 +634,10 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp)
return cnt;
}
-bool KMyMoneySelector::contains(const QString& txt) const
+bool KMyMoneySelector::tqcontains(const TQString& txt) const
{
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable);
- QListViewItem* it_v;
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable);
+ TQListViewItem* it_v;
while((it_v = it.current()) != 0) {
if(it_v->rtti() == 1) {
KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v);
@@ -655,13 +655,13 @@ bool KMyMoneySelector::contains(const QString& txt) const
return false;
}
-void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos, int /* col */)
+void KMyMoneySelector::slotListRightMouse(TQListViewItem* it_v, const TQPoint& pos, int /* col */)
{
if(it_v && (it_v->rtti() == 1)) {
KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v);
- if(it_c->type() == QCheckListItem::CheckBox) {
- // the following is copied from QCheckListItem::activate() et al
- int boxsize = m_listView->style().pixelMetric(QStyle::PM_CheckListButtonSize, m_listView);
+ if(it_c->type() == TQCheckListItem::CheckBox) {
+ // the following is copied from TQCheckListItem::activate() et al
+ int boxsize = m_listView->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, m_listView);
int align = m_listView->columnAlignment( 0 );
int marg = m_listView->itemMargin();
int y = 0;
@@ -671,12 +671,12 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos
else
y = (m_listView->fontMetrics().height() + 2 + marg - boxsize) / 2;
- QRect r( 0, y, boxsize-3, boxsize-3 );
+ TQRect r( 0, y, boxsize-3, boxsize-3 );
// columns might have been swapped
r.moveBy( m_listView->header()->sectionPos( 0 ), 0 );
- QPoint topLeft = m_listView->itemRect(it_v).topLeft(); //### inefficient?
- QPoint p = m_listView->mapFromGlobal( pos ) - topLeft;
+ TQPoint topLeft = m_listView->tqitemRect(it_v).topLeft(); //### inefficient?
+ TQPoint p = m_listView->mapFromGlobal( pos ) - topLeft;
int xdepth = m_listView->treeStepSize() * (it_v->depth() + (m_listView->rootIsDecorated() ? 1 : 0))
+ m_listView->itemMargin();
@@ -684,7 +684,7 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos
p.rx() -= xdepth;
// copy ends around here
- if ( r.contains( p ) ) {
+ if ( r.tqcontains( p ) ) {
// we get down here, if we have a right click onto the checkbox
selectAllSubItems(it_c, it_c->isOn());
}
@@ -692,16 +692,16 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos
}
}
-QStringList KMyMoneySelector::selectedItems(void) const
+TQStringList KMyMoneySelector::selectedItems(void) const
{
- QStringList list;
+ TQStringList list;
selectedItems(list);
return list;
}
-QStringList KMyMoneySelector::itemList(void) const
+TQStringList KMyMoneySelector::itemList(void) const
{
- QStringList list;
+ TQStringList list;
itemList(list);
return list;
}
diff --git a/kmymoney2/widgets/kmymoneyselector.h b/kmymoney2/widgets/kmymoneyselector.h
index 2b389d6..c55ac47 100644
--- a/kmymoney2/widgets/kmymoneyselector.h
+++ b/kmymoney2/widgets/kmymoneyselector.h
@@ -21,9 +21,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qlistview.h>
-class QHBoxLayout;
+#include <tqwidget.h>
+#include <tqlistview.h>
+class TQHBoxLayout;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -50,34 +50,35 @@ class KListView;
* out of the set of displayed items. Selection is performed
* by marking the item in the view.
*/
-class KMyMoneySelector : public QWidget
+class KMyMoneySelector : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneySelector(QWidget *parent=0, const char *name=0, QWidget::WFlags flags = 0);
+ KMyMoneySelector(TQWidget *tqparent=0, const char *name=0, TQWidget::WFlags flags = 0);
virtual ~KMyMoneySelector();
/**
* This method sets the mode of operation of this widget.
- * Supported values are @p QListView::Single and @p QListView::Multi.
+ * Supported values are @p TQListView::Single and @p TQListView::Multi.
*
- * @param mode @p QListView::Single selects single selection mode and
- * @p QListView::Multi selects multi selection mode
+ * @param mode @p TQListView::Single selects single selection mode and
+ * @p TQListView::Multi selects multi selection mode
*
- * @note When the widget is created, it defaults to QListView::Single.
+ * @note When the widget is created, it defaults to TQListView::Single.
* Any items loaded into the widget will be cleared if the mode changes.
* Changing the selection mode also changes the type of the items
* created through newItem(). You should therefor set the selection mode
* before you create items.
*/
- void setSelectionMode(const QListView::SelectionMode mode);
+ void setSelectionMode(const TQListView::SelectionMode mode);
/**
* returns the selection mode of the widget.
*
* @sa setSelectionMode()
*/
- QListView::SelectionMode selectionMode(void) const { return m_selMode; }
+ TQListView::SelectionMode selectionMode(void) const { return m_selMode; }
/**
* This method returns the list of selected item ids. If
@@ -86,7 +87,7 @@ public:
*
* @param list reference to id list
*/
- void selectedItems(QStringList& list) const;
+ void selectedItems(TQStringList& list) const;
/**
* Convenience method for above method. Requires more resources.
@@ -94,7 +95,7 @@ public:
*
* @todo Deprecated after 1.0
*/
- QStringList selectedItems(void) const;
+ TQStringList selectedItems(void) const;
/**
* This method returns the list of all item ids.
@@ -102,7 +103,7 @@ public:
*
* @param list reference to id list
*/
- void itemList(QStringList& list) const;
+ void itemList(TQStringList& list) const;
/**
* Convenience method for above method. Requires more resources.
@@ -110,7 +111,7 @@ public:
*
* @todo Deprecated after 1.0
*/
- QStringList itemList(void) const;
+ TQStringList itemList(void) const;
/**
* This method returns an information if all items
@@ -133,7 +134,7 @@ public:
* @p true checked
* @p false not checked (default)
*/
- void setSelected(const QString& id, const bool state = false);
+ void setSelected(const TQString& id, const bool state = false);
/**
* Return a pointer to the KListView object
@@ -157,7 +158,7 @@ public:
* @param itemList of item ids to apply @p state to
* @param state select items if @p true, deselect otherwise
*/
- void selectItems(const QStringList& itemList, const bool state);
+ void selectItems(const TQStringList& itemList, const bool state);
/**
* Protect an entry from selection. Protection is controlled by
@@ -167,7 +168,7 @@ public:
* @param protect if true, the entry specified by @p accId cannot be
* selected. If false, it can be selected. Defaults to @p true.
*/
- void protectItem(const QString& itemId, const bool protect = true);
+ void protectItem(const TQString& itemId, const bool protect = true);
/**
* This method modifies the width of the widget to match its optimal size
@@ -178,25 +179,25 @@ public:
/**
* This method removes an item with a given id from the list.
*
- * @param id QString containing id of item to be removed
+ * @param id TQString containing id of item to be removed
*/
- void removeItem(const QString& id);
+ void removeItem(const TQString& id);
/**
* This method creates a new top level KMyMoneyCheckListItem object in the list view.
* The type can be influenced with the @a type argument. It defaults
- * to QCheckListItem::RadioButtonController. If @a id is empty, the item is not
- * selectable. It will be shown 'opened' (see QListViewItem::setOpen())
+ * to TQCheckListItem::RadioButtonController. If @a id is empty, the item is not
+ * selectable. It will be shown 'opened' (see TQListViewItem::setOpen())
*
* @return pointer to newly created object
*/
- QListViewItem* newItem(const QString& name, const QString& key = QString(), const QString& id = QString(), QCheckListItem::Type type = QCheckListItem::RadioButtonController);
+ TQListViewItem* newItem(const TQString& name, const TQString& key = TQString(), const TQString& id = TQString(), TQCheckListItem::Type type = TQCheckListItem::RadioButtonController);
/**
* Same as above, but create the item following the item pointed to by @c after.
* If @c after is 0, then behave as previous method
*/
- QListViewItem* newItem(const QString& name, QListViewItem* after, const QString& key = QString(), const QString& id = QString(), QCheckListItem::Type type = QCheckListItem::RadioButtonController);
+ TQListViewItem* newItem(const TQString& name, TQListViewItem* after, const TQString& key = TQString(), const TQString& id = TQString(), TQCheckListItem::Type type = TQCheckListItem::RadioButtonController);
/**
* This method creates a new selectable object depending on the
@@ -205,20 +206,20 @@ public:
*
* @note The new item will be the first one in the selection
*
- * @param parent pointer to parent item
+ * @param tqparent pointer to tqparent item
* @param name the displayed name
* @param key String to be used for completion. If empty defaults to @a name
* @param id the id used to identify the objects
*
* @return pointer to newly created object
*/
- QListViewItem* newItem(QListViewItem* parent, const QString& name, const QString& key, const QString& id);
+ TQListViewItem* newItem(TQListViewItem* tqparent, const TQString& name, const TQString& key, const TQString& id);
/**
* This method creates a new selectable object depending on the
* selection mode. This is either a KListViewItem for single
* selection mode or a KMyMoneyCheckListItem for multi selection mode.
- * In contrast to the above method, the parent is always the view.
+ * In contrast to the above method, the tqparent is always the view.
*
* @note The new item will be the first one in the selection
*
@@ -228,47 +229,47 @@ public:
*
* @return pointer to newly created object
*/
- QListViewItem* newTopItem(const QString& name, const QString& key, const QString& id);
+ TQListViewItem* newTopItem(const TQString& name, const TQString& key, const TQString& id);
/**
* This method checks if a given @a item matches the given regular expression @a exp.
*
* @param exp const reference to a regular expression object
- * @param item pointer to QListViewItem
+ * @param item pointer to TQListViewItem
*
* @retval true item matches
* @retval false item does not match
*/
- virtual bool match(const QRegExp& exp, QListViewItem* item) const;
+ virtual bool match(const TQRegExp& exp, TQListViewItem* item) const;
/**
* This method delays the call for m_listView->ensureItemVisible(item)
* for about 10ms. This seems to be necessary when the widget is not (yet)
* visible on the screen after creation.
*
- * @param item pointer to QListViewItem that should be made visible
+ * @param item pointer to TQListViewItem that should be made visible
*
* @sa slotShowSelected()
*/
- void ensureItemVisible(const QListViewItem *item);
+ void ensureItemVisible(const TQListViewItem *item);
/**
- * This method returns a pointer to the QListViewItem with the id @a id.
+ * This method returns a pointer to the TQListViewItem with the id @a id.
* If such an item is not contained in the list, @a 0 will be returned.
*
- * @param id id to be used to find a QListViewItem pointer for
+ * @param id id to be used to find a TQListViewItem pointer for
*/
- QListViewItem* item(const QString& id) const;
+ TQListViewItem* item(const TQString& id) const;
/**
- * This method returns, if any of the items in the selector contains
+ * This method returns, if any of the items in the selector tqcontains
* the text @a txt.
*
* @param txt const reference to string to be looked for
* @retval true exact match found
* @retval false no match found
*/
- virtual bool contains(const QString& txt) const;
+ virtual bool tqcontains(const TQString& txt) const;
/**
* Clears all items of the selector and the associated listview.
@@ -296,7 +297,7 @@ public slots:
signals:
void stateChanged(void);
- void itemSelected(const QString& id);
+ void itemSelected(const TQString& id);
protected:
/**
@@ -305,14 +306,14 @@ protected:
* @param list list of selected ids
* @param item pointer to item to start with
*/
- void selectedItems(QStringList& list, QListViewItem* item) const;
+ void selectedItems(TQStringList& list, TQListViewItem* item) const;
/**
* Helper method for allItemsSelected() to traverse the tree.
*
* @param item pointer to item to start with
*/
- bool allItemsSelected(const QListViewItem *item) const;
+ bool allItemsSelected(const TQListViewItem *item) const;
/**
* This is a helper method for selectAllItems().
@@ -320,7 +321,7 @@ protected:
* @param item pointer to item to start with
* @param state selection state (@a true = selected, @a false = not selected)
*/
- void selectAllSubItems(QListViewItem* item, const bool state);
+ void selectAllSubItems(TQListViewItem* item, const bool state);
/**
* This is a helper method for selectItems().
@@ -329,25 +330,25 @@ protected:
* @param itemList list of ids to be selected
* @param state selection state (@a true = selected, @a false = not selected)
*/
- void selectSubItems(QListViewItem* item, const QStringList& itemList, const bool state);
+ void selectSubItems(TQListViewItem* item, const TQStringList& itemList, const bool state);
public slots:
/**
* Hide all listview items that do not match the regular expression @a exp.
* This method returns the number of visible items
*
- * @param exp const reference to QRegExp that an item must match to stay visible
+ * @param exp const reference to TQRegExp that an item must match to stay visible
*
* @return number of visible items
*/
- int slotMakeCompletion(const QRegExp& exp);
+ int slotMakeCompletion(const TQRegExp& exp);
/**
* This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
*
- * @param txt contains the pattern for a QRegExp
+ * @param txt contains the pattern for a TQRegExp
*/
- int slotMakeCompletion(const QString& txt);
+ int slotMakeCompletion(const TQString& txt);
protected slots:
@@ -356,14 +357,14 @@ protected slots:
* calls m_listView->ensureItemVisible() for the last selected item
* in this widget.
*
- * @sa ensureItemVisible(), setSelected(const QString&)
+ * @sa ensureItemVisible(), setSelected(const TQString&)
*/
void slotShowSelected(void);
/**
* This slot is connected to the KListView executed signal
*/
- void slotItemSelected(QListViewItem *it_v);
+ void slotItemSelected(TQListViewItem *it_v);
/**
* This slot processes the right mouse button press on a list view item.
@@ -371,17 +372,17 @@ protected slots:
* @param it_v pointer to list view item that was pressed
* @param p the position where the mouse was pressed
*/
- void slotListRightMouse(QListViewItem* it_v, const QPoint& p, int /* col */);
+ void slotListRightMouse(TQListViewItem* it_v, const TQPoint& p, int /* col */);
protected:
KListView* m_listView;
- QStringList m_itemList;
- QString m_baseName;
- QListView::SelectionMode m_selMode;
- QHBoxLayout* m_layout;
+ TQStringList m_itemList;
+ TQString m_baseName;
+ TQListView::SelectionMode m_selMode;
+ TQHBoxLayout* m_layout;
private:
- const QListViewItem* m_visibleItem;
+ const TQListViewItem* m_visibleItem;
};
#endif
diff --git a/kmymoney2/widgets/kmymoneytitlelabel.cpp b/kmymoney2/widgets/kmymoneytitlelabel.cpp
index 9dc5140..bad8a77 100644
--- a/kmymoney2/widgets/kmymoneytitlelabel.cpp
+++ b/kmymoney2/widgets/kmymoneytitlelabel.cpp
@@ -18,10 +18,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpixmap.h>
-#include <qvariant.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqvariant.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,8 +36,8 @@
#include "kmymoneytitlelabel.h"
-KMyMoneyTitleLabel::KMyMoneyTitleLabel(QWidget *parent, const char *name) :
- QLabel(parent, name),
+KMyMoneyTitleLabel::KMyMoneyTitleLabel(TQWidget *tqparent, const char *name) :
+ TQLabel(tqparent, name),
m_bgColor( KGlobalSettings::highlightColor() ),
m_textColor( KGlobalSettings::highlightedTextColor() )
{
@@ -48,18 +48,18 @@ KMyMoneyTitleLabel::~KMyMoneyTitleLabel()
{
}
-void KMyMoneyTitleLabel::setLeftImageFile(const QString& _file)
+void KMyMoneyTitleLabel::setLeftImageFile(const TQString& _file)
{
m_leftImageFile = _file;
- QString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile);
+ TQString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile);
m_leftImage.load(lfullpath);
m_leftImage.setAlphaBuffer(true);
}
-void KMyMoneyTitleLabel::setRightImageFile(const QString& _file)
+void KMyMoneyTitleLabel::setRightImageFile(const TQString& _file)
{
m_rightImageFile = _file;
- QString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile);
+ TQString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile);
m_rightImage.load(rfullpath);
m_rightImage.setAlphaBuffer(true);
if(m_rightImage.height() < 30)
@@ -70,32 +70,32 @@ void KMyMoneyTitleLabel::setRightImageFile(const QString& _file)
}
}
-void KMyMoneyTitleLabel::resizeEvent ( QResizeEvent * )
+void KMyMoneyTitleLabel::resizeEvent ( TQResizeEvent * )
{
- QRect cr = contentsRect();
- QImage output( cr.width(), cr.height(), 32 );
+ TQRect cr = contentsRect();
+ TQImage output( cr.width(), cr.height(), 32 );
output.fill( m_bgColor.rgb() );
bitBlt ( &output, cr.width() - m_rightImage.width(), 0, &m_rightImage, 0, 0, m_rightImage.width(), m_rightImage.height(), 0 );
bitBlt ( &output, 0, 0, &m_leftImage, 0, 0, m_leftImage.width(), m_leftImage.height(), 0 );
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(output);
setPixmap(pix);
setMinimumWidth( m_rightImage.width() );
}
-void KMyMoneyTitleLabel::drawContents(QPainter *p)
+void KMyMoneyTitleLabel::drawContents(TQPainter *p)
{
// first draw pixmap
- QLabel::drawContents(p);
+ TQLabel::drawContents(p);
// then draw text on top
- style().drawItem( p, contentsRect(), alignment(), colorGroup(), isEnabled(),
- 0, QString(" ")+m_text, -1, &m_textColor );
+ tqstyle().drawItem( p, contentsRect(), tqalignment(), tqcolorGroup(), isEnabled(),
+ 0, TQString(" ")+m_text, -1, &m_textColor );
}
-void KMyMoneyTitleLabel::setText(const QString& txt)
+void KMyMoneyTitleLabel::setText(const TQString& txt)
{
m_text = txt;
update();
diff --git a/kmymoney2/widgets/kmymoneytitlelabel.h b/kmymoney2/widgets/kmymoneytitlelabel.h
index 08f9302..2990205 100644
--- a/kmymoney2/widgets/kmymoneytitlelabel.h
+++ b/kmymoney2/widgets/kmymoneytitlelabel.h
@@ -21,10 +21,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qimage.h>
-#include <qcolor.h>
-class QPixmap;
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqcolor.h>
+class TQPixmap;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -35,44 +35,45 @@ class QPixmap;
/**
* @author ace jones
*/
-class KMyMoneyTitleLabel : public QLabel
+class KMyMoneyTitleLabel : public TQLabel
{
Q_OBJECT
- Q_PROPERTY( QString leftImageFile READ leftImageFile WRITE setLeftImageFile DESIGNABLE true )
- Q_PROPERTY( QString rightImageFile READ rightImageFile WRITE setRightImageFile DESIGNABLE true )
- Q_PROPERTY( QColor bgColor READ bgColor WRITE setBgColor DESIGNABLE true )
- Q_PROPERTY( QString text READ text WRITE setText DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString leftImageFile READ leftImageFile WRITE setLeftImageFile DESIGNABLE true )
+ TQ_PROPERTY( TQString rightImageFile READ rightImageFile WRITE setRightImageFile DESIGNABLE true )
+ TQ_PROPERTY( TQColor bgColor READ bgColor WRITE setBgColor DESIGNABLE true )
+ TQ_PROPERTY( TQString text READ text WRITE setText DESIGNABLE true )
public:
- KMyMoneyTitleLabel(QWidget *parent = 0, const char *name = 0);
+ KMyMoneyTitleLabel(TQWidget *tqparent = 0, const char *name = 0);
~KMyMoneyTitleLabel();
- void setBgColor(const QColor& _color) { m_bgColor = _color; }
- void setLeftImageFile(const QString& _file);
- void setRightImageFile(const QString& _file);
+ void setBgColor(const TQColor& _color) { m_bgColor = _color; }
+ void setLeftImageFile(const TQString& _file);
+ void setRightImageFile(const TQString& _file);
- const QString& leftImageFile(void) const { return m_leftImageFile; }
- const QString& rightImageFile(void) const { return m_rightImageFile; }
- QColor bgColor(void) const { return m_bgColor; }
- QString text(void) const { return m_text; }
+ const TQString& leftImageFile(void) const { return m_leftImageFile; }
+ const TQString& rightImageFile(void) const { return m_rightImageFile; }
+ TQColor bgColor(void) const { return m_bgColor; }
+ TQString text(void) const { return m_text; }
public slots:
- virtual void setText(const QString& txt);
+ virtual void setText(const TQString& txt);
protected:
void updatePixmap(void);
- virtual void resizeEvent ( QResizeEvent * );
- void drawContents(QPainter *);
+ virtual void resizeEvent ( TQResizeEvent * );
+ void drawContents(TQPainter *);
private:
- QImage m_leftImage;
- QImage m_rightImage;
- QColor m_bgColor;
- QColor m_textColor;
- QString m_text;
+ TQImage m_leftImage;
+ TQImage m_rightImage;
+ TQColor m_bgColor;
+ TQColor m_textColor;
+ TQString m_text;
- QString m_leftImageFile;
- QString m_rightImageFile;
+ TQString m_leftImageFile;
+ TQString m_rightImageFile;
};
#endif
diff --git a/kmymoney2/widgets/kmymoneywizard.cpp b/kmymoney2/widgets/kmymoneywizard.cpp
index d7fcfdb..68eaf02 100644
--- a/kmymoney2/widgets/kmymoneywizard.cpp
+++ b/kmymoney2/widgets/kmymoneywizard.cpp
@@ -17,12 +17,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpoint.h>
-#include <qfont.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpoint.h>
+#include <tqfont.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -42,8 +42,8 @@
#include <kmymoney/kmymoneytitlelabel.h>
#include <kmymoney/kguiutils.h>
-KMyMoneyWizardPagePrivate::KMyMoneyWizardPagePrivate(QObject* parent, const char* name) :
- QObject(parent, name)
+KMyMoneyWizardPagePrivate::KMyMoneyWizardPagePrivate(TQObject* tqparent, const char* name) :
+ TQObject(tqparent, name)
{
}
@@ -53,17 +53,17 @@ void KMyMoneyWizardPagePrivate::emitCompleteStateChanged(void)
}
-KMyMoneyWizardPage::KMyMoneyWizardPage(unsigned int step, QWidget* widget, const char* name) :
+KMyMoneyWizardPage::KMyMoneyWizardPage(unsigned int step, TQWidget* widget, const char* name) :
m_step(step),
m_widget(widget),
- d(new KMyMoneyWizardPagePrivate(widget, name))
+ d(new KMyMoneyWizardPagePrivate(TQT_TQOBJECT(widget), name))
{
- m_mandatoryGroup = new kMandatoryFieldGroup(widget);
- QObject::connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged()));
+ m_mandatoryGroup = new kMandatoryFieldGroup(TQT_TQOBJECT(widget));
+ TQObject::connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged()));
widget->hide();
}
-QObject* KMyMoneyWizardPage::object(void) const
+TQObject* KMyMoneyWizardPage::object(void) const
{
return d;
}
@@ -98,19 +98,19 @@ bool KMyMoneyWizardPage::isLastPage(void) const
bool KMyMoneyWizardPage::isComplete(void) const
{
if(!isLastPage())
- QToolTip::add(wizard()->m_nextButton, i18n("Continue with next page"));
+ TQToolTip::add(wizard()->m_nextButton, i18n("Continue with next page"));
else
- QToolTip::add(wizard()->m_finishButton, i18n("Finish wizard"));
+ TQToolTip::add(wizard()->m_finishButton, i18n("Finish wizard"));
return m_mandatoryGroup->isEnabled();
}
-const QString& KMyMoneyWizardPage::helpContext(void) const
+const TQString& KMyMoneyWizardPage::helpContext(void) const
{
- return QString::null;
+ return TQString();
}
-KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WFlags f) :
- QDialog(parent, name, modal, f),
+KMyMoneyWizard::KMyMoneyWizard(TQWidget *tqparent, const char *name, bool modal, WFlags f) :
+ TQDialog(tqparent, name, modal, f),
m_step(0)
{
// enable the little grip in the right corner
@@ -132,8 +132,8 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF
m_helpButton->setIconSet( SmallIconSet( "help" ) );
}
- // create button layout
- m_buttonLayout = new QHBoxLayout;
+ // create button tqlayout
+ m_buttonLayout = new TQHBoxLayout;
m_buttonLayout->addWidget(m_helpButton);
m_buttonLayout->addStretch(1);
m_buttonLayout->addWidget(m_backButton);
@@ -141,41 +141,41 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF
m_buttonLayout->addWidget(m_finishButton);
m_buttonLayout->addWidget(m_cancelButton);
- // create wizard layout
- m_wizardLayout = new QVBoxLayout(this, 6, 0, "wizardLayout");
+ // create wizard tqlayout
+ m_wizardLayout = new TQVBoxLayout(this, 6, 0, "wizardLayout");
m_titleLabel = new KMyMoneyTitleLabel(this, "titleLabel");
m_wizardLayout->addWidget(m_titleLabel);
- QHBoxLayout* hboxLayout = new QHBoxLayout(0, 0, 6, "hboxLayout");
+ TQHBoxLayout* hboxLayout = new TQHBoxLayout(0, 0, 6, "hboxLayout");
- // create stage layout and frame
- m_stepFrame = new QFrame(this, "stepFrame");
+ // create stage tqlayout and frame
+ m_stepFrame = new TQFrame(this, "stepFrame");
m_stepFrame->setPaletteBackgroundColor(KGlobalSettings::highlightColor());
- m_stepLayout = new QVBoxLayout(m_stepFrame, 11, 6, "stepLayout");
- m_stepLayout->addWidget(new QLabel("", m_stepFrame));
- m_stepLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
- m_stepLabel = new QLabel(m_stepFrame, "stepLabel");
- m_stepLabel->setAlignment(Qt::AlignHCenter);
+ m_stepLayout = new TQVBoxLayout(m_stepFrame, 11, 6, "stepLayout");
+ m_stepLayout->addWidget(new TQLabel("", m_stepFrame));
+ m_stepLayout->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
+ m_stepLabel = new TQLabel(m_stepFrame, "stepLabel");
+ m_stepLabel->tqsetAlignment(TQt::AlignHCenter);
m_stepLayout->addWidget(m_stepLabel);
hboxLayout->addWidget(m_stepFrame);
- // FIXME use the protected virtual method QWidget::paletteChange() to update the palette
+ // FIXME use the protected virtual method TQWidget::paletteChange() to update the palette
// information when the user selected a different color set using the KConfigCenter
m_stepPalette = m_stepLabel->palette();
- QColorGroup::ColorRole role = QColorGroup::Foreground;
- QColor color = KGlobalSettings::highlightedTextColor();
- m_stepPalette.setColor( QPalette::Active, role, color );
- m_stepPalette.setColor( QPalette::Inactive, role, color );
- m_stepPalette.setColor( QPalette::Disabled, role, color );
+ TQColorGroup::ColorRole role = TQColorGroup::Foreground;
+ TQColor color = KGlobalSettings::highlightedTextColor();
+ m_stepPalette.setColor( TQPalette::Active, role, color );
+ m_stepPalette.setColor( TQPalette::Inactive, role, color );
+ m_stepPalette.setColor( TQPalette::Disabled, role, color );
m_stepLabel->setPalette(m_stepPalette);
- // create page layout
- m_pageLayout = new QVBoxLayout(0, 0, 6, "pageLayout");
+ // create page tqlayout
+ m_pageLayout = new TQVBoxLayout(0, 0, 6, "pageLayout");
// the page will be inserted later dynamically above this line
- QFrame* line = new QFrame( this, "line" );
- line->setFrameShadow( QFrame::Sunken );
- line->setFrameShape( QFrame::HLine );
+ TQFrame* line = new TQFrame( this, "line" );
+ line->setFrameShadow( TQFrame::Sunken );
+ line->setFrameShape( TQFrame::HLine );
m_pageLayout->addWidget( line );
m_pageLayout->addLayout(m_buttonLayout);
@@ -183,7 +183,7 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF
hboxLayout->addLayout(m_pageLayout);
m_wizardLayout->addLayout(hboxLayout);
- resize(QSize(770, 520).expandedTo(minimumSizeHint()));
+ resize(TQSize(770, 520).expandedTo(tqminimumSizeHint()));
clearWState(WState_Polished);
m_titleLabel->setText("No Title specified");
@@ -191,33 +191,33 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF
m_finishButton->hide();
- connect(m_backButton, SIGNAL(clicked()), this, SLOT(backButtonClicked()));
- connect(m_nextButton, SIGNAL(clicked()), this, SLOT(nextButtonClicked()));
- connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
- connect(m_finishButton, SIGNAL(clicked()), this, SLOT(accept()));
- connect(m_helpButton, SIGNAL(clicked()), this, SLOT(helpButtonClicked()));
+ connect(m_backButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(backButtonClicked()));
+ connect(m_nextButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextButtonClicked()));
+ connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
+ connect(m_finishButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(helpButtonClicked()));
}
-void KMyMoneyWizard::setTitle(const QString& txt)
+void KMyMoneyWizard::setTitle(const TQString& txt)
{
m_titleLabel->setText(txt);
}
-void KMyMoneyWizard::addStep(const QString& text)
+void KMyMoneyWizard::addStep(const TQString& text)
{
- QLabel* step = new QLabel(text, m_stepFrame);
- step->setFrameStyle(QFrame::Panel | QFrame::Raised);
- step->setAlignment(Qt::AlignHCenter);
- step->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ TQLabel* step = new TQLabel(text, m_stepFrame);
+ step->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
+ step->tqsetAlignment(TQt::AlignHCenter);
+ step->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
step->setMargin(2);
step->setPalette( m_stepPalette );
m_steps.append(step);
m_stepLayout->insertWidget(m_steps.count(), step);
- QFont font(step->font());
+ TQFont font(step->font());
font.setBold(true);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
int w = fm.width(text)+30;
if(m_stepFrame->minimumWidth() < w) {
m_stepFrame->setMinimumWidth(w);
@@ -239,14 +239,14 @@ void KMyMoneyWizard::selectStep(unsigned int step)
return;
m_step = step;
- QValueList<QLabel*>::iterator it_l;
- QFont f = m_steps[0]->font();
+ TQValueList<TQLabel*>::iterator it_l;
+ TQFont f = m_steps[0]->font();
for(it_l = m_steps.begin(); it_l != m_steps.end(); ++it_l) {
f.setBold(false);
- (*it_l)->setFrameStyle(QFrame::NoFrame);
+ (*it_l)->setFrameStyle(TQFrame::NoFrame);
if(--step == 0) {
f.setBold(true);
- (*it_l)->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ (*it_l)->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
}
(*it_l)->setFont(f);
}
@@ -260,7 +260,7 @@ void KMyMoneyWizard::reselectStep(void)
void KMyMoneyWizard::updateStepCount(void)
{
- QValueList<QLabel*>::iterator it_l;
+ TQValueList<TQLabel*>::iterator it_l;
int stepCount = 0;
int hiddenAdjust = 0;
int step = 0;
@@ -271,7 +271,7 @@ void KMyMoneyWizard::updateStepCount(void)
hiddenAdjust++;
++step;
}
- m_stepLabel->setText(i18n("Step %1 of %2").arg(m_step - hiddenAdjust).arg(stepCount));
+ m_stepLabel->setText(i18n("Step %1 of %2").tqarg(m_step - hiddenAdjust).tqarg(stepCount));
}
void KMyMoneyWizard::setFirstPage(KMyMoneyWizardPage* page)
@@ -287,12 +287,12 @@ void KMyMoneyWizard::switchPage(KMyMoneyWizardPage* oldPage)
if(oldPage) {
oldPage->widget()->hide();
m_pageLayout->remove(oldPage->widget());
- disconnect(oldPage->object(), SIGNAL(completeStateChanged()), this, SLOT(completeStateChanged()));
+ disconnect(oldPage->object(), TQT_SIGNAL(completeStateChanged()), this, TQT_SLOT(completeStateChanged()));
}
KMyMoneyWizardPage* newPage = m_history.back();
if(newPage) {
m_pageLayout->insertWidget(0, newPage->widget());
- connect(newPage->object(), SIGNAL(completeStateChanged()), this, SLOT(completeStateChanged()));
+ connect(newPage->object(), TQT_SIGNAL(completeStateChanged()), this, TQT_SLOT(completeStateChanged()));
newPage->widget()->show();
selectStep(newPage->step());
if(newPage->isLastPage()) {
@@ -302,7 +302,7 @@ void KMyMoneyWizard::switchPage(KMyMoneyWizardPage* oldPage)
m_finishButton->setDefault(false);
m_nextButton->setDefault(true);
}
- QWidget* w = newPage->initialFocusWidget();
+ TQWidget* w = newPage->initialFocusWidget();
if(w)
w->setFocus();
}
@@ -337,7 +337,7 @@ void KMyMoneyWizard::nextButtonClicked(void)
void KMyMoneyWizard::helpButtonClicked(void)
{
KMyMoneyWizardPage* currentPage = m_history.back();
- QString ctx = currentPage->helpContext();
+ TQString ctx = currentPage->helpContext();
if(ctx.isEmpty())
ctx = m_helpContext;
kapp->invokeHelp(ctx);
@@ -369,7 +369,7 @@ void KMyMoneyWizard::accept(void)
m_finishButton->setFocus();
KMyMoneyWizardPage* page = m_history.back();
if(page->isComplete())
- QDialog::accept();
+ TQDialog::accept();
}
#include "kmymoneywizard.moc"
diff --git a/kmymoney2/widgets/kmymoneywizard.h b/kmymoney2/widgets/kmymoneywizard.h
index 21b57b4..d46563e 100644
--- a/kmymoney2/widgets/kmymoneywizard.h
+++ b/kmymoney2/widgets/kmymoneywizard.h
@@ -20,13 +20,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdialog.h>
-#include <qvaluelist.h>
-#include <qpalette.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QLabel;
-class QFrame;
+#include <tqdialog.h>
+#include <tqvaluelist.h>
+#include <tqpalette.h>
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQLabel;
+class TQFrame;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -56,7 +56,7 @@ class kMandatoryFieldGroup;
* necessary functionality to work in concert with KMyMoneyWizard.
*
* Therefore, few steps are necessary to use this class. They seem to
- * be awkward at some stage, but I wanted to be able to use Qt designer
+ * be awkward at some stage, but I wanted to be able to use TQt designer
* to actually design the widget for the page. That's why some things
* aren't implemented in a more straight fashion than one would
* normally do this.
@@ -70,7 +70,7 @@ class kMandatoryFieldGroup;
* class KNewUserPage : public KMyMoneyWizardPage
* {
* public:
- * KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name);
+ * KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name);
*
* protected:
* KNewUserWizard* m_wizard;
@@ -80,15 +80,15 @@ class kMandatoryFieldGroup;
* The implementation of this class is rather straight-forward:
*
* @code
- * KNewUserPage::KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name) :
+ * KNewUserPage::KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name) :
* KMyMoneyWizardPage(step, widget, name),
- * m_wizard(parent)
+ * m_wizard(tqparent)
* {
* }
* @endcode
*
* For each page of the wizard, you will have to create a @p ui file with
- * Qt designer.
+ * TQt designer.
* Let's assume we call the first page of the wizard 'General' and go
* from there.
* We also assume, that the wizard has more than one page.
@@ -100,8 +100,9 @@ class kMandatoryFieldGroup;
* class KNewUserGeneral : public KNewUserGeneralDecl, public KNewUserPage
* {
* Q_OBJECT
+ TQ_OBJECT
* public:
- * KNewUserGeneral(KNewUserWizard* parent, const char* name = 0);
+ * KNewUserGeneral(KNewUserWizard* tqparent, const char* name = 0);
* KMyMoneyWizardPage* nextPage(void);
* bool isLastPage(void) { return false; }
*
@@ -114,13 +115,13 @@ class kMandatoryFieldGroup;
* fill some widgets, it could be as simple as:
*
* @code
- * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* parent, const char* name) :
- * KNewUserGeneralDecl(parent),
- * KNewUserPage(1, this, parent, name)
+ * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* tqparent, const char* name) :
+ * KNewUserGeneralDecl(tqparent),
+ * KNewUserPage(1, this, tqparent, name)
* {
* kMandatoryFieldGroup* mandatoryGroup = new kMandatoryFieldGroup(this);
* mandatoryGroup->add(m_userName);
- * connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged()));
+ * connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged()));
* }
*
* KMyMoneyWizardPage* KNewUserGeneral::nextPage(void)
@@ -205,16 +206,16 @@ public:
*
* @return pointer to widget of page
*/
- QWidget* widget(void) const { return m_widget; }
+ TQWidget* widget(void) const { return m_widget; }
/**
- * This method returns a pointer to the QObject used for
+ * This method returns a pointer to the TQObject used for
* the signal/slot mechanism.
* It is required by the KMyMoneyWizard and can be used
* by application code for signal/slot connections as well.
* Other use is not foreseen.
*/
- QObject* object(void) const;
+ TQObject* object(void) const;
/**
* This method returns a pointer to the widget which should
@@ -223,7 +224,7 @@ public:
* @return pointer to widget or 0 if none is to be selected
* The default implementation returns 0
*/
- virtual QWidget* initialFocusWidget(void) const { return 0; }
+ virtual TQWidget* initialFocusWidget(void) const { return 0; }
virtual KMyMoneyWizard* wizard(void) const = 0;
@@ -231,14 +232,14 @@ public:
* This method returns a specific help context for the page shown
* The default returns an empty string.
*/
- virtual const QString& helpContext(void) const;
+ virtual const TQString& helpContext(void) const;
virtual ~KMyMoneyWizardPage() {}
protected:
/**
* Constructor (kept protected, so that one cannot create such an object directly)
*/
- KMyMoneyWizardPage(unsigned int step, QWidget* widget, const char* name = 0);
+ KMyMoneyWizardPage(unsigned int step, TQWidget* widget, const char* name = 0);
/**
* This method must be called by the implementation when the
@@ -255,7 +256,7 @@ protected:
private:
unsigned int m_step;
- QWidget* m_widget;
+ TQWidget* m_widget;
KMyMoneyWizardPagePrivate* const d;
};
@@ -269,10 +270,10 @@ template <class T>
class WizardPage : public KMyMoneyWizardPage
{
public:
- WizardPage(unsigned int step, QWidget* widget, T* parent, const char* name) :
+ WizardPage(unsigned int step, TQWidget* widget, T* tqparent, const char* name) :
KMyMoneyWizardPage(step, widget, name),
- m_wizard(parent),
- m_wizardBase(parent)
+ m_wizard(tqparent),
+ m_wizardBase(tqparent)
{
}
virtual ~WizardPage() {}
@@ -288,7 +289,7 @@ protected:
* @author Thomas Baumgart (C) 2006
*
* This is a base class for implementation of the KMyMoneyWizard. It provides
- * the following layout of a wizard:
+ * the following tqlayout of a wizard:
*
* @code
* +-wizardLayout-----------------------------------------------+
@@ -334,8 +335,9 @@ protected:
* class KNewUserWizard : public KMyMoneyWizard
* {
* Q_OBJECT
+ TQ_OBJECT
* public:
- * KNewUserWizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0);
+ * KNewUserWizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0);
*
* private:
* KNewUserGeneral* m_generalPage;
@@ -353,8 +355,8 @@ protected:
* The implementation is also easy and looks like this:
*
* @code
- * KNewUserWizard::KNewUserWizard(QWidget* parent, const char* name, bool modal, WFlags flags) :
- * KMyMoneyWizard(parent, name, modal, flags)
+ * KNewUserWizard::KNewUserWizard(TQWidget* tqparent, const char* name, bool modal, WFlags flags) :
+ * KMyMoneyWizard(tqparent, name, modal, flags)
* {
* setTitle("KMyMoney New User Setup");
* addStep("General Data");
@@ -378,33 +380,34 @@ protected:
* int rc = wizard->exec();
* @endcode
*
- * The return code of exec() is either @p QDialog::Accepted or
- * @p QDialog::Rejected.
+ * The return code of exec() is either @p TQDialog::Accepted or
+ * @p TQDialog::Rejected.
*
* @note The implementation of this class is heavily based on ideas found at
* http://doc.trolltech.com/4.1/dialogs-complexwizard.html
*/
-class KMyMoneyWizard : public QDialog
+class KMyMoneyWizard : public TQDialog
{
friend class KMyMoneyWizardPage;
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Modify the title of the wizard to be @p txt.
*
* @param txt The text that should be used as title
*/
- void setTitle(const QString& txt);
+ void setTitle(const TQString& txt);
/**
* Add step @p text to the wizard
*
* @param text Text to be shown for this step
*/
- void addStep(const QString& text);
+ void addStep(const TQString& text);
- QValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; }
+ TQValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; }
/**
* This method repeats selection of the current step in the
@@ -420,7 +423,7 @@ public:
*
* @sa KMyMoneyWizardPage::helpContext()
*/
- void setHelpContext(const QString& ctx) { m_helpContext = ctx; }
+ void setHelpContext(const TQString& ctx) { m_helpContext = ctx; }
virtual ~KMyMoneyWizard(){}
@@ -432,7 +435,7 @@ signals:
* @param txt The name of the payee to be created
* @param id A connected slot should store the id of the created object in this variable
*/
- void createPayee(const QString& txt, QString& id);
+ void createPayee(const TQString& txt, TQString& id);
/**
* This signal is sent out, when a new category needs to be created
@@ -441,13 +444,13 @@ signals:
* @param txt The name of the category to be created
* @param id A connected slot should store the id of the created object in this variable
*/
- void createCategory(const QString& txt, QString& id);
+ void createCategory(const TQString& txt, TQString& id);
protected:
/**
* Constructor (kept protected, so that one cannot create such an object directly)
*/
- KMyMoneyWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
+ KMyMoneyWizard(TQWidget *tqparent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
/**
* This method sets up the first page after creation of the object
@@ -504,21 +507,21 @@ private:
void selectStep(unsigned int step);
/*
- * The layouts
+ * The tqlayouts
*/
- QVBoxLayout* m_wizardLayout;
- QVBoxLayout* m_stepLayout;
- QVBoxLayout* m_pageLayout;
- QHBoxLayout* m_buttonLayout;
+ TQVBoxLayout* m_wizardLayout;
+ TQVBoxLayout* m_stepLayout;
+ TQVBoxLayout* m_pageLayout;
+ TQHBoxLayout* m_buttonLayout;
/*
* Some misc. widgets required
*/
- QFrame* m_stepFrame;
- QLabel* m_stepLabel;
- QPalette m_stepPalette;
+ TQFrame* m_stepFrame;
+ TQLabel* m_stepLabel;
+ TQPalette m_stepPalette;
- QValueList<QLabel*> m_steps; // the list of step labels
+ TQValueList<TQLabel*> m_steps; // the list of step labels
int m_step; // the currently selected step
/*
@@ -529,9 +532,9 @@ private:
/*
* The history stack
*/
- QValueList<KMyMoneyWizardPage*> m_history;
+ TQValueList<KMyMoneyWizardPage*> m_history;
- QString m_helpContext;
+ TQString m_helpContext;
};
diff --git a/kmymoney2/widgets/kmymoneywizard_p.h b/kmymoney2/widgets/kmymoneywizard_p.h
index 92d1152..853cb46 100644
--- a/kmymoney2/widgets/kmymoneywizard_p.h
+++ b/kmymoney2/widgets/kmymoneywizard_p.h
@@ -20,7 +20,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qobject.h>
+#include <tqobject.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -32,18 +32,19 @@
* @author Thomas Baumgart (C) 2006
*
* This class represents a helper object required
- * to be able to use Qt's signal/slot mechanism within
+ * to be able to use TQt's signal/slot mechanism within
* the KMyMoneyWizardPage object which cannot be
- * derived from QObject directly.
+ * derived from TQObject directly.
*/
-class KMyMoneyWizardPagePrivate : public QObject
+class KMyMoneyWizardPagePrivate : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- KMyMoneyWizardPagePrivate(QObject* parent, const char* name = 0);
+ KMyMoneyWizardPagePrivate(TQObject* tqparent, const char* name = 0);
void emitCompleteStateChanged(void);
diff --git a/kmymoney2/widgets/kschedulebriefwidget.ui b/kmymoney2/widgets/kschedulebriefwidget.ui
index 7dc523d..609dcd2 100644
--- a/kmymoney2/widgets/kschedulebriefwidget.ui
+++ b/kmymoney2/widgets/kschedulebriefwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>kScheduleBriefWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>kScheduleBriefWidget</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>frame3</cstring>
</property>
@@ -54,9 +54,9 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -68,7 +68,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>m_prevButton</cstring>
</property>
@@ -86,14 +86,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_indexLabel</cstring>
</property>
@@ -111,14 +111,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
</spacer>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>m_nextButton</cstring>
</property>
@@ -128,25 +128,25 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>60</width>
<height>32767</height>
@@ -156,17 +156,17 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>60</width>
<height>32767</height>
@@ -176,7 +176,7 @@
<string>Type:</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>m_name</cstring>
</property>
@@ -187,7 +187,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>m_account</cstring>
</property>
@@ -198,7 +198,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>m_type</cstring>
</property>
@@ -209,7 +209,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -221,7 +221,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
@@ -233,7 +233,7 @@
</widget>
</grid>
</widget>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<property name="name">
<cstring>m_details</cstring>
</property>
@@ -250,7 +250,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -274,14 +274,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>35</width>
<height>0</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -334,7 +334,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>43</width>
<height>0</height>
@@ -347,5 +347,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp
index 974ae23..0494d51 100644
--- a/kmymoney2/widgets/register.cpp
+++ b/kmymoney2/widgets/register.cpp
@@ -20,12 +20,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qstring.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qtooltip.h>
-#include <qimage.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -50,7 +50,7 @@
const int LinesPerMemo = 3;
-static QString sortOrderText[] = {
+static TQString sortOrderText[] = {
I18N_NOOP("Unknown"),
I18N_NOOP("Post date"),
I18N_NOOP("Date entered"),
@@ -100,7 +100,7 @@ static unsigned char fancymarker_bg_image[] = {
0x4E,0x44,0xAE,0x42,0x60,0x82
};
-QPixmap* GroupMarker::m_bg = 0;
+TQPixmap* GroupMarker::m_bg = 0;
int GroupMarker::m_bgRefCnt = 0;
void ItemPtrVector::sort(void)
@@ -124,11 +124,11 @@ void ItemPtrVector::sort(void)
bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
{
- const QValueList<TransactionSortField>& sortOrder = i1->parent()->sortOrder();
- QValueList<TransactionSortField>::const_iterator it;
+ const TQValueList<TransactionSortField>& sortOrder = i1->tqparent()->sortOrder();
+ TQValueList<TransactionSortField>::const_iterator it;
int rc = 0;
bool ok1, ok2;
- Q_ULLONG n1, n2;
+ TQ_ULLONG n1, n2;
MyMoneyMoney tmp;
@@ -147,7 +147,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
break;
case PayeeSort:
- rc = QString::localeAwareCompare(i1->sortPayee(), i2->sortPayee());
+ rc = TQString::localeAwareCompare(i1->sortPayee(), i2->sortPayee());
break;
case ValueSort:
@@ -180,7 +180,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
} else if(!ok1 && ok2) {
rc = 1;
} else
- rc = QString::localeAwareCompare(i1->sortNumber(), i2->sortNumber());
+ rc = TQString::localeAwareCompare(i1->sortNumber(), i2->sortNumber());
break;
case EntryOrderSort:
@@ -192,7 +192,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
break;
case CategorySort:
- rc = QString::localeAwareCompare(i1->sortCategory(), i2->sortCategory());
+ rc = TQString::localeAwareCompare(i1->sortCategory(), i2->sortCategory());
break;
case ReconcileStateSort:
@@ -200,7 +200,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
break;
case SecuritySort:
- rc = QString::localeAwareCompare(i1->sortSecurity(), i2->sortSecurity());
+ rc = TQString::localeAwareCompare(i1->sortSecurity(), i2->sortSecurity());
break;
default:
@@ -220,17 +220,17 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2)
return rc < 0;
}
-GroupMarker::GroupMarker(Register *parent, const QString& txt) :
- RegisterItem(parent),
+GroupMarker::GroupMarker(Register *tqparent, const TQString& txt) :
+ RegisterItem(tqparent),
m_txt(txt),
- m_drawCounter(parent->drawCounter()-1), // make sure we get painted the first time around
+ m_drawCounter(tqparent->drawCounter()-1), // make sure we get painted the first time around
m_showDate(false)
{
int h;
if(m_parent) {
h = m_parent->rowHeightHint();
} else {
- QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
+ TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
h = fm.lineSpacing()+6;
}
@@ -241,14 +241,14 @@ GroupMarker::GroupMarker(Register *parent, const QString& txt) :
// convert the backgroud once
if(m_bg == 0) {
- m_bg = new QPixmap;
+ m_bg = new TQPixmap;
m_bg->loadFromData(fancymarker_bg_image, sizeof(fancymarker_bg_image));
- // for now, we can't simply resize the m_bg member as Qt does not support
- // alpha resizing. So we take the (slow) detour through a QImage object
+ // for now, we can't simply resize the m_bg member as TQt does not support
+ // alpha resizing. So we take the (slow) detour through a TQImage object
// which is ok, since we do this only once.
// m_bg->resize(m_bg->width(), h);
- QImage img(m_bg->convertToImage());
+ TQImage img(m_bg->convertToImage());
img = img.smoothScale(img.width(), h);
m_bg->convertFromImage(img);
}
@@ -265,7 +265,7 @@ GroupMarker::~GroupMarker()
}
}
-void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, const QRect& _r, bool /*selected*/, const QColorGroup& _cg)
+void GroupMarker::paintRegisterCell(TQPainter* painter, int row, int /* col */, const TQRect& _r, bool /*selected*/, const TQColorGroup& _cg)
{
// avoid painting the marker twice for the same update round
unsigned int drawCounter = m_parent->drawCounter();
@@ -274,7 +274,7 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c
}
m_drawCounter = drawCounter;
- QRect r(_r);
+ TQRect r(_r);
painter->save();
painter->translate(-r.x(), -r.y());
@@ -283,35 +283,35 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c
r.setWidth(m_parent->visibleWidth());
painter->translate(r.x(), r.y());
- QRect cellRect;
+ TQRect cellRect;
cellRect.setX(0);
cellRect.setY(0);
cellRect.setWidth(m_parent->visibleWidth());
cellRect.setHeight(m_parent->rowHeight(row + m_startRow));
// clear out cell rectangle
- QColorGroup cg(_cg);
+ TQColorGroup cg(_cg);
setupColors(cg);
- QBrush backgroundBrush(cg.base());
+ TQBrush backgroundBrush(cg.base());
painter->fillRect(cellRect, backgroundBrush);
painter->setPen(KMyMoneyGlobalSettings::listGridColor());
painter->drawLine(cellRect.x(), cellRect.height()-1, cellRect.width(), cellRect.height()-1);
// now write the text
painter->setPen(cg.text());
- QFont font = painter->font();
+ TQFont font = painter->font();
font.setBold(true);
painter->setFont(font);
- painter->drawText(cellRect, Qt::AlignVCenter | Qt::AlignCenter, m_txt);
+ painter->drawText(cellRect, TQt::AlignVCenter | TQt::AlignCenter, m_txt);
cellRect.setHeight(m_bg->height());
int curWidth = m_bg->width();
// if the background image is too small (not wide enough) we need to increase its width.
if(curWidth < cellRect.width()) {
- QPixmap* newPic = new QPixmap(cellRect.width(), cellRect.height());
+ TQPixmap* newPic = new TQPixmap(cellRect.width(), cellRect.height());
int x = 0;
while(x < cellRect.width()) {
copyBlt(newPic, x, 0, m_bg, 0, 0, curWidth, m_bg->height());
@@ -340,15 +340,15 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c
font.setBold(false);
painter->setFont(font);
- painter->drawText(cellRect, Qt::AlignVCenter | Qt::AlignCenter, KGlobal::locale()->formatDate(sortPostDate(), true));
+ painter->drawText(cellRect, TQt::AlignVCenter | TQt::AlignCenter, KGlobal::locale()->formatDate(sortPostDate(), true));
}
painter->restore();
}
-void GroupMarker::setupColors(QColorGroup& cg)
+void GroupMarker::setupColors(TQColorGroup& cg)
{
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor());
}
int GroupMarker::rowHeightHint(void) const
@@ -359,32 +359,32 @@ int GroupMarker::rowHeightHint(void) const
return m_bg->height();
}
-StatementGroupMarker::StatementGroupMarker(Register* parent, CashFlowDirection dir, const QDate& date, const QString& txt) :
- FancyDateGroupMarker(parent, date, txt),
+StatementGroupMarker::StatementGroupMarker(Register* tqparent, CashFlowDirection dir, const TQDate& date, const TQString& txt) :
+ FancyDateGroupMarker(tqparent, date, txt),
m_dir(dir)
{
m_showDate = true;
}
-FancyDateGroupMarker::FancyDateGroupMarker(Register* parent, const QDate& date, const QString& txt) :
- GroupMarker(parent, txt),
+FancyDateGroupMarker::FancyDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) :
+ GroupMarker(tqparent, txt),
m_date(date)
{
}
-FiscalYearGroupMarker::FiscalYearGroupMarker(Register* parent, const QDate& date, const QString& txt) :
- FancyDateGroupMarker(parent, date, txt)
+FiscalYearGroupMarker::FiscalYearGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) :
+ FancyDateGroupMarker(tqparent, date, txt)
{
}
-void FiscalYearGroupMarker::setupColors(QColorGroup& cg)
+void FiscalYearGroupMarker::setupColors(TQColorGroup& cg)
{
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor());
}
-SimpleDateGroupMarker::SimpleDateGroupMarker(Register* parent, const QDate& date, const QString& txt) :
- FancyDateGroupMarker(parent, date, txt)
+SimpleDateGroupMarker::SimpleDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) :
+ FancyDateGroupMarker(tqparent, date, txt)
{
}
@@ -396,9 +396,9 @@ int SimpleDateGroupMarker::rowHeightHint(void) const
return RegisterItem::rowHeightHint() / 2;
}
-void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /*col*/, const QRect& _r, bool /*selected*/, const QColorGroup& _cg)
+void SimpleDateGroupMarker::paintRegisterCell(TQPainter* painter, int row, int /*col*/, const TQRect& _r, bool /*selected*/, const TQColorGroup& _cg)
{
- QRect r(_r);
+ TQRect r(_r);
painter->save();
painter->translate(-r.x(), -r.y());
@@ -407,20 +407,20 @@ void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /*
r.setWidth(m_parent->visibleWidth());
painter->translate(r.x(), r.y());
- QRect cellRect;
+ TQRect cellRect;
cellRect.setX(0);
cellRect.setY(0);
cellRect.setWidth(m_parent->visibleWidth());
cellRect.setHeight(m_parent->rowHeight(row + m_startRow));
// clear out cell rectangle
- QColorGroup cg(_cg);
+ TQColorGroup cg(_cg);
if(m_alternate)
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor());
else
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
- QBrush backgroundBrush(cg.base());
- // backgroundBrush.setStyle(Qt::DiagCrossPattern);
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
+ TQBrush backgroundBrush(cg.base());
+ // backgroundBrush.setStyle(TQt::DiagCrossPattern);
backgroundBrush.setStyle(Qt::Dense5Pattern);
backgroundBrush.setColor(KMyMoneyGlobalSettings::listGridColor());
painter->eraseRect(cellRect);
@@ -431,8 +431,8 @@ void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /*
painter->restore();
}
-TypeGroupMarker::TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType) :
- GroupMarker(parent),
+TypeGroupMarker::TypeGroupMarker(Register* tqparent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType) :
+ GroupMarker(tqparent),
m_dir(dir)
{
switch(dir) {
@@ -454,18 +454,18 @@ TypeGroupMarker::TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMone
}
}
-PayeeGroupMarker::PayeeGroupMarker(Register* parent, const QString& name) :
- GroupMarker(parent, name)
+PayeeGroupMarker::PayeeGroupMarker(Register* tqparent, const TQString& name) :
+ GroupMarker(tqparent, name)
{
}
-CategoryGroupMarker::CategoryGroupMarker(Register* parent, const QString& category) :
- GroupMarker(parent, category)
+CategoryGroupMarker::CategoryGroupMarker(Register* tqparent, const TQString& category) :
+ GroupMarker(tqparent, category)
{
}
-ReconcileGroupMarker::ReconcileGroupMarker(Register* parent, MyMoneySplit::reconcileFlagE state) :
- GroupMarker(parent),
+ReconcileGroupMarker::ReconcileGroupMarker(Register* tqparent, MyMoneySplit::reconcileFlagE state) :
+ GroupMarker(tqparent),
m_state(state)
{
switch(state) {
@@ -487,30 +487,30 @@ ReconcileGroupMarker::ReconcileGroupMarker(Register* parent, MyMoneySplit::recon
}
}
-class RegisterToolTip : public QToolTip
+class RegisterToolTip : public TQToolTip
{
public:
- RegisterToolTip(QWidget* parent, Register* reg);
- void maybeTip(const QPoint& pos);
+ RegisterToolTip(TQWidget* tqparent, Register* reg);
+ void maybeTip(const TQPoint& pos);
virtual ~RegisterToolTip() {}
private:
Register* m_register;
};
-RegisterToolTip::RegisterToolTip(QWidget* parent, Register * reg) :
- QToolTip(parent),
+RegisterToolTip::RegisterToolTip(TQWidget* tqparent, Register * reg) :
+ TQToolTip(tqparent),
m_register(reg)
{
}
-void RegisterToolTip::maybeTip(const QPoint& pos)
+void RegisterToolTip::maybeTip(const TQPoint& pos)
{
// if we update the register, there's no need to show tooltips
if(!m_register->isUpdatesEnabled())
return;
- QPoint cpos = m_register->viewportToContents(pos);
+ TQPoint cpos = m_register->viewportToContents(pos);
// qDebug("RegisterToolTip::mayBeTip(%d,%d)", cpos.x(), cpos.y());
int row = m_register->rowAt(cpos.y());
int col = m_register->columnAt(cpos.x());
@@ -518,25 +518,25 @@ void RegisterToolTip::maybeTip(const QPoint& pos)
if(!item)
return;
- QPoint relPos(cpos.x() - m_register->columnPos(0), cpos.y() - m_register->rowPos(item->startRow()));
+ TQPoint relPos(cpos.x() - m_register->columnPos(0), cpos.y() - m_register->rowPos(item->startRow()));
row = row - item->startRow();
// qDebug("row = %d, col = %d", row, col);
// qDebug("relpos = %d,%d", relPos.x(), relPos.y());
- QString msg;
- QRect rect;
+ TQString msg;
+ TQRect rect;
if(!item->maybeTip(cpos, row, col, rect, msg))
return;
- QPoint tl(rect.topLeft());
- QPoint br(rect.bottomRight());
- QRect r = QRect(m_register->contentsToViewport(tl), m_register->contentsToViewport(br));
+ TQPoint tl(rect.topLeft());
+ TQPoint br(rect.bottomRight());
+ TQRect r = TQRect(m_register->contentsToViewport(tl), m_register->contentsToViewport(br));
tip(r, msg);
return;
}
-Register::Register(QWidget *parent, const char *name ) :
- TransactionEditorContainer(parent, name),
+Register::Register(TQWidget *tqparent, const char *name ) :
+ TransactionEditorContainer(tqparent, name),
m_selectAnchor(0),
m_focusItem(0),
m_firstItem(0),
@@ -550,7 +550,7 @@ Register::Register(QWidget *parent, const char *name ) :
m_listsDirty(false),
m_ignoreNextButtonRelease(false),
m_needInitialColumnResize(false),
- m_buttonState(Qt::ButtonState(0)),
+ m_buttonState(TQt::ButtonState(0)),
m_drawCounter(0)
{
m_tooltip = new RegisterToolTip(viewport(), this);
@@ -587,32 +587,32 @@ Register::Register(QWidget *parent, const char *name ) :
horizontalHeader()->installEventFilter(this);
// never show horizontal scroll bars
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
- connect(this, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(selectItem(int, int, int, const QPoint&)));
- connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)), this, SLOT(slotDoubleClicked(int, int, int, const QPoint&)));
+ connect(this, TQT_SIGNAL(clicked(int, int, int, const TQPoint&)), this, TQT_SLOT(selectItem(int, int, int, const TQPoint&)));
+ connect(this, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint&)), this, TQT_SLOT(slotDoubleClicked(int, int, int, const TQPoint&)));
// double clicking the header turns on auto column sizing
- connect(horizontalHeader(), SIGNAL(sectionSizeChanged(int)), this, SLOT(slotAutoColumnSizing(int)));
+ connect(horizontalHeader(), TQT_SIGNAL(sectionSizeChanged(int)), this, TQT_SLOT(slotAutoColumnSizing(int)));
//DND
setAcceptDrops(true);
}
// DND
-Transaction* Register::dropTransaction(QPoint cPos) const
+Transaction* Register::dropTransaction(TQPoint cPos) const
{
Transaction* t = 0;
- cPos -= QPoint( verticalHeader()->width(), horizontalHeader()->height() );
+ cPos -= TQPoint( verticalHeader()->width(), horizontalHeader()->height() );
if(cPos.y() >= 0) {
- cPos += QPoint(contentsX(), contentsY());
+ cPos += TQPoint(contentsX(), contentsY());
int row = rowAt(cPos.y());
t = dynamic_cast<Transaction*>(itemAtRow(row));
}
return t;
}
-void Register::dragMoveEvent(QDragMoveEvent* event)
+void Register::dragMoveEvent(TQDragMoveEvent* event)
{
if ( KURLDrag::canDecode(event) ) {
event->ignore();
@@ -623,7 +623,7 @@ void Register::dragMoveEvent(QDragMoveEvent* event)
}
}
-void Register::dropEvent(QDropEvent* event)
+void Register::dropEvent(TQDropEvent* event)
{
qDebug("Register::dropEvent");
if ( KURLDrag::canDecode(event) ) {
@@ -657,7 +657,7 @@ void Register::slotAutoColumnSizing(int section)
// but no account? (ipwizard 2007-11-06)
if(isUpdatesEnabled()) {
int w = visibleWidth();
- QString size;
+ TQString size;
for(int i=0; i < numCols(); ++i) {
if(i)
size += ",";
@@ -665,7 +665,7 @@ void Register::slotAutoColumnSizing(int section)
size += "0";
continue;
}
- size += QString("%1").arg((columnWidth(i) * 100) / w);
+ size += TQString("%1").tqarg((columnWidth(i) * 100) / w);
}
qDebug("size = %s", size.data());
m_account.setValue("kmm-ledger-column-width", size);
@@ -673,34 +673,34 @@ void Register::slotAutoColumnSizing(int section)
#endif
}
-bool Register::eventFilter(QObject* o, QEvent* e)
+bool Register::eventFilter(TQObject* o, TQEvent* e)
{
- if(o == horizontalHeader() && e->type() == QEvent::MouseButtonPress) {
- QMouseEvent *me = dynamic_cast<QMouseEvent*>(e);
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(horizontalHeader()) && e->type() == TQEvent::MouseButtonPress) {
+ TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e);
if(me->button() == Qt::RightButton) {
emit headerClicked();
}
// eat up left mouse button press for now
return true;
- } else if(o == horizontalHeader() && e->type() == QEvent::Paint) {
+ } else if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(horizontalHeader()) && e->type() == TQEvent::Paint) {
// always show the header in bold (to suppress cell selection)
- QFont f(horizontalHeader()->font());
+ TQFont f(horizontalHeader()->font());
f.setBold(true);
horizontalHeader()->setFont(f);
- } else if(o == this && e->type() == QEvent::KeyPress) {
- QKeyEvent* ke = dynamic_cast<QKeyEvent*>(e);
- if(ke->key() == Qt::Key_Menu) {
+ } else if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ke = dynamic_cast<TQKeyEvent*>(e);
+ if(ke->key() == TQt::Key_Menu) {
emit openContextMenu();
return true;
}
}
- return QTable::eventFilter(o, e);
+ return TQTable::eventFilter(o, e);
}
-void Register::setupRegister(const MyMoneyAccount& account, const QValueList<Column>& cols)
+void Register::setupRegister(const MyMoneyAccount& account, const TQValueList<Column>& cols)
{
m_account = account;
bool enabled = isUpdatesEnabled();
@@ -712,7 +712,7 @@ void Register::setupRegister(const MyMoneyAccount& account, const QValueList<Col
m_needInitialColumnResize = true;
m_lastCol = static_cast<Column>(0);
- QValueList<Column>::const_iterator it_c;
+ TQValueList<Column>::const_iterator it_c;
for(it_c = cols.begin(); it_c != cols.end(); ++it_c) {
if((*it_c) > MaxColumns)
continue;
@@ -844,13 +844,13 @@ void Register::setupRegister(const MyMoneyAccount& account, bool showAccountColu
bool Register::focusNextPrevChild(bool next)
{
- return QFrame::focusNextPrevChild(next);
+ return TQFrame::focusNextPrevChild(next);
}
-void Register::setSortOrder(const QString& order)
+void Register::setSortOrder(const TQString& order)
{
- QStringList orderList = QStringList::split(",", order);
- QStringList::const_iterator it;
+ TQStringList orderList = TQStringList::split(",", order);
+ TQStringList::const_iterator it;
m_sortOrder.clear();
for(it = orderList.begin(); it != orderList.end(); ++it) {
m_sortOrder << static_cast<TransactionSortField>((*it).toInt());
@@ -869,7 +869,7 @@ void Register::sortItems(void)
RegisterItem* prev = 0;
RegisterItem* item;
m_firstItem = m_lastItem = 0;
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
item = m_items[i];
if(!item)
continue;
@@ -929,7 +929,7 @@ void Register::clear(void)
#ifndef KMM_DESIGNER
// recalculate row height hint
- QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
+ TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
m_rowHeightHint = fm.lineSpacing()+6;
#endif
@@ -998,7 +998,7 @@ void Register::removeItem(RegisterItem* p)
p->setPrevItem(0);
// remove it from the m_items array
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
RegisterItem* item = m_items[i];
if(!item)
continue;
@@ -1030,7 +1030,7 @@ void Register::setupItemIndex(int rowCount)
rowCount = 0;
RegisterItem* prev = 0;
m_firstItem = m_lastItem = 0;
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
RegisterItem* item = m_items[i];
if(!item)
continue;
@@ -1048,11 +1048,11 @@ void Register::setupItemIndex(int rowCount)
}
}
-void Register::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+void Register::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
{
- // the QTable::drawContents() method does not honor the block update flag
+ // the TQTable::drawContents() method does not honor the block update flag
// so we take care of it here
- if ( testWState(WState_Visible|WState_BlockUpdates) != WState_Visible )
+ if ( testWState((TQt::WidgetState)(WState_Visible|WState_BlockUpdates)) != WState_Visible )
return;
if(m_listsDirty) {
@@ -1060,13 +1060,13 @@ void Register::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
}
++m_drawCounter;
- QTable::drawContents(p, cx, cy, cw, ch);
+ TQTable::drawContents(p, cx, cy, cw, ch);
}
void Register::updateAlternate(void) const
{
bool alternate = false;
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
RegisterItem* item = m_items[i];
if(!item)
continue;
@@ -1110,7 +1110,7 @@ void Register::updateRegister(bool forceUpdateRowHeight)
int rowCount = 0;
// determine the number of rows we need to display all items
// while going through the list, check for erronous transactions
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
RegisterItem* item = m_items[i];
if(!item)
continue;
@@ -1132,7 +1132,7 @@ void Register::updateRegister(bool forceUpdateRowHeight)
bool needUpdateHeaders = (numRows() != rowCount) | forceUpdateRowHeight;
- // setup QTable. Make sure to suppress screen updates for now
+ // setup TQTable. Make sure to suppress screen updates for now
bool updatesEnabled = isUpdatesEnabled();
setUpdatesEnabled(false);
setNumRows(rowCount);
@@ -1163,7 +1163,7 @@ void Register::updateRegister(bool forceUpdateRowHeight)
// force resizeing of the columns if necessary
if(m_needInitialColumnResize) {
- QTimer::singleShot(0, this, SLOT(resize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(resize()));
m_needInitialColumnResize = false;
} else {
updateContents();
@@ -1171,7 +1171,7 @@ void Register::updateRegister(bool forceUpdateRowHeight)
// if the number of rows changed, we might need to resize the register
// to make sure we reflect the current visibility of the scrollbars.
if(needUpdateHeaders)
- QTimer::singleShot(0, this, SLOT(resize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(resize()));
}
}
::timetrace("Done updateing register");
@@ -1185,7 +1185,7 @@ int Register::rowHeightHint(void) const
return m_rowHeightHint;
}
-void Register::paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg)
+void Register::paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg)
{
// determine the item that we need to paint in the row and call it's paintRegisterCell() method
if((row < 0) || ((unsigned)row > m_itemIndex.size())) {
@@ -1198,22 +1198,22 @@ void Register::paintCell(QPainter* painter, int row, int col, const QRect& r, bo
item->paintRegisterCell(painter, row - item->startRow(), col, r, selected, cg);
}
-void Register::focusInEvent(QFocusEvent* ev)
+void Register::focusInEvent(TQFocusEvent* ev)
{
- QTable::focusInEvent(ev);
+ TQTable::focusInEvent(ev);
if(m_focusItem) {
m_focusItem->setFocus(true, false);
- repaintItems(m_focusItem);
+ tqrepaintItems(m_focusItem);
}
}
-void Register::focusOutEvent(QFocusEvent* ev)
+void Register::focusOutEvent(TQFocusEvent* ev)
{
if(m_focusItem) {
m_focusItem->setFocus(false, false);
- repaintItems(m_focusItem);
+ tqrepaintItems(m_focusItem);
}
- QTable::focusOutEvent(ev);
+ TQTable::focusOutEvent(ev);
}
void Register::resize(void)
@@ -1292,9 +1292,9 @@ void Register::resize(int col)
kMyMoneyEdit* valField = new kMyMoneyEdit;
dateField->setFont(KMyMoneyGlobalSettings::listCellFont());
- setColumnWidth(DateColumn, dateField->minimumSizeHint().width());
+ setColumnWidth(DateColumn, dateField->tqminimumSizeHint().width());
valField->setMinimumWidth(ewidth);
- ewidth = valField->minimumSizeHint().width();
+ ewidth = valField->tqminimumSizeHint().width();
if(swidth > 0) {
swidth = columnWidth(SecurityColumn) + 40;
@@ -1325,7 +1325,7 @@ void Register::resize(int col)
#if 0
// see comment above
} else {
- QStringList colSizes = QStringList::split(",", m_account.value("kmm-ledger-column-width"), true);
+ TQStringList colSizes = TQStringList::split(",", m_account.value("kmm-ledger-column-width"), true);
for(int i; i < colSizes.count(); ++i) {
int colWidth = colSizes[i].toInt();
if(colWidth == 0)
@@ -1353,15 +1353,15 @@ void Register::adjustColumn(int col)
#ifdef KMM_DESIGNER
Q_UNUSED(col)
#else
- QString msg = "%1 adjusting column %2";
- ::timetrace((msg.arg("Start").arg(col)).data());
- QHeader *topHeader = horizontalHeader();
- QFontMetrics cellFontMetrics(KMyMoneyGlobalSettings::listCellFont());
+ TQString msg = "%1 adjusting column %2";
+ ::timetrace((msg.tqarg("Start").tqarg(col)).ascii());
+ TQHeader *topHeader = horizontalHeader();
+ TQFontMetrics cellFontMetrics(KMyMoneyGlobalSettings::listCellFont());
int w = topHeader->fontMetrics().width( topHeader->label( col ) ) + 10;
if ( topHeader->iconSet( col ) )
w += topHeader->iconSet( col )->pixmap().width();
- w = QMAX( w, 20 );
+ w = TQMAX( w, 20 );
int maxWidth = 0;
switch(col) {
@@ -1374,9 +1374,9 @@ void Register::adjustColumn(int col)
// check for date column
if(col == DateColumn) {
- QString txt = KGlobal::locale()->formatDate(QDate(6999,12,29), true);
+ TQString txt = KGlobal::locale()->formatDate(TQDate(6999,12,29), true);
int nw = cellFontMetrics.width(txt+" ");
- w = QMAX( w, nw );
+ w = TQMAX( w, nw );
} else {
// scan through the transactions
@@ -1387,7 +1387,7 @@ void Register::adjustColumn(int col)
Transaction* t = dynamic_cast<Transaction*>(item);
if(t) {
int nw = t->registerColWidth(col, cellFontMetrics);
- w = QMAX( w, nw );
+ w = TQMAX( w, nw );
if(maxWidth) {
if(w > maxWidth) {
w = maxWidth;
@@ -1402,7 +1402,7 @@ void Register::adjustColumn(int col)
#endif
}
-void Register::repaintItems(RegisterItem* first, RegisterItem* last)
+void Register::tqrepaintItems(RegisterItem* first, RegisterItem* last)
{
if(first == 0 && last == 0) {
first = firstItem();
@@ -1415,26 +1415,26 @@ void Register::repaintItems(RegisterItem* first, RegisterItem* last)
if(last == 0)
last = first;
- // qDebug("repaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1);
+ // qDebug("tqrepaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1);
// the following code is based on code I found in
- // QTable::cellGeometry() and QTable::updateCell() (ipwizard)
- QRect cg(0,
+ // TQTable::cellGeometry() and TQTable::updateCell() (ipwizard)
+ TQRect cg(0,
rowPos(first->startRow()),
visibleWidth(),
rowPos(last->startRow()+last->numRowsRegister()-1) - rowPos(first->startRow()) + rowHeight(last->startRow()+last->numRowsRegister()-1));
- QRect r(contentsToViewport(QPoint (cg.x() - 2, cg.y() - 2 )), QSize(cg.width() + 4, cg.height() + 4 ));
+ TQRect r(contentsToViewport(TQPoint (cg.x() - 2, cg.y() - 2 )), TQSize(cg.width() + 4, cg.height() + 4 ));
- QRect tmp = m_lastRepaintRect | r;
+ TQRect tmp = m_lastRepaintRect | r;
if(abs(tmp.height()) > 3000) {
- // make sure that the previously triggered repaint has been done before we
+ // make sure that the previously triggered tqrepaint has been done before we
// trigger the next. Not having this used to cause some trouble when changing
// the focus within a 2000 item ledger from the last to the first item.
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10);
}
m_lastRepaintRect = r;
- QApplication::postEvent( viewport(), new QPaintEvent( r, FALSE ) );
+ TQApplication::postEvent( viewport(), new TQPaintEvent( r, FALSE ) );
}
@@ -1477,7 +1477,7 @@ void Register::doSelectItems(int from, int to, bool selected)
// anything changed?
if(firstItem || lastItem)
- repaintItems(firstItem, lastItem);
+ tqrepaintItems(firstItem, lastItem);
}
RegisterItem* Register::itemAtRow(int row) const
@@ -1505,7 +1505,7 @@ void Register::selectedTransactions(SelectedTransactions& list) const
if(m_focusItem && m_focusItem->isSelected() && m_focusItem->isVisible()) {
Transaction* t = dynamic_cast<Transaction*>(m_focusItem);
if(t) {
- QString id;
+ TQString id;
if(t->isScheduled())
id = t->transaction().id();
SelectedTransaction s(t->transaction(), t->split(), id);
@@ -1521,7 +1521,7 @@ void Register::selectedTransactions(SelectedTransactions& list) const
if(item && item->isSelected() && item->isVisible()) {
Transaction* t = dynamic_cast<Transaction*>(item);
if(t) {
- QString id;
+ TQString id;
if(t->isScheduled())
id = t->transaction().id();
SelectedTransaction s(t->transaction(), t->split(), id);
@@ -1531,9 +1531,9 @@ void Register::selectedTransactions(SelectedTransactions& list) const
}
}
-QValueList<RegisterItem*> Register::selectedItems(void) const
+TQValueList<RegisterItem*> Register::selectedItems(void) const
{
- QValueList<RegisterItem*> list;
+ TQValueList<RegisterItem*> list;
RegisterItem* item = m_firstItem;
while(item) {
@@ -1557,7 +1557,7 @@ int Register::selectedItemsCount(void) const
return cnt;
}
-void Register::contentsMouseReleaseEvent( QMouseEvent *e )
+void Register::contentsMouseReleaseEvent( TQMouseEvent *e )
{
if(m_ignoreNextButtonRelease) {
m_ignoreNextButtonRelease = false;
@@ -1565,10 +1565,10 @@ void Register::contentsMouseReleaseEvent( QMouseEvent *e )
}
m_buttonState = e->state();
- QTable::contentsMouseReleaseEvent(e);
+ TQTable::contentsMouseReleaseEvent(e);
}
-void Register::selectItem(int row, int col, int button, const QPoint& /* mousePos */)
+void Register::selectItem(int row, int col, int button, const TQPoint& /* mousePos */)
{
if(row >= 0 && (unsigned)row < m_itemIndex.size()) {
RegisterItem* item = m_itemIndex[row];
@@ -1578,7 +1578,7 @@ void Register::selectItem(int row, int col, int button, const QPoint& /* mousePo
if(item->hasEditorOpen() || !item->isSelectable())
return;
- QString id = item->id();
+ TQString id = item->id();
selectItem(item);
// selectItem() might have changed the pointers, so we
// need to reconstruct it here
@@ -1616,9 +1616,9 @@ bool Register::setFocusItem(RegisterItem* focusItem)
if(focusItem && focusItem->canHaveFocus()) {
if(m_focusItem) {
m_focusItem->setFocus(false);
- // issue a repaint here only if we move the focus
+ // issue a tqrepaint here only if we move the focus
if(m_focusItem != focusItem)
- repaintItems(m_focusItem);
+ tqrepaintItems(m_focusItem);
}
Transaction* item = dynamic_cast<Transaction*>(focusItem);
if(m_focusItem != focusItem && item) {
@@ -1630,7 +1630,7 @@ bool Register::setFocusItem(RegisterItem* focusItem)
if(m_listsDirty)
updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm());
ensureItemVisible(m_focusItem);
- repaintItems(m_focusItem);
+ tqrepaintItems(m_focusItem);
return true;
} else
return false;
@@ -1654,15 +1654,15 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
// kdDebug(2) << "Register::selectItem(" << item << "): type is " << typeid(*item).name() << endl;
- Qt::ButtonState buttonState = m_buttonState;
+ TQt::ButtonState buttonState = m_buttonState;
m_buttonState = Qt::NoButton;
if(m_selectionMode == NoSelection)
return;
if(item->isSelectable()) {
- QString id = item->id();
- QValueList<RegisterItem*> itemList = selectedItems();
+ TQString id = item->id();
+ TQValueList<RegisterItem*> itemList = selectedItems();
bool okToSelect = true;
int cnt = itemList.count();
bool sameEntryType = true;
@@ -1672,7 +1672,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
}
if(buttonState & Qt::LeftButton) {
- if(!(buttonState & (Qt::ShiftButton | Qt::ControlButton))) {
+ if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) {
if((cnt != 1) || ((cnt == 1) && !item->isSelected())) {
emit aboutToSelectItem(item, okToSelect);
if(okToSelect) {
@@ -1688,8 +1688,8 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
}
if(m_selectionMode == Multi) {
- switch(buttonState & (Qt::ShiftButton | Qt::ControlButton)) {
- case Qt::ControlButton:
+ switch(buttonState & (TQt::ShiftButton | TQt::ControlButton)) {
+ case TQt::ControlButton:
okToSelect = sameEntryType;
if(typeid(*item) == typeid(StdTransactionScheduled))
okToSelect = false;
@@ -1703,7 +1703,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
}
break;
- case Qt::ShiftButton:
+ case TQt::ShiftButton:
okToSelect = sameEntryType;
if(typeid(*item) == typeid(StdTransactionScheduled))
okToSelect = false;
@@ -1725,7 +1725,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
//
// a) single transaction is selected
// b) multiple transactions are selected and the one to be selected is not
- if(!(buttonState & (Qt::ShiftButton | Qt::ControlButton))) {
+ if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) {
if((cnt > 0) && (!item->isSelected())) {
okToSelect = sameEntryType;
emit aboutToSelectItem(item, okToSelect);
@@ -1766,10 +1766,10 @@ void Register::ensureItemVisible(RegisterItem* item)
return;
m_ensureVisibleItem = item;
- QTimer::singleShot(0, this, SLOT(slotEnsureItemVisible()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotEnsureItemVisible()));
}
-void Register::slotDoubleClicked(int row, int, int, const QPoint&)
+void Register::slotDoubleClicked(int row, int, int, const TQPoint&)
{
if(row >= 0 && (unsigned)row < m_itemIndex.size()) {
RegisterItem* p = m_itemIndex[row];
@@ -1785,8 +1785,8 @@ void Register::slotDoubleClicked(int row, int, int, const QPoint&)
if(m_focusItem->isSelected()) {
// don't emit the signal right away but wait until
- // we come back to the Qt main loop
- QTimer::singleShot(0, this, SIGNAL(editTransaction()));
+ // we come back to the TQt main loop
+ TQTimer::singleShot(0, this, TQT_SIGNAL(editTransaction()));
}
}
}
@@ -1846,7 +1846,7 @@ void Register::slotEnsureItemVisible(void)
}
}
-TransactionSortField KMyMoneyRegister::textToSortOrder(const QString& text)
+TransactionSortField KMyMoneyRegister::textToSortOrder(const TQString& text)
{
for(int idx = 1; idx < static_cast<int>(MaxSortFields); ++idx) {
if(text == i18n(sortOrderText[idx])) {
@@ -1856,22 +1856,22 @@ TransactionSortField KMyMoneyRegister::textToSortOrder(const QString& text)
return UnknownSort;
}
-const QString KMyMoneyRegister::sortOrderToText(TransactionSortField idx)
+const TQString KMyMoneyRegister::sortOrderToText(TransactionSortField idx)
{
if(idx < PostDateSort || idx >= MaxSortFields)
idx = UnknownSort;
return i18n(sortOrderText[idx]);
}
-QString Register::text(int /*row*/, int /*col*/) const
+TQString Register::text(int /*row*/, int /*col*/) const
{
- return QString("a");
+ return TQString("a");
}
-QWidget* Register::cellWidget(int row, int col) const
+TQWidget* Register::cellWidget(int row, int col) const
{
// separeted here in two if()s, because this method is called for each
- // event from QTable::eventFilter and in the most cases it is -1, -1
+ // event from TQTable::eventFilter and in the most cases it is -1, -1
if(row < 0 || col < 0)
return 0;
@@ -1884,24 +1884,24 @@ QWidget* Register::cellWidget(int row, int col) const
if(!m_cellWidgets.count())
return 0;
- QWidget* w = 0;
- QPair<int, int> idx = qMakePair(row, col);
- QMap<QPair<int, int>, QWidget*>::const_iterator it_w;
+ TQWidget* w = 0;
+ TQPair<int, int> idx = tqMakePair(row, col);
+ TQMap<TQPair<int, int>, TQWidget*>::const_iterator it_w;
- it_w = m_cellWidgets.find(idx);
+ it_w = m_cellWidgets.tqfind(idx);
if(it_w != m_cellWidgets.end())
w = *it_w;
return w;
}
-void Register::insertWidget(int row, int col, QWidget* w)
+void Register::insertWidget(int row, int col, TQWidget* w)
{
if(row < 0 || col < 0 || row > numRows() - 1 || col > numCols() - 1) {
qWarning("Register::insertWidget(%d,%d) out of bounds", row, col);
return;
}
- QPair<int, int> idx = qMakePair(row, col);
+ TQPair<int, int> idx = tqMakePair(row, col);
m_cellWidgets[idx] = w;
}
@@ -1912,17 +1912,17 @@ void Register::clearCellWidget(int row, int col)
return;
}
- QPair<int, int> idx = qMakePair(row, col);
- QMap<QPair<int, int>, QWidget*>::iterator it_w;
+ TQPair<int, int> idx = tqMakePair(row, col);
+ TQMap<TQPair<int, int>, TQWidget*>::iterator it_w;
- it_w = m_cellWidgets.find(idx);
+ it_w = m_cellWidgets.tqfind(idx);
if(it_w != m_cellWidgets.end()) {
(*it_w)->deleteLater();
m_cellWidgets.remove(it_w);
}
}
-QWidget* Register::createEditor(int /*row*/, int /*col*/, bool /*initFromCell*/) const
+TQWidget* Register::createEditor(int /*row*/, int /*col*/, bool /*initFromCell*/) const
{
return 0;
}
@@ -1931,28 +1931,28 @@ void Register::setCellContentFromEditor(int /*row*/, int /*col*/)
{
}
-void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/)
+void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/)
{
}
-void Register::arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t)
+void Register::arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t)
{
t->arrangeWidgetsInRegister(editWidgets);
ensureItemVisible(t);
// updateContents();
}
-void Register::tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const
+void Register::tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const
{
t->tabOrderInRegister(tabOrderWidgets);
}
-void Register::removeEditWidgets(QMap<QString, QWidget*>& editWidgets)
+void Register::removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets)
{
// remove pointers from map
- QMap<QString, QWidget*>::iterator it;
+ TQMap<TQString, TQWidget*>::iterator it;
for(it = editWidgets.begin(); it != editWidgets.end(); ) {
- if((*it)->parentWidget() == this) {
+ if((*it)->tqparentWidget() == this) {
editWidgets.remove(it);
it = editWidgets.begin();
} else
@@ -1980,20 +1980,20 @@ void Register::slotToggleErronousTransactions(void)
KMyMoneyRegister::RegisterItem* p = m_firstErronous;
while(p && p->prevItem() != m_lastErronous) {
if(p->isErronous())
- repaintItems(p);
+ tqrepaintItems(p);
p = p->nextItem();
}
// restart timer
- QTimer::singleShot(500, this, SLOT(slotToggleErronousTransactions()));
+ TQTimer::singleShot(500, this, TQT_SLOT(slotToggleErronousTransactions()));
}
-RegisterItem* Register::itemById(const QString& id) const
+RegisterItem* Register::itemById(const TQString& id) const
{
if(id.isEmpty())
return m_lastItem;
- for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
+ for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) {
RegisterItem* item = m_items[i];
if(!item)
continue;
@@ -2097,7 +2097,7 @@ void Register::scrollPage(int key, ButtonState state)
int height = 0;
switch(key) {
- case Qt::Key_PageUp:
+ case TQt::Key_PageUp:
while(height < visibleHeight() && item->prevItem()) {
do {
item = item->prevItem();
@@ -2106,7 +2106,7 @@ void Register::scrollPage(int key, ButtonState state)
} while((!item->isSelectable() || !item->isVisible()) && item->prevItem());
}
break;
- case Qt::Key_PageDown:
+ case TQt::Key_PageDown:
while(height < visibleHeight() && item->nextItem()) {
do {
if(item->isVisible())
@@ -2116,7 +2116,7 @@ void Register::scrollPage(int key, ButtonState state)
}
break;
- case Qt::Key_Up:
+ case TQt::Key_Up:
if(item->prevItem()) {
do {
item = item->prevItem();
@@ -2124,7 +2124,7 @@ void Register::scrollPage(int key, ButtonState state)
}
break;
- case Qt::Key_Down:
+ case TQt::Key_Down:
if(item->nextItem()) {
do {
item = item->nextItem();
@@ -2132,13 +2132,13 @@ void Register::scrollPage(int key, ButtonState state)
}
break;
- case Qt::Key_Home:
+ case TQt::Key_Home:
item = m_firstItem;
while((!item->isSelectable() || !item->isVisible()) && item->nextItem())
item = item->nextItem();
break;
- case Qt::Key_End:
+ case TQt::Key_End:
item = m_lastItem;
while((!item->isSelectable() || !item->isVisible()) && item->prevItem())
item = item->prevItem();
@@ -2159,7 +2159,7 @@ void Register::scrollPage(int key, ButtonState state)
setFocusItem(item);
if(item->isSelectable()) {
- handleItemChange(oldFocusItem, state & Qt::ShiftButton, state & Qt::ControlButton);
+ handleItemChange(oldFocusItem, state & TQt::ShiftButton, state & TQt::ControlButton);
// tell the world about the changes in selection
SelectedTransactions list(this);
emit selectionChanged(list);
@@ -2169,45 +2169,45 @@ void Register::scrollPage(int key, ButtonState state)
selectItem(item);
}
-void Register::keyPressEvent(QKeyEvent* ev)
+void Register::keyPressEvent(TQKeyEvent* ev)
{
switch(ev->key()) {
- case Qt::Key_Space:
+ case TQt::Key_Space:
if(m_selectionMode != NoSelection) {
// get the state out of the event ...
m_buttonState = ev->state();
// ... and pretend that we have pressed the left mouse button ;)
- m_buttonState = static_cast<Qt::ButtonState>(m_buttonState | Qt::LeftButton);
+ m_buttonState = static_cast<TQt::ButtonState>(m_buttonState | Qt::LeftButton);
selectItem(m_focusItem);
}
break;
- case Qt::Key_PageUp:
- case Qt::Key_PageDown:
- case Qt::Key_Home:
- case Qt::Key_End:
- case Qt::Key_Down:
- case Qt::Key_Up:
+ case TQt::Key_PageUp:
+ case TQt::Key_PageDown:
+ case TQt::Key_Home:
+ case TQt::Key_End:
+ case TQt::Key_Down:
+ case TQt::Key_Up:
scrollPage(ev->key(), ev->state());
break;
default:
- QTable::keyPressEvent(ev);
+ TQTable::keyPressEvent(ev);
break;
}
}
-Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId)
+Transaction* Register::transactionFactory(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId)
{
Transaction* t = 0;
MyMoneySplit s = split;
- if(parent->account() == MyMoneyAccount()) {
- t = new KMyMoneyRegister::StdTransaction(parent, transaction, s, uniqueId);
+ if(tqparent->account() == MyMoneyAccount()) {
+ t = new KMyMoneyRegister::StdTransaction(tqparent, transaction, s, uniqueId);
return t;
}
- switch(parent->account().accountType()) {
+ switch(tqparent->account().accountType()) {
case MyMoneyAccount::Checkings:
case MyMoneyAccount::Savings:
case MyMoneyAccount::Cash:
@@ -2221,29 +2221,29 @@ Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransac
case MyMoneyAccount::AssetLoan:
case MyMoneyAccount::Equity:
if(s.accountId().isEmpty())
- s.setAccountId(parent->account().id());
+ s.setAccountId(tqparent->account().id());
if(s.isMatched())
- t = new KMyMoneyRegister::StdTransactionMatched(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::StdTransactionMatched(tqparent, transaction, s, uniqueId);
else if(transaction.isImported())
- t = new KMyMoneyRegister::StdTransactionDownloaded(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::StdTransactionDownloaded(tqparent, transaction, s, uniqueId);
else
- t = new KMyMoneyRegister::StdTransaction(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::StdTransaction(tqparent, transaction, s, uniqueId);
break;
case MyMoneyAccount::Investment:
if(s.isMatched())
- t = new KMyMoneyRegister::InvestTransaction/* Matched */(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::InvestTransaction/* Matched */(tqparent, transaction, s, uniqueId);
else if(transaction.isImported())
- t = new KMyMoneyRegister::InvestTransactionDownloaded(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::InvestTransactionDownloaded(tqparent, transaction, s, uniqueId);
else
- t = new KMyMoneyRegister::InvestTransaction(parent, transaction, s, uniqueId);
+ t = new KMyMoneyRegister::InvestTransaction(tqparent, transaction, s, uniqueId);
break;
case MyMoneyAccount::CertificateDep:
case MyMoneyAccount::MoneyMarket:
case MyMoneyAccount::Stock:
default:
- qDebug("Register::transactionFactory: invalid accountTypeE %d", parent->account().accountType());
+ qDebug("Register::transactionFactory: invalid accountTypeE %d", tqparent->account().accountType());
break;
}
return t;
@@ -2251,25 +2251,25 @@ Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransac
void Register::addGroupMarkers(void)
{
- QMap<QString, int> list;
- QMap<QString, int>::const_iterator it;
+ TQMap<TQString, int> list;
+ TQMap<TQString, int>::const_iterator it;
KMyMoneyRegister::RegisterItem* p = firstItem();
KMyMoneyRegister::Transaction* t;
- QString name;
- QDate today;
- QDate yesterday, thisWeek, lastWeek;
- QDate thisMonth, lastMonth;
- QDate thisYear;
+ TQString name;
+ TQDate today;
+ TQDate yesterday, thisWeek, lastWeek;
+ TQDate thisMonth, lastMonth;
+ TQDate thisYear;
int weekStartOfs;
switch(primarySortKey()) {
case KMyMoneyRegister::PostDateSort:
case KMyMoneyRegister::EntryDateSort:
- today = QDate::currentDate();
+ today = TQDate::tqcurrentDate();
thisMonth.setYMD(today.year(), today.month(), 1);
lastMonth = thisMonth.addMonths(-1);
yesterday = today.addDays(-1);
- // a = QDate::dayOfWeek() todays weekday (1 = Monday, 7 = Sunday)
+ // a = TQDate::dayOfWeek() todays weekday (1 = Monday, 7 = Sunday)
// b = KLocale::weekStartDay() first day of week (1 = Monday, 7 = Sunday)
weekStartOfs = today.dayOfWeek() - KGlobal::locale()->weekStartDay();
if(weekStartOfs < 0) {
@@ -2278,7 +2278,7 @@ void Register::addGroupMarkers(void)
thisWeek = today.addDays(-weekStartOfs);
lastWeek = thisWeek.addDays(-7);
thisYear.setYMD(today.year(), 1, 1);
- if(KMyMoneyGlobalSettings::startDate().date() != QDate(1900,1,1))
+ if(KMyMoneyGlobalSettings::startDate().date() != TQDate(1900,1,1))
new KMyMoneyRegister::FancyDateGroupMarker(this, KMyMoneyGlobalSettings::startDate().date(), i18n("Prior transactions possibly filtered"));
if(KMyMoneyGlobalSettings::showFancyMarker()) {
@@ -2290,8 +2290,8 @@ void Register::addGroupMarkers(void)
MyMoneyMoney balance(m_account.value("lastStatementBalance"));
if(m_account.accountGroup() == MyMoneyAccount::Liability)
balance = -balance;
- QString txt = i18n("Online Statement Balance: %1").arg(balance.formatMoney(m_account.fraction()));
- new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, QDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate), txt);
+ TQString txt = i18n("Online Statement Balance: %1").tqarg(balance.formatMoney(m_account.fraction()));
+ new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate), txt);
}
new KMyMoneyRegister::FancyDateGroupMarker(this, thisYear, i18n("This year"));
@@ -2309,11 +2309,11 @@ void Register::addGroupMarkers(void)
new KMyMoneyRegister::SimpleDateGroupMarker(this, today.addDays(1), i18n("Future transactions"));
}
if(KMyMoneyGlobalSettings::showFiscalMarker()) {
- QDate currentFiscalYear(QDate::currentDate().year(), KMyMoneyGlobalSettings::firstFiscalMonth(), KMyMoneyGlobalSettings::firstFiscalDay());
+ TQDate currentFiscalYear(TQDate::tqcurrentDate().year(), KMyMoneyGlobalSettings::firstFiscalMonth(), KMyMoneyGlobalSettings::firstFiscalDay());
- if(QDate::currentDate() < currentFiscalYear)
+ if(TQDate::tqcurrentDate() < currentFiscalYear)
currentFiscalYear = currentFiscalYear.addYears(-1);
- QDate previousFiscalYear = currentFiscalYear.addYears(-1);
+ TQDate previousFiscalYear = currentFiscalYear.addYears(-1);
new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear, i18n("Current fiscal year"));
new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear.addYears(-1), i18n("Previous fiscal year"));
new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear.addYears(1), i18n("Next fiscal year"));
diff --git a/kmymoney2/widgets/register.h b/kmymoney2/widgets/register.h
index d9d2627..bc59ff6 100644
--- a/kmymoney2/widgets/register.h
+++ b/kmymoney2/widgets/register.h
@@ -28,13 +28,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtable.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qwidgetlist.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qevent.h>
+#include <tqtable.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqwidgetlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqevent.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -81,27 +81,27 @@ class Register;
class RegisterItem;
class ItemPtrVector;
-const QString sortOrderToText(TransactionSortField idx);
-TransactionSortField textToSortOrder(const QString& text);
+const TQString sortOrderToText(TransactionSortField idx);
+TransactionSortField textToSortOrder(const TQString& text);
-class QWidgetContainer : public QMap<QString, QWidget*>
+class TQWidgetContainer : public TQMap<TQString, TQWidget*>
{
public:
- QWidgetContainer() {}
+ TQWidgetContainer() {}
- QWidget* haveWidget(const QString& name) const {
- QWidgetContainer::const_iterator it_w;
- it_w = find(name);
+ TQWidget* haveWidget(const TQString& name) const {
+ TQWidgetContainer::const_iterator it_w;
+ it_w = tqfind(name);
if(it_w != end())
return *it_w;
return 0;
}
void removeOrphans(void) {
- QWidgetContainer::iterator it_w;
+ TQWidgetContainer::iterator it_w;
for(it_w = begin(); it_w != end(); ) {
- if((*it_w) && (*it_w)->parent())
+ if((*it_w) && (*it_w)->tqparent())
++it_w;
else {
delete (*it_w);
@@ -116,10 +116,10 @@ public:
class GroupMarker : public RegisterItem
{
public:
- GroupMarker(Register* parent, const QString& txt = QString());
+ GroupMarker(Register* tqparent, const TQString& txt = TQString());
~GroupMarker();
- void setText(const QString& txt) { m_txt = txt; }
- const QString& text(void) const { return m_txt; }
+ void setText(const TQString& txt) { m_txt = txt; }
+ const TQString& text(void) const { return m_txt; }
bool isSelectable(void) const { return false; }
bool canHaveFocus(void) const { return false; }
int numRows(void) const { return 1; }
@@ -128,23 +128,23 @@ public:
bool isErronous(void) const { return false; }
- void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
- void paintFormCell(QPainter* /* painter */, int /* row */, int /* col */, const QRect& /* r */, bool /* selected */, const QColorGroup& /* cg */) {}
+ void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
+ void paintFormCell(TQPainter* /* painter */, int /* row */, int /* col */, const TQRect& /* r */, bool /* selected */, const TQColorGroup& /* cg */) {}
int rowHeightHint(void) const;
- bool matches(const QString&) const { return true; }
+ bool matches(const TQString&) const { return true; }
virtual int sortSamePostDate(void) const { return 0; }
protected:
- void setupColors(QColorGroup& cg);
+ void setupColors(TQColorGroup& cg);
protected:
- QString m_txt;
+ TQString m_txt;
unsigned int m_drawCounter;
bool m_showDate;
- static QPixmap* m_bg;
+ static TQPixmap* m_bg;
static int m_bgRefCnt;
};
@@ -152,19 +152,19 @@ protected:
class FancyDateGroupMarker : public GroupMarker
{
public:
- FancyDateGroupMarker(Register* parent, const QDate& date, const QString& txt);
+ FancyDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt);
- virtual const QDate& sortPostDate(void) const { return m_date; }
- virtual const QDate& sortEntryDate(void) const { return m_date; }
+ virtual const TQDate& sortPostDate(void) const { return m_date; }
+ virtual const TQDate& sortEntryDate(void) const { return m_date; }
virtual const char* className(void) { return "FancyDateGroupMarker"; }
private:
- QDate m_date;
+ TQDate m_date;
};
class StatementGroupMarker : public FancyDateGroupMarker
{
public:
- StatementGroupMarker(Register* parent, CashFlowDirection dir, const QDate& date, const QString& txt );
+ StatementGroupMarker(Register* tqparent, CashFlowDirection dir, const TQDate& date, const TQString& txt );
CashFlowDirection sortType(void) const { return m_dir; }
virtual int sortSamePostDate(void) const { return 3; }
private:
@@ -174,8 +174,8 @@ private:
class SimpleDateGroupMarker : public FancyDateGroupMarker
{
public:
- SimpleDateGroupMarker(Register* parent, const QDate& date, const QString& txt);
- void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ SimpleDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt);
+ void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
int rowHeightHint(void) const;
virtual const char* className(void) { return "SimpleDateGroupMarker"; }
};
@@ -183,7 +183,7 @@ public:
class TypeGroupMarker : public GroupMarker
{
public:
- TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType);
+ TypeGroupMarker(Register* tqparent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType);
CashFlowDirection sortType(void) const { return m_dir; }
private:
CashFlowDirection m_dir;
@@ -192,27 +192,27 @@ private:
class FiscalYearGroupMarker : public FancyDateGroupMarker
{
public:
- FiscalYearGroupMarker(Register* parent, const QDate& date, const QString& txt);
+ FiscalYearGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt);
virtual const char* className(void) { return "FiscalYearGroupMarker"; }
virtual int sortSamePostDate(void) const { return 1; }
protected:
- void setupColors(QColorGroup& cg);
+ void setupColors(TQColorGroup& cg);
};
class PayeeGroupMarker : public GroupMarker
{
public:
- PayeeGroupMarker(Register* parent, const QString& name);
- const QString& sortPayee(void) const { return m_txt; }
+ PayeeGroupMarker(Register* tqparent, const TQString& name);
+ const TQString& sortPayee(void) const { return m_txt; }
};
class CategoryGroupMarker : public GroupMarker
{
public:
- CategoryGroupMarker(Register* parent, const QString& category);
- const QString& sortCategory(void) const { return m_txt; }
- const QString& sortSecurity(void) const { return m_txt; }
+ CategoryGroupMarker(Register* tqparent, const TQString& category);
+ const TQString& sortCategory(void) const { return m_txt; }
+ const TQString& sortSecurity(void) const { return m_txt; }
virtual const char* className(void) { return "CategoryGroupMarker"; }
};
@@ -220,14 +220,14 @@ public:
class ReconcileGroupMarker : public GroupMarker
{
public:
- ReconcileGroupMarker(Register* parent, MyMoneySplit::reconcileFlagE state);
+ ReconcileGroupMarker(Register* tqparent, MyMoneySplit::reconcileFlagE state);
virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return m_state; }
private:
MyMoneySplit::reconcileFlagE m_state;
};
-class ItemPtrVector : public QValueVector<RegisterItem *>
+class ItemPtrVector : public TQValueVector<RegisterItem *>
{
public:
ItemPtrVector() {}
@@ -245,16 +245,17 @@ protected:
class Register : public TransactionEditorContainer
{
Q_OBJECT
+ TQ_OBJECT
- // friend class QHeader;
- // friend class QTableHeader;
+ // friend class TQHeader;
+ // friend class TQTableHeader;
// friend class RegisterItem;
friend class Transaction;
friend class StdTransaction;
friend class InvestTransaction;
public:
- Register(QWidget *parent = 0, const char *name = 0);
+ Register(TQWidget *tqparent = 0, const char *name = 0);
virtual ~Register();
/**
@@ -276,39 +277,39 @@ public:
* This method returns a list of pointers to all selected items
* in the register
*
- * @retval QValueList<RegisterItem*>
+ * @retval TQValueList<RegisterItem*>
*/
- QValueList<RegisterItem*> selectedItems(void) const;
+ TQValueList<RegisterItem*> selectedItems(void) const;
/**
* Construct a list of all currently selected transactions in the register.
* If the current item carrying the focus (see focusItem() ) is selected
* it will be the first one contained in the list.
*
- * @param list reference to QValueList receiving the SelectedTransaction()'s
+ * @param list reference to TQValueList receiving the SelectedTransaction()'s
*/
void selectedTransactions(SelectedTransactions& list) const;
- QString text(int row, int col) const;
- QWidget* createEditor(int row, int col, bool initFromCell) const;
+ TQString text(int row, int col) const;
+ TQWidget* createEditor(int row, int col, bool initFromCell) const;
void setCellContentFromEditor(int row, int col);
- QWidget* cellWidget(int row, int col) const;
- void endEdit(int row, int col, bool accept, bool replace);
- void paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ TQWidget* cellWidget(int row, int col) const;
+ void endEdit(int row, int col, bool accept, bool tqreplace);
+ void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
void resizeData(int) {}
- QTableItem* item(int, int) { return 0; }
- void setItem(int, int, QTableItem*) {}
+ TQTableItem* item(int, int) { return 0; }
+ void setItem(int, int, TQTableItem*) {}
void clearCell(int, int) {}
void clearCellWidget(int, int);
/**
- * Override the QTable member function to avoid display of focus
+ * Override the TQTable member function to avoid display of focus
*/
- void paintFocus(QPainter*, const QRect& ) {}
+ void paintFocus(TQPainter*, const TQRect& ) {}
/**
- * Override the QTable member function to avoid functionality
+ * Override the TQTable member function to avoid functionality
*/
void updateCell(int /* row */, int /* col */) {}
@@ -374,10 +375,10 @@ public:
* Show the columns contained in @a cols for @a account. @a account
* can be left empty ( MyMoneyAccount() ) e.g. for the search dialog.
*/
- void setupRegister(const MyMoneyAccount& account, const QValueList<Column>& cols);
+ void setupRegister(const MyMoneyAccount& account, const TQValueList<Column>& cols);
- void setSortOrder(const QString& order);
- const QValueList<TransactionSortField>& sortOrder(void) const { return m_sortOrder; }
+ void setSortOrder(const TQString& order);
+ const TQValueList<TransactionSortField>& sortOrder(void) const { return m_sortOrder; }
TransactionSortField primarySortKey(void) const;
void sortItems(void);
@@ -403,9 +404,9 @@ public:
void ensureItemVisible(RegisterItem* item);
- void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, Transaction* t);
- void removeEditWidgets(QMap<QString, QWidget*>& editWidgets);
- void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const;
+ void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, Transaction* t);
+ void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const;
int rowHeightHint(void) const;
@@ -417,18 +418,18 @@ public:
* This method creates a specifc transaction according to the
* transaction passed in @a transaction.
*
- * @param parent pointer to register where the created object should be added
+ * @param tqparent pointer to register where the created object should be added
* @param transaction the transaction which should be used to create the object
* @param split the split of the transaction which should be used to create the object
* @param uniqueId an int that will be used to construct the id of the item
*
* @return pointer to created object (0 upon failure)
*/
- static Transaction* transactionFactory(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ static Transaction* transactionFactory(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
const MyMoneyAccount& account(void) const { return m_account; }
- void repaintItems(RegisterItem* first = 0, RegisterItem* last = 0);
+ void tqrepaintItems(RegisterItem* first = 0, RegisterItem* last = 0);
unsigned int drawCounter(void) const { return m_drawCounter; }
@@ -447,25 +448,25 @@ public:
void setLedgerLensForced(bool forced=true) { m_ledgerLensForced = forced; }
/**
- * Sets the selection mode to @a mode. Supported modes are QTable::Single and
- * QTable::Multi. QTable::Multi is the default when the object is created.
+ * Sets the selection mode to @a mode. Supported modes are TQTable::Single and
+ * TQTable::Multi. TQTable::Multi is the default when the object is created.
*/
void setSelectionMode(SelectionMode mode) { m_selectionMode = mode; }
protected:
- void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
- void contentsMouseReleaseEvent( QMouseEvent *e );
+ void contentsMouseReleaseEvent( TQMouseEvent *e );
void unselectItems(int from = -1, int to = -1) { doSelectItems(from, to, false); }
void selectItems(int from, int to) { doSelectItems(from, to, true); }
void doSelectItems(int from, int to, bool selected);
int selectedItemsCount(void) const;
- void focusOutEvent(QFocusEvent*);
- void focusInEvent(QFocusEvent*);
- void keyPressEvent(QKeyEvent*);
+ void focusOutEvent(TQFocusEvent*);
+ void focusInEvent(TQFocusEvent*);
+ void keyPressEvent(TQKeyEvent*);
int rowToIndex(int row) const;
void setupItemIndex(int rowCount);
@@ -475,9 +476,9 @@ protected:
* further down or up in the ledger from the previous focus item.
* The height to scroll is determined by visibleHeight()
*
- * @param key Qt::Page_Up or Qt::Page_Down depending on the direction to scroll
- * @param state state of Qt::ShiftButton, Qt::ControlButton, Qt::AltButton and
- * Qt::MetaButton.
+ * @param key TQt::Page_Up or TQt::Page_Down depending on the direction to scroll
+ * @param state state of TQt::ShiftButton, TQt::ControlButton, TQt::AltButton and
+ * TQt::MetaButton.
*/
void scrollPage(int key, ButtonState state);
@@ -489,32 +490,32 @@ protected:
* @param id id of the item to be searched
* @return pointer to RegisterItem or 0 if not found
*/
- RegisterItem* itemById(const QString& id) const;
+ RegisterItem* itemById(const TQString& id) const;
- void insertWidget(int row, int col, QWidget* w);
+ void insertWidget(int row, int col, TQWidget* w);
/**
- * Override logic and use standard QFrame behaviour
+ * Override logic and use standard TQFrame behaviour
*/
bool focusNextPrevChild(bool next);
- bool eventFilter(QObject* o, QEvent* e);
+ bool eventFilter(TQObject* o, TQEvent* e);
void handleItemChange(RegisterItem* old, bool shift, bool control);
void selectRange(RegisterItem* from, RegisterItem* to, bool invert, bool includeFirst, bool clearSel);
// DND
- void dragMoveEvent(QDragMoveEvent* event);
- void dropEvent(QDropEvent* event);
- Transaction* dropTransaction(QPoint cPos) const;
+ void dragMoveEvent(TQDragMoveEvent* event);
+ void dropEvent(TQDropEvent* event);
+ Transaction* dropTransaction(TQPoint cPos) const;
protected slots:
void resize(void);
- void selectItem(int row, int col, int button, const QPoint & mousePos );
+ void selectItem(int row, int col, int button, const TQPoint & mousePos );
void slotEnsureItemVisible(void);
- void slotDoubleClicked(int, int, int, const QPoint&);
+ void slotDoubleClicked(int, int, int, const TQPoint&);
void slotToggleErronousTransactions(void);
void slotAutoColumnSizing(int section);
@@ -569,7 +570,7 @@ signals:
protected:
ItemPtrVector m_items;
- QValueVector<RegisterItem*> m_itemIndex;
+ TQValueVector<RegisterItem*> m_itemIndex;
RegisterItem* m_selectAnchor;
RegisterItem* m_focusItem;
RegisterItem* m_ensureVisibleItem;
@@ -590,12 +591,12 @@ private:
bool m_listsDirty;
bool m_ignoreNextButtonRelease;
bool m_needInitialColumnResize;
- Qt::ButtonState m_buttonState;
+ TQt::ButtonState m_buttonState;
Column m_lastCol;
- QValueList<TransactionSortField> m_sortOrder;
- QMap<QPair<int, int>, QWidget*> m_cellWidgets;
+ TQValueList<TransactionSortField> m_sortOrder;
+ TQMap<TQPair<int, int>, TQWidget*> m_cellWidgets;
RegisterToolTip* m_tooltip;
- QRect m_lastRepaintRect;
+ TQRect m_lastRepaintRect;
unsigned int m_drawCounter;
};
diff --git a/kmymoney2/widgets/registeritem.cpp b/kmymoney2/widgets/registeritem.cpp
index 6ef082f..0a67fe2 100644
--- a/kmymoney2/widgets/registeritem.cpp
+++ b/kmymoney2/widgets/registeritem.cpp
@@ -31,7 +31,7 @@
using namespace KMyMoneyRegister;
-QDate RegisterItem::nullDate;
+TQDate RegisterItem::nullDate;
MyMoneyMoney RegisterItem::nullValue;
RegisterItem::RegisterItem() :
@@ -42,13 +42,13 @@ RegisterItem::RegisterItem() :
init();
}
-RegisterItem::RegisterItem(Register* parent) :
- m_parent(parent),
+RegisterItem::RegisterItem(Register* tqparent) :
+ m_parent(tqparent),
m_prev(0),
m_next(0)
{
init();
- parent->addItem(this);
+ tqparent->addItem(this);
}
void RegisterItem::init(void)
@@ -64,9 +64,9 @@ RegisterItem::~RegisterItem()
m_parent->removeItem(this);
}
-void RegisterItem::setParent(Register* parent)
+void RegisterItem::setParent(Register* tqparent)
{
- m_parent = parent;
+ m_parent = tqparent;
}
void RegisterItem::setNumRowsRegister(int rows)
@@ -111,6 +111,6 @@ int RegisterItem::rowHeightHint(void) const
return m_parent->rowHeightHint();
}
- QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
+ TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() );
return fm.lineSpacing()+6;
}
diff --git a/kmymoney2/widgets/registeritem.h b/kmymoney2/widgets/registeritem.h
index 84afa84..b75de1b 100644
--- a/kmymoney2/widgets/registeritem.h
+++ b/kmymoney2/widgets/registeritem.h
@@ -21,9 +21,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpainter.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpainter.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,7 +46,7 @@ typedef enum {
typedef enum {
ActionNone = -1,
ActionCheck = 0,
- /* these should be values which qt 3.3 never uses for QTab:
+ /* these should be values which qt 3.3 never uses for TQTab:
* qt starts upwards from 0
*/
ActionDeposit = 12201,
@@ -67,7 +67,7 @@ class RegisterItem
{
public:
RegisterItem();
- RegisterItem(Register* parent);
+ RegisterItem(Register* tqparent);
virtual ~RegisterItem();
virtual const char* className(void) = 0;
@@ -85,17 +85,17 @@ public:
virtual bool isErronous(void) const = 0;
// helper functions used for sorting
- virtual const QDate& sortPostDate(void) const { return nullDate; }
+ virtual const TQDate& sortPostDate(void) const { return nullDate; }
virtual int sortSamePostDate(void) const = 0;
- virtual const QDate& sortEntryDate(void) const { return nullDate; }
- virtual const QString& sortPayee(void) const { return QString::null; }
+ virtual const TQDate& sortEntryDate(void) const { return nullDate; }
+ virtual const TQString& sortPayee(void) const { return TQString(); }
virtual const MyMoneyMoney& sortValue(void) const { return nullValue; }
- virtual const QString& sortNumber(void) const { return QString::null; }
- virtual const QString& sortEntryOrder(void) const { return QString::null; }
+ virtual const TQString& sortNumber(void) const { return TQString(); }
+ virtual const TQString& sortEntryOrder(void) const { return TQString(); }
virtual CashFlowDirection sortType(void) const { return Deposit; }
- virtual const QString& sortCategory(void) const { return QString::null; }
+ virtual const TQString& sortCategory(void) const { return TQString(); }
virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return MyMoneySplit::MaxReconcileState; }
- virtual const QString& sortSecurity(void) const { return QString::null; }
+ virtual const TQString& sortSecurity(void) const { return TQString(); }
/**
* This method sets the row offset of the item in the register
@@ -103,7 +103,7 @@ public:
*
* @param row row offset
*
- * @note The row offset is based on QTable rows, not register
+ * @note The row offset is based on TQTable rows, not register
* items.
*/
virtual void setStartRow(int row) { m_startRow = row; }
@@ -144,24 +144,24 @@ public:
*/
virtual void setAlternate(bool alternate) { m_alternate = alternate; }
- virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg) = 0;
- virtual void paintFormCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg) = 0;
+ virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg) = 0;
+ virtual void paintFormCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg) = 0;
- virtual const QString& id(void) const { return MyMoneyObject::emptyId(); }
+ virtual const TQString& id(void) const { return MyMoneyObject::emptyId(); }
/**
- * Sets the parent of this item to be the register @p parent
+ * Sets the tqparent of this item to be the register @p tqparent
*
- * @param parent pointer to register
+ * @param tqparent pointer to register
*/
- void setParent(Register* parent);
+ void setParent(Register* tqparent);
/**
- * This member returns a pointer to the parent object
+ * This member returns a pointer to the tqparent object
*
* @retval pointer to Register
*/
- Register* parent(void) const { return m_parent; }
+ Register* tqparent(void) const { return m_parent; }
void setNeedResize(void) { m_needResize = true; }
@@ -185,7 +185,7 @@ public:
RegisterItem* nextItem(void) const { return m_next; }
RegisterItem* prevItem(void) const { return m_prev; }
- virtual bool matches(const QString&) const = 0;
+ virtual bool matches(const TQString&) const = 0;
/**
* Checks if the mouse hovered over an area that has a tooltip associated with it.
@@ -194,11 +194,11 @@ public:
*
* If a tooltip shall be shown, this method presets the rectangle @a r with the
* area in register coordinates and @a msg with the string that will be passed
- * to QToolTip::tip. @a true is returned in this case.
+ * to TQToolTip::tip. @a true is returned in this case.
*
* If no tooltip is available, @a false will be returned.
*/
- virtual bool maybeTip(const QPoint& /* relpos */, int /* row */, int /* col */, QRect& /* r */, QString& /* msg */) { return false; }
+ virtual bool maybeTip(const TQPoint& /* relpos */, int /* row */, int /* col */, TQRect& /* r */, TQString& /* msg */) { return false; }
protected:
/// This method serves as helper for all constructors
@@ -216,7 +216,7 @@ protected:
bool m_visible;
private:
- static QDate nullDate;
+ static TQDate nullDate;
static MyMoneyMoney nullValue;
};
diff --git a/kmymoney2/widgets/registersearchline.cpp b/kmymoney2/widgets/registersearchline.cpp
index f0ef6e9..6acace3 100644
--- a/kmymoney2/widgets/registersearchline.cpp
+++ b/kmymoney2/widgets/registersearchline.cpp
@@ -17,10 +17,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -47,21 +47,21 @@ public:
status(0) {}
Register* reg;
- QComboBox* combo;
- QString search;
+ TQComboBox* combo;
+ TQString search;
int queuedSearches;
int status;
};
-RegisterSearchLine::RegisterSearchLine(QWidget* parent, Register* reg, const char* name) :
- KLineEdit(parent, name),
+RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, Register* reg, const char* name) :
+ KLineEdit(tqparent, name),
d(new RegisterSearchLinePrivate)
{
init(reg);
}
-RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) :
- KLineEdit(parent, name),
+RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, const char* name) :
+ KLineEdit(tqparent, name),
d(new RegisterSearchLinePrivate)
{
init(0);
@@ -70,10 +70,10 @@ RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) :
void RegisterSearchLine::init(Register *reg)
{
d->reg = reg;
- connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(queueSearch(const QString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(queueSearch(const TQString&)));
- QLabel* label = new QLabel(i18n("label for status combo", "Stat&us"), parentWidget());
- d->combo = new QComboBox(parentWidget());
+ TQLabel* label = new TQLabel(i18n("label for status combo", "Stat&us"), tqparentWidget());
+ d->combo = new TQComboBox(tqparentWidget());
// don't change the order of the following lines unless updating
// the case labels in RegisterSearchLine::itemMatches() at the same time
d->combo->insertItem(SmallIcon("run"), i18n("Any status"));
@@ -84,13 +84,13 @@ void RegisterSearchLine::init(Register *reg)
d->combo->insertItem(i18n("Not reconciled"));
d->combo->insertItem(i18n("Cleared"));
d->combo->setCurrentItem(0);
- connect(d->combo, SIGNAL(activated(int)), this, SLOT(slotStatusChanged(int)));
+ connect(d->combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStatusChanged(int)));
label->setBuddy(d->combo);
if(reg) {
- connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
} else {
setEnabled(false);
}
@@ -104,15 +104,15 @@ RegisterSearchLine::~RegisterSearchLine()
void RegisterSearchLine::setRegister(Register* reg)
{
if(d->reg) {
- disconnect(d->reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- disconnect(d->reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ disconnect(d->reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ disconnect(d->reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
}
d->reg = reg;
if(reg) {
- connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
}
setEnabled(reg != 0);
@@ -124,11 +124,11 @@ void RegisterSearchLine::slotStatusChanged(int status)
updateSearch();
}
-void RegisterSearchLine::queueSearch(const QString& search)
+void RegisterSearchLine::queueSearch(const TQString& search)
{
d->queuedSearches++;
d->search = search;
- QTimer::singleShot(200, this, SLOT(activateSearch()));
+ TQTimer::singleShot(200, this, TQT_SLOT(activateSearch()));
}
void RegisterSearchLine::activateSearch(void)
@@ -138,7 +138,7 @@ void RegisterSearchLine::activateSearch(void)
updateSearch(d->search);
}
-void RegisterSearchLine::updateSearch(const QString& s)
+void RegisterSearchLine::updateSearch(const TQString& s)
{
if(!d->reg)
return;
@@ -167,7 +167,7 @@ void RegisterSearchLine::updateSearch(const QString& s)
d->reg->updateContents();
d->reg->ensureItemVisible(focusItem);
} else
- d->reg->repaintContents();
+ d->reg->tqrepaintContents();
d->reg->updateScrollBars();
@@ -177,7 +177,7 @@ void RegisterSearchLine::updateSearch(const QString& s)
}
}
-bool RegisterSearchLine::itemMatches(const RegisterItem* item, const QString& s) const
+bool RegisterSearchLine::itemMatches(const RegisterItem* item, const TQString& s) const
{
const Transaction* t = dynamic_cast<const Transaction*>(item);
if(t && !t->transaction().id().isEmpty()) {
@@ -247,17 +247,17 @@ class RegisterSearchLineWidget::RegisterSearchLineWidgetPrivate
Register* reg;
RegisterSearchLine* searchLine;
- QToolButton* clearButton;
+ TQToolButton* clearButton;
};
-RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, QWidget* parent, const char* name) :
- QHBox(parent, name),
+RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, TQWidget* tqparent, const char* name) :
+ TQHBox(tqparent, name),
d(new RegisterSearchLineWidgetPrivate)
{
d->reg = reg;
setSpacing(5);
- QTimer::singleShot(0, this, SLOT(createWidgets()));
+ TQTimer::singleShot(0, this, TQT_SLOT(createWidgets()));
}
RegisterSearchLineWidget::~RegisterSearchLineWidget()
@@ -275,14 +275,14 @@ RegisterSearchLine* RegisterSearchLineWidget::createSearchLine(Register* reg)
void RegisterSearchLineWidget::createWidgets(void)
{
if(!d->clearButton) {
- d->clearButton = new QToolButton(this);
- QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
+ d->clearButton = new TQToolButton(this);
+ TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
d->clearButton->setIconSet(icon);
}
d->clearButton->show();
- QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget");
d->searchLine = createSearchLine(d->reg);
d->searchLine->show();
@@ -290,7 +290,7 @@ void RegisterSearchLineWidget::createWidgets(void)
label->setBuddy(d->searchLine);
label->show();
- connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(reset()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(reset()));
}
RegisterSearchLine* RegisterSearchLineWidget::searchLine(void) const
diff --git a/kmymoney2/widgets/registersearchline.h b/kmymoney2/widgets/registersearchline.h
index d495ab1..e9fcb39 100644
--- a/kmymoney2/widgets/registersearchline.h
+++ b/kmymoney2/widgets/registersearchline.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qhbox.h>
+#include <tqhbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,6 +46,7 @@ namespace KMyMoneyRegister {
class KMYMONEY_EXPORT RegisterSearchLine : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a RegisterSearchLine with @a reg being the register to be
@@ -54,14 +55,14 @@ public:
* If @a reg is null then the widget will be disabled until a register
* is set with setRegister().
*/
- RegisterSearchLine(QWidget* parent = 0, Register* reg = 0, const char* name = 0);
+ RegisterSearchLine(TQWidget* tqparent = 0, Register* reg = 0, const char* name = 0);
/**
* Constructs a RegisterSearchLine
*
* The widget will be disabled until a register is set with setRegister().
*/
- RegisterSearchLine(QWidget* parent = 0, const char* name = 0);
+ RegisterSearchLine(TQWidget* tqparent = 0, const char* name = 0);
/**
* Destroys the object
@@ -77,14 +78,14 @@ public:
void setRegister(Register* reg);
protected:
- virtual bool itemMatches(const RegisterItem* item, const QString& s) const;
+ virtual bool itemMatches(const RegisterItem* item, const TQString& s) const;
public slots:
- virtual void updateSearch(const QString& s = QString::null);
+ virtual void updateSearch(const TQString& s = TQString());
virtual void reset(void);
protected slots:
- void queueSearch(const QString& search);
+ void queueSearch(const TQString& search);
void activateSearch(void);
void slotStatusChanged(int);
@@ -106,15 +107,16 @@ private:
*
* @author Thomas Baumgart
*/
-class KMYMONEY_EXPORT RegisterSearchLineWidget : public QHBox
+class KMYMONEY_EXPORT RegisterSearchLineWidget : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * Creates a RegisterSearchLineWidget for @a reg with @a parent as the
- * parent and with @a name.
+ * Creates a RegisterSearchLineWidget for @a reg with @a tqparent as the
+ * tqparent and with @a name.
*/
- RegisterSearchLineWidget(Register* reg = 0, QWidget* parent = 0, const char* name = 0);
+ RegisterSearchLineWidget(Register* reg = 0, TQWidget* tqparent = 0, const char* name = 0);
/**
* Destroys the object
diff --git a/kmymoney2/widgets/scheduledtransaction.cpp b/kmymoney2/widgets/scheduledtransaction.cpp
index 98d6787..5842247 100644
--- a/kmymoney2/widgets/scheduledtransaction.cpp
+++ b/kmymoney2/widgets/scheduledtransaction.cpp
@@ -33,18 +33,18 @@
using namespace KMyMoneyRegister;
using namespace KMyMoneyTransactionForm;
-StdTransactionScheduled::StdTransactionScheduled(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- StdTransaction(parent, transaction, split, uniqueId),
- m_drawCounter(parent->drawCounter()-1)
+StdTransactionScheduled::StdTransactionScheduled(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ StdTransaction(tqparent, transaction, split, uniqueId),
+ m_drawCounter(tqparent->drawCounter()-1)
{
// setup initial size
setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed()));
}
-bool StdTransactionScheduled::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush)
+bool StdTransactionScheduled::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
- QRect r(cellRect);
- cg = m_parent->palette().disabled();
+ TQRect r(cellRect);
+ cg = m_parent->tqpalette().disabled();
bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush);
return rc;
diff --git a/kmymoney2/widgets/scheduledtransaction.h b/kmymoney2/widgets/scheduledtransaction.h
index 836ceee..a1530ec 100644
--- a/kmymoney2/widgets/scheduledtransaction.h
+++ b/kmymoney2/widgets/scheduledtransaction.h
@@ -38,7 +38,7 @@ namespace KMyMoneyRegister {
class StdTransactionScheduled : public StdTransaction
{
public:
- StdTransactionScheduled(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ StdTransactionScheduled(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~StdTransactionScheduled() {}
virtual const char* className(void) { return "StdTransactionScheduled"; }
@@ -55,15 +55,15 @@ public:
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
- * @param brush ref to QBrush object receiveing the brush information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
+ * @param brush ref to TQBrush object receiveing the brush information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
bool isSelectable(void) const { return true; }
bool canHaveFocus(void) const { return true; }
@@ -71,9 +71,9 @@ public:
virtual int sortSamePostDate(void) const { return 4; }
-// virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
+// virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const;
-// void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+// void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
private:
unsigned int m_drawCounter;
diff --git a/kmymoney2/widgets/selectedtransaction.cpp b/kmymoney2/widgets/selectedtransaction.cpp
index 055dc3d..102477b 100644
--- a/kmymoney2/widgets/selectedtransaction.cpp
+++ b/kmymoney2/widgets/selectedtransaction.cpp
@@ -26,7 +26,7 @@ namespace KMyMoneyRegister {
int SelectedTransaction::warnLevel() const
{
int warnLevel = 0;
- QValueList<MyMoneySplit>::const_iterator it_s;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = transaction().splits().begin(); warnLevel < 2 && it_s != transaction().splits().end(); ++it_s) {
const MyMoneyAccount& acc = MyMoneyFile::instance()->account((*it_s).accountId());
if(acc.isClosed())
diff --git a/kmymoney2/widgets/selectedtransaction.h b/kmymoney2/widgets/selectedtransaction.h
index 0b82020..172824f 100644
--- a/kmymoney2/widgets/selectedtransaction.h
+++ b/kmymoney2/widgets/selectedtransaction.h
@@ -37,7 +37,7 @@ class SelectedTransaction
{
public:
SelectedTransaction() {}
- SelectedTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s, const QString& scheduleId = QString()) :
+ SelectedTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s, const TQString& scheduleId = TQString()) :
m_transaction(t), m_split(s), m_scheduleId(scheduleId) {}
MyMoneyTransaction& transaction(void) { return m_transaction; }
@@ -46,7 +46,7 @@ public:
const MyMoneySplit& split(void) const { return m_split; }
bool isScheduled(void) const { return !m_scheduleId.isEmpty(); }
- const QString& scheduleId(void) const { return m_scheduleId; }
+ const TQString& scheduleId(void) const { return m_scheduleId; }
/**
* checks the transaction for specific reasons which would
@@ -61,12 +61,12 @@ public:
private:
MyMoneyTransaction m_transaction;
MyMoneySplit m_split;
- QString m_scheduleId;
+ TQString m_scheduleId;
};
class Register;
-class SelectedTransactions:public QValueList<SelectedTransaction>
+class SelectedTransactions:public TQValueList<SelectedTransaction>
{
public:
SelectedTransactions() {}
diff --git a/kmymoney2/widgets/sortoptionlistitem.h b/kmymoney2/widgets/sortoptionlistitem.h
index 8f2cdb0..84504c0 100644
--- a/kmymoney2/widgets/sortoptionlistitem.h
+++ b/kmymoney2/widgets/sortoptionlistitem.h
@@ -349,7 +349,7 @@ static const char * sortDescendingXpm[] = {
class SortOptionListItem : public KListViewItem
{
public:
- SortOptionListItem(QListView* parent, QListViewItem* after, const QString& txt, int direction);
+ SortOptionListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, int direction);
int direction(void) const;
public slots:
@@ -362,8 +362,8 @@ private:
int m_direction;
};
-SortOptionListItem::SortOptionListItem(QListView* parent, QListViewItem* after, const QString& txt, int direction) :
- KListViewItem(parent, after, txt)
+SortOptionListItem::SortOptionListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, int direction) :
+ KListViewItem(tqparent, after, txt)
{
m_direction = (direction >= 0) ? 1 : -1;
setPixmap();
@@ -372,9 +372,9 @@ SortOptionListItem::SortOptionListItem(QListView* parent, QListViewItem* after,
void SortOptionListItem::setPixmap(void)
{
if(m_direction > 0)
- KListViewItem::setPixmap(0, QPixmap(&sortAscendingXpm[0]));
+ KListViewItem::setPixmap(0, TQPixmap(&sortAscendingXpm[0]));
else
- KListViewItem::setPixmap(0, QPixmap(&sortDescendingXpm[0]));
+ KListViewItem::setPixmap(0, TQPixmap(&sortDescendingXpm[0]));
}
void SortOptionListItem::toggleDirection(void)
diff --git a/kmymoney2/widgets/stdtransactiondownloaded.cpp b/kmymoney2/widgets/stdtransactiondownloaded.cpp
index 1305252..503ab15 100644
--- a/kmymoney2/widgets/stdtransactiondownloaded.cpp
+++ b/kmymoney2/widgets/stdtransactiondownloaded.cpp
@@ -34,36 +34,36 @@
using namespace KMyMoneyRegister;
using namespace KMyMoneyTransactionForm;
-StdTransactionDownloaded::StdTransactionDownloaded(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- StdTransaction(parent, transaction, split, uniqueId)
+StdTransactionDownloaded::StdTransactionDownloaded(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ StdTransaction(tqparent, transaction, split, uniqueId)
{
}
-bool StdTransactionDownloaded::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush)
+bool StdTransactionDownloaded::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush);
// if not selected paint in selected background color
if(!isSelected()) {
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor());
- brush = QBrush(cg.base());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor());
+ brush = TQBrush(cg.base());
}
return rc;
}
-InvestTransactionDownloaded::InvestTransactionDownloaded(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- InvestTransaction(parent, transaction, split, uniqueId)
+InvestTransactionDownloaded::InvestTransactionDownloaded(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ InvestTransaction(tqparent, transaction, split, uniqueId)
{
}
-bool InvestTransactionDownloaded::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush)
+bool InvestTransactionDownloaded::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush);
// if not selected paint in selected background color
if(!isSelected()) {
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor());
- brush = QBrush(cg.base());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor());
+ brush = TQBrush(cg.base());
}
return rc;
}
diff --git a/kmymoney2/widgets/stdtransactiondownloaded.h b/kmymoney2/widgets/stdtransactiondownloaded.h
index 705fb04..0320882 100644
--- a/kmymoney2/widgets/stdtransactiondownloaded.h
+++ b/kmymoney2/widgets/stdtransactiondownloaded.h
@@ -38,7 +38,7 @@ namespace KMyMoneyRegister {
class StdTransactionDownloaded : public StdTransaction
{
public:
- StdTransactionDownloaded(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ StdTransactionDownloaded(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~StdTransactionDownloaded() {}
virtual const char* className(void) { return "StdTransactionDownloaded"; }
@@ -55,28 +55,28 @@ public:
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
- * @param brush ref to QBrush object receiveing the brush information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
+ * @param brush ref to TQBrush object receiveing the brush information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
#if 0
- virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
int numRowsRegister(bool expanded) const;
#endif
@@ -90,7 +90,7 @@ public:
class InvestTransactionDownloaded : public InvestTransaction
{
public:
- InvestTransactionDownloaded(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ InvestTransactionDownloaded(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~InvestTransactionDownloaded() {}
virtual const char* className(void) { return "InvestTransactionDownloaded"; }
@@ -107,15 +107,15 @@ class InvestTransactionDownloaded : public InvestTransaction
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
- * @param brush ref to QBrush object receiveing the brush information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
+ * @param brush ref to TQBrush object receiveing the brush information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
/**
* Provided for internal reasons. No API change. See RegisterItem::numRowsRegister()
*/
diff --git a/kmymoney2/widgets/stdtransactionmatched.cpp b/kmymoney2/widgets/stdtransactionmatched.cpp
index 9bc191b..b24ed88 100644
--- a/kmymoney2/widgets/stdtransactionmatched.cpp
+++ b/kmymoney2/widgets/stdtransactionmatched.cpp
@@ -18,7 +18,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qregion.h>
+#include <tqregion.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,24 +36,24 @@
using namespace KMyMoneyRegister;
using namespace KMyMoneyTransactionForm;
-StdTransactionMatched::StdTransactionMatched(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- StdTransaction(parent, transaction, split, uniqueId),
- m_drawCounter(parent->drawCounter()-1)
+StdTransactionMatched::StdTransactionMatched(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ StdTransaction(tqparent, transaction, split, uniqueId),
+ m_drawCounter(tqparent->drawCounter()-1)
{
// setup initial size
setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed()));
}
-bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush)
+bool StdTransactionMatched::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
- QRect r(cellRect);
+ TQRect r(cellRect);
bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush);
// if not selected paint in matched background color
if(!isSelected()) {
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor());
- brush = QBrush(cg.base());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor());
+ brush = TQBrush(cg.base());
}
// the first line needs to be painted across all columns
@@ -85,7 +85,7 @@ bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row,
return rc;
}
-void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, int col, QPainter* painter)
+void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter)
{
// run through the standard
StdTransaction::registerCellText(txt, align, row, col, painter);
@@ -100,7 +100,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row,
// and we draw this information in italics
if(painter) {
- QFont font = painter->font();
+ TQFont font = painter->font();
font.setItalic(true);
painter->setFont(font);
}
@@ -113,8 +113,8 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row,
delete e;
}
- QValueList<MyMoneySplit>::const_iterator it_s;
- const QValueList<MyMoneySplit>& list = matchedTransaction.splits();
+ TQValueList<MyMoneySplit>::const_iterator it_s;
+ const TQValueList<MyMoneySplit>& list = matchedTransaction.splits();
MyMoneyMoney importedValue;
for(it_s = list.begin(); it_s != list.end(); ++it_s) {
if((*it_s).accountId() == m_account.id()) {
@@ -122,36 +122,36 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row,
}
}
- QDate postDate;
- QString memo;
+ TQDate postDate;
+ TQString memo;
switch(row) {
case 0:
if(painter)
- txt = QString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)");
+ txt = TQString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)");
// return true for the first visible column only
break;
case 1:
switch(col) {
case DateColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Bank entry:");
break;
case DetailColumn:
- align |= Qt::AlignLeft;
- txt = QString("%1 %2").arg(matchedTransaction.postDate().toString(Qt::ISODate)).arg(matchedTransaction.memo());
+ align |= TQt::AlignLeft;
+ txt = TQString("%1 %2").tqarg(matchedTransaction.postDate().toString(Qt::ISODate)).tqarg(matchedTransaction.memo());
break;
case PaymentColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(importedValue.isNegative()) {
txt = (-importedValue).formatMoney(m_account.fraction());
}
break;
case DepositColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(!importedValue.isNegative()) {
txt = importedValue.formatMoney(m_account.fraction());
}
@@ -162,37 +162,37 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row,
case 2:
switch(col) {
case DateColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Your entry:");
break;
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
postDate = m_transaction.postDate();
if(!m_split.value("kmm-orig-postdate").isEmpty()) {
- postDate = QDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate);
+ postDate = TQDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate);
}
memo = m_split.memo();
if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) {
- int pos = memo.findRev(matchedSplit.memo());
+ int pos = memo.tqfindRev(matchedSplit.memo());
if(pos != -1) {
memo = memo.left(pos);
if(memo.endsWith("\n"))
memo = memo.left(pos-1);
}
}
- txt = QString("%1 %2").arg(postDate.toString(Qt::ISODate)).arg(memo);
+ txt = TQString("%1 %2").tqarg(postDate.toString(Qt::ISODate)).tqarg(memo);
break;
case PaymentColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_split.value().isNegative()) {
txt = (-m_split.value(m_transaction.commodity(), m_splitCurrencyId)).formatMoney(m_account.fraction());
}
break;
case DepositColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(!m_split.value().isNegative()) {
txt = m_split.value(m_transaction.commodity(), m_splitCurrencyId).formatMoney(m_account.fraction());
}
@@ -204,7 +204,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row,
}
}
-void StdTransactionMatched::paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg) const
+void StdTransactionMatched::paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg) const
{
// the last 3 rows should not show a grid
if(row < m_rowsRegister - m_additionalRows) {
diff --git a/kmymoney2/widgets/stdtransactionmatched.h b/kmymoney2/widgets/stdtransactionmatched.h
index 599e6e0..e8959a9 100644
--- a/kmymoney2/widgets/stdtransactionmatched.h
+++ b/kmymoney2/widgets/stdtransactionmatched.h
@@ -20,7 +20,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qbrush.h>
+#include <tqbrush.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -41,7 +41,7 @@ class StdTransactionMatched : public StdTransaction
static const int m_additionalRows = 3;
public:
- StdTransactionMatched(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ StdTransactionMatched(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~StdTransactionMatched() {}
virtual const char* className(void) { return "StdTransactionMatched"; }
@@ -58,34 +58,34 @@ public:
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
- * @param brush ref to QBrush object receiveing the brush information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
+ * @param brush ref to TQBrush object receiveing the brush information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
- virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
+ virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const;
#if 0
- virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
int numRowsRegister(bool expanded) const;
#endif
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
/**
* Provided for internal reasons. No API change. See RegisterItem::numRowsRegister(bool)
diff --git a/kmymoney2/widgets/transaction.cpp b/kmymoney2/widgets/transaction.cpp
index 4c8a23b..b45abd2 100644
--- a/kmymoney2/widgets/transaction.cpp
+++ b/kmymoney2/widgets/transaction.cpp
@@ -18,9 +18,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qstring.h>
-#include <qpainter.h>
-#include <qwidgetlist.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqwidgetlist.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -135,8 +135,8 @@ static unsigned char attentionSign[] = {
0x42,0x60,0x82
};
-Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- RegisterItem(parent),
+Transaction::Transaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ RegisterItem(tqparent),
m_transaction(transaction),
m_split(split),
m_form(0),
@@ -160,7 +160,7 @@ Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction
if(!m_split.payeeId().isEmpty()) {
m_payee = file->payee(m_split.payeeId()).name();
}
- if(parent->account().isIncomeExpense()) {
+ if(tqparent->account().isIncomeExpense()) {
m_payeeHeader = m_split.shares().isNegative() ? i18n("From") : i18n("Pay to");
} else {
m_payeeHeader = m_split.shares().isNegative() ? i18n("Pay to") : i18n("From");
@@ -175,7 +175,7 @@ Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction
if(!m_uniqueId.isEmpty()) {
m_uniqueId += "-";
- QString id;
+ TQString id;
id.setNum(uniqueId);
m_uniqueId += id.rightJustify(3, '0');
}
@@ -199,16 +199,16 @@ void Transaction::setFocus(bool focus, bool updateLens)
}
}
-void Transaction::markAttachment(QPainter* painter, int /* row */, int /* col */, const QRect& r)
+void Transaction::markAttachment(TQPainter* painter, int /* row */, int /* col */, const TQRect& r)
{
- static QPixmap clip;
+ static TQPixmap clip;
const int m = 2; // margin
int h = m_parent->rowHeightHint() - (2*m);
int lx = r.topRight().x() - h;
if(isErronous())
lx -= h;
- QRect cr(QPoint(lx - m, m), QSize(h, h));
+ TQRect cr(TQPoint(lx - m, m), TQSize(h, h));
painter->save();
if(clip.isNull()) {
@@ -218,37 +218,37 @@ void Transaction::markAttachment(QPainter* painter, int /* row */, int /* col */
}
}
- painter->drawPixmap(QPoint(lx - m, m + (h - clip.height())/2 ), clip);
+ painter->drawPixmap(TQPoint(lx - m, m + (h - clip.height())/2 ), clip);
painter->restore();
}
-void Transaction::markAsErronous(QPainter* painter, int /* row */, int /* col */, const QRect& r)
+void Transaction::markAsErronous(TQPainter* painter, int /* row */, int /* col */, const TQRect& r)
{
const int m = 2; // margin
int h = m_parent->rowHeightHint() - (2*m);
- QRect cr(QPoint(r.topRight().x() - h - m, m), QSize(h, h));
+ TQRect cr(TQPoint(r.topRight().x() - h - m, m), TQSize(h, h));
painter->save();
- QPixmap attention;
+ TQPixmap attention;
attention.loadFromData(attentionSign, sizeof(attentionSign), 0, 0);
if(attention.height() > h) {
attention.resize(h, h);
}
- painter->drawPixmap(QPoint(r.topRight().x() - h - m, m + (h - attention.height())/2 ), attention);
+ painter->drawPixmap(TQPoint(r.topRight().x() - h - m, m + (h - attention.height())/2 ), attention);
painter->restore();
}
-bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush)
+bool Transaction::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
if(m_reducedIntensity)
- cg = m_parent->palette().disabled();
+ cg = m_parent->tqpalette().disabled();
if(m_alternate)
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor());
else
- cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
+ cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
cellRect.setX(0);
cellRect.setY(0);
@@ -260,10 +260,10 @@ bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col,
textRect.setWidth(textRect.width()-4);
if(m_selected) {
- brush = QBrush(cg.highlight());
+ brush = TQBrush(cg.highlight());
painter->setPen(cg.highlightedText());
} else {
- brush = QBrush(cg.base());
+ brush = TQBrush(cg.base());
painter->setPen(cg.text());
}
@@ -283,139 +283,139 @@ bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col,
return true;
}
-void Transaction::paintRegisterCellFocus(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg)
+void Transaction::paintRegisterCellFocus(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg)
{
if(m_focus) {
- QPen oldPen = painter->pen();
- QPen newPen = oldPen;
+ TQPen oldPen = painter->pen();
+ TQPen newPen = oldPen;
newPen.setWidth(0);
painter->setFont(KMyMoneyGlobalSettings::listCellFont());
painter->setPen(newPen);
painter->setPen(cg.foreground());
- painter->setPen(Qt::DotLine);
+ painter->setPen(TQt::DotLine);
// for the first Row, we need to paint the top
- QPoint start, end;
+ TQPoint start, end;
#if 0
if(row == 0) {
- start = QPoint(r.x(), r.y() + 1);
- end = QPoint(r.x() + r.width(), r.y() + 1);
+ start = TQPoint(r.x(), r.y() + 1);
+ end = TQPoint(r.x() + r.width(), r.y() + 1);
if(col == 0) {
start.rx()++;
} else if(col == m_parent->lastCol()) {
end.rx()--;
}
// painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the last Row, we need to paint the bottom
if(row == numRows() - 1) {
- start = QPoint(r.x(), r.y() + r.height() - 1);
- end = QPoint(r.x() + r.width(), r.y() + r.height() - 1);
+ start = TQPoint(r.x(), r.y() + r.height() - 1);
+ end = TQPoint(r.x() + r.width(), r.y() + r.height() - 1);
if(col == 0) {
start.rx()++;
} else if(col == m_parent->lastCol()) {
end.rx()--;
}
// painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the first col, we need to paint the left
if(col == 0) {
- start = QPoint(r.x() + 1, r.y());
- end = QPoint(r.x() + 1, r.y() + r.height());
+ start = TQPoint(r.x() + 1, r.y());
+ end = TQPoint(r.x() + 1, r.y() + r.height());
if(row == 0) {
start.ry()++;
} else if(row == numRows()-1) {
end.ry()--;
}
//painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the last col, we need to paint the left
if(col == m_parent->lastCol()) {
- start = QPoint(r.x() + r.width() - 1, r.y());
- end = QPoint(r.x() + r.width() - 1, r.y() + r.height());
+ start = TQPoint(r.x() + r.width() - 1, r.y());
+ end = TQPoint(r.x() + r.width() - 1, r.y() + r.height());
if(row == 0) {
start.ry()++;
} else if(row == numRows()-1) {
end.ry()--;
}
//painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
#endif
if(row == 0) {
- start = QPoint(r.x(), r.y());
- end = QPoint(r.x() + r.width(), r.y() + 1);
+ start = TQPoint(r.x(), r.y());
+ end = TQPoint(r.x() + r.width(), r.y() + 1);
if(col == 0) {
start.rx()++;
} else if(col == m_parent->lastCol()) {
end.rx()--;
}
// painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the last Row, we need to paint the bottom
if(row == numRowsRegister() - 1) {
- start = QPoint(r.x(), r.y() + r.height() - 2);
- end = QPoint(r.x() + r.width(), r.y() + r.height() - 2);
+ start = TQPoint(r.x(), r.y() + r.height() - 2);
+ end = TQPoint(r.x() + r.width(), r.y() + r.height() - 2);
if(col == 0) {
start.rx()++;
} else if(col == m_parent->lastCol()) {
end.rx()--;
}
// painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the first col, we need to paint the left
if(col == 0) {
- start = QPoint(r.x() + 1, r.y());
- end = QPoint(r.x() + 1, r.y() + r.height());
+ start = TQPoint(r.x() + 1, r.y());
+ end = TQPoint(r.x() + 1, r.y() + r.height());
if(row == 0) {
start.ry()++;
} else if(row == numRowsRegister()-1) {
end.ry()--;
}
//painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
// for the last col, we need to paint the left
if(col == m_parent->lastCol()) {
- start = QPoint(r.x() + r.width() - 1, r.y());
- end = QPoint(r.x() + r.width() - 1, r.y() + r.height());
+ start = TQPoint(r.x() + r.width() - 1, r.y());
+ end = TQPoint(r.x() + r.width() - 1, r.y() + r.height());
if(row == 0) {
start.ry()++;
} else if(row == numRowsRegister()-1) {
end.ry()--;
}
//painter->drawLine(start, end);
- painter->drawWinFocusRect(QRect(start, end));
+ painter->drawWinFocusRect(TQRect(start, end));
}
painter->setPen(oldPen);
}
}
-void Transaction::registerCellText(QString& txt, int row, int col)
+void Transaction::registerCellText(TQString& txt, int row, int col)
{
int align = 0;
registerCellText(txt, align, row, col, 0);
}
-void Transaction::paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool /* selected */, const QColorGroup& _cg)
+void Transaction::paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool /* selected */, const TQColorGroup& _cg)
{
- QColorGroup cg(_cg);
- QRect cellRect(r);
- QRect textRect;
- QBrush backgroundBrush;
+ TQColorGroup cg(_cg);
+ TQRect cellRect(r);
+ TQRect textRect;
+ TQBrush backgroundBrush;
painter->save();
if(paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, backgroundBrush)) {
// construct the text for the cell
- int align = Qt::AlignVCenter;
- QString txt;
+ int align = TQt::AlignVCenter;
+ TQString txt;
if(m_transaction != MyMoneyTransaction() && !m_inRegisterEdit) {
registerCellText(txt, align, row, col, painter);
}
@@ -438,11 +438,11 @@ void Transaction::paintRegisterCell(QPainter* painter, int row, int col, const Q
painter->restore();
}
-void Transaction::paintRegisterIcons(QPainter* painter, int row, int col, const QRect& /*r*/, const QColorGroup& /*cg*/)
+void Transaction::paintRegisterIcons(TQPainter* painter, int row, int col, const TQRect& /*r*/, const TQColorGroup& /*cg*/)
{
if(row == 0 && col == DetailColumn && painter) {
if(m_erronous || !m_transaction.value("kmm-attachment").isEmpty()) {
- QRect cellRect;
+ TQRect cellRect;
cellRect.setX(0);
cellRect.setY(0);
cellRect.setWidth(m_parent->columnWidth(col));
@@ -456,7 +456,7 @@ void Transaction::paintRegisterIcons(QPainter* painter, int row, int col, const
}
}
}
-void Transaction::paintRegisterCellBackground(QPainter* painter, int row, int col, const QRect& r, const QBrush& backgroundBrush)
+void Transaction::paintRegisterCellBackground(TQPainter* painter, int row, int col, const TQRect& r, const TQBrush& backgroundBrush)
{
Q_UNUSED(row);
Q_UNUSED(col);
@@ -465,7 +465,7 @@ void Transaction::paintRegisterCellBackground(QPainter* painter, int row, int co
painter->fillRect(r, backgroundBrush);
}
-void Transaction::paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg) const
+void Transaction::paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg) const
{
Q_UNUSED(_cg);
@@ -479,7 +479,7 @@ void Transaction::paintRegisterGrid(QPainter* painter, int row, int col, const Q
}
}
-void Transaction::paintRegisterCellText(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg, int align, const QString& txt)
+void Transaction::paintRegisterCellText(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg, int align, const TQString& txt)
{
Q_UNUSED(row);
Q_UNUSED(col);
@@ -508,7 +508,7 @@ int Transaction::formRowHeight(void) const
kMyMoneyDateInput dateInput;
KMyMoneyCategory category(0,0,true);
- return QMAX(dateInput.sizeHint().height(), category.sizeHint().height());
+ return TQMAX(dateInput.tqsizeHint().height(), category.tqsizeHint().height());
}
return m_formRowHeight;
}
@@ -537,14 +537,14 @@ void Transaction::setupForm(TransactionForm* form)
loadTab(form);
}
-void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect& /*r*/, bool /*selected*/, const QColorGroup& _cg)
+void Transaction::paintFormCell(TQPainter* painter, int row, int col, const TQRect& /*r*/, bool /*selected*/, const TQColorGroup& _cg)
{
if(!m_form)
return;
- QRect cellRect = m_form->cellRect(row, col);
+ TQRect cellRect = m_form->cellRect(row, col);
- QRect textRect(cellRect);
+ TQRect textRect(cellRect);
textRect.setX(1);
textRect.setY(1);
textRect.setWidth(textRect.width()-2);
@@ -553,8 +553,8 @@ void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect
painter->fillRect(cellRect, _cg.background());
painter->setPen(_cg.text());
- QString txt;
- int align = Qt::AlignVCenter;
+ TQString txt;
+ int align = TQt::AlignVCenter;
bool editField = formCellText(txt, align, row, col, painter);
// if we have an editable field and don't currently edit the transaction
@@ -572,9 +572,9 @@ void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect
}
-void Transaction::setupPalette(const QPalette& palette, QMap<QString, QWidget*>& editWidgets)
+void Transaction::setupPalette(const TQPalette& palette, TQMap<TQString, TQWidget*>& editWidgets)
{
- QMap<QString, QWidget*>::iterator it_w;
+ TQMap<TQString, TQWidget*>::iterator it_w;
for(it_w = editWidgets.begin(); it_w != editWidgets.end(); ++it_w) {
if(*it_w) {
(*it_w)->setPalette(palette);
@@ -582,36 +582,36 @@ void Transaction::setupPalette(const QPalette& palette, QMap<QString, QWidget*>&
}
}
-void Transaction::setupFormPalette(QMap<QString, QWidget*>& editWidgets)
+void Transaction::setupFormPalette(TQMap<TQString, TQWidget*>& editWidgets)
{
setupPalette(m_parent->palette(), editWidgets);
}
-void Transaction::setupRegisterPalette(QMap<QString, QWidget*>& editWidgets)
+void Transaction::setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets)
{
// make sure, we're using the right palette
- QPalette palette = m_parent->palette();
+ TQPalette palette = m_parent->palette();
// use the highlight color as background
- palette.setColor(QPalette::Active, QColorGroup::Background, palette.color(QPalette::Active, QColorGroup::Highlight));
+ palette.setColor(TQPalette::Active, TQColorGroup::Background, palette.color(TQPalette::Active, TQColorGroup::Highlight));
setupPalette(palette, editWidgets);
}
-QWidget* Transaction::focusWidget(QWidget* w) const
+TQWidget* Transaction::tqfocusWidget(TQWidget* w) const
{
if(w) {
while(w->focusProxy())
- w = w->focusProxy();
+ w = TQT_TQWIDGET(w->focusProxy());
}
return w;
}
-void Transaction::arrangeWidget(QTable* tbl, int row, int col, QWidget* w) const
+void Transaction::arrangeWidget(TQTable* tbl, int row, int col, TQWidget* w) const
{
if(w) {
tbl->setCellWidget(row, col, w);
- // remove the widget from the QTable's eventFilter so that all
+ // remove the widget from the TQTable's eventFilter so that all
// events will be directed to the edit widget
w->removeEventFilter(tbl);
} else
@@ -646,7 +646,7 @@ bool Transaction::haveNumberField(void) const
return rc;
}
-bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QString& msg)
+bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQString& msg)
{
if(col != DetailColumn)
return false;
@@ -659,25 +659,25 @@ bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QStri
// check for detail column in row 0 of the transaction for a possible exclamation mark
r = m_parent->cellGeometry(m_startRow + 0, col);
// qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height());
- r.setBottomLeft(QPoint(r.x() + (r.width() - h), r.y() + h));
+ r.setBottomLeft(TQPoint(r.x() + (r.width() - h), r.y() + h));
// qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height());
- // qDebug("p is in r = %d", r.contains(cpos));
- if(r.contains(cpos) && m_erronous) {
+ // qDebug("p is in r = %d", r.tqcontains(cpos));
+ if(r.tqcontains(cpos) && m_erronous) {
if(m_transaction.splits().count() < 2) {
- msg = QString("<qt>%1</qt>").arg(i18n("Transaction is missing a category assignment."));
+ msg = TQString("<qt>%1</qt>").tqarg(i18n("Transaction is missing a category assignment."));
} else {
const MyMoneySecurity& sec = MyMoneyFile::instance()->security(m_account.currencyId());
- msg = QString("<qt>%1</qt>").arg(i18n("The transaction has a missing assignment of <b>%1</b>.").arg(m_transaction.splitSum().abs().formatMoney(m_account, sec)));
+ msg = TQString("<qt>%1</qt>").tqarg(i18n("The transaction has a missing assignment of <b>%1</b>.").tqarg(m_transaction.splitSum().abs().formatMoney(m_account, sec)));
}
return true;
}
// check for detail column in row 1 of the transaction for a possible exclamation mark
r = m_parent->cellGeometry(m_startRow + 1, col);
- if(row == 1 && r.contains(cpos) && m_transaction.splitCount() > 2) {
+ if(row == 1 && r.tqcontains(cpos) && m_transaction.splitCount() > 2) {
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneySplit>::const_iterator it_s;
- QString txt;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
+ TQString txt;
const MyMoneySecurity& sec = file->security(m_transaction.commodity());
MyMoneyMoney factor(1, 1);
if(!m_split.value().isNegative())
@@ -687,26 +687,26 @@ bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QStri
if(*it_s == m_split)
continue;
const MyMoneyAccount& acc = file->account((*it_s).accountId());
- QString category = file->accountToCategory(acc.id());
- QString amount = ((*it_s).value() * factor).formatMoney(acc, sec);
+ TQString category = file->accountToCategory(acc.id());
+ TQString amount = ((*it_s).value() * factor).formatMoney(acc, sec);
- txt += QString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").arg(category, amount);
+ txt += TQString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").tqarg(category, amount);
}
- msg = QString("<table>%1</table>").arg(txt);
+ msg = TQString("<table>%1</table>").tqarg(txt);
return true;
}
return false;
}
-QString Transaction::reconcileState(bool text) const
+TQString Transaction::reconcileState(bool text) const
{
- QString txt = KMyMoneyUtils::reconcileStateToString(m_split.reconcileFlag(), text);
+ TQString txt = KMyMoneyUtils::reconcileStateToString(m_split.reconcileFlag(), text);
if((text == true)
&& (txt == i18n("Unknown"))
&& (m_transaction == MyMoneyTransaction()))
- txt = QString();
+ txt = TQString();
return txt;
}
@@ -725,13 +725,13 @@ void Transaction::leaveEditMode(void)
setFocus(hasFocus(), true);
}
-void Transaction::singleLineMemo(QString& txt, const MyMoneySplit& split) const
+void Transaction::singleLineMemo(TQString& txt, const MyMoneySplit& split) const
{
txt = split.memo();
// remove empty lines
- txt.replace("\n\n", "\n");
- // replace '\n' with ", "
- txt.replace('\n', ", ");
+ txt.tqreplace("\n\n", "\n");
+ // tqreplace '\n' with ", "
+ txt.tqreplace('\n', ", ");
}
int Transaction::rowHeightHint(void) const
@@ -740,41 +740,41 @@ int Transaction::rowHeightHint(void) const
}
-bool Transaction::matches(const QString& txt) const
+bool Transaction::matches(const TQString& txt) const
{
if(txt.isEmpty() || m_transaction.splitCount() == 0)
return true;
MyMoneyFile* file = MyMoneyFile::instance();
- QString s(txt);
- s.replace(MyMoneyMoney::thousandSeparator(), QString());
+ TQString s(txt);
+ s.tqreplace(MyMoneyMoney::thousandSeparator(), TQString());
- const QValueList<MyMoneySplit>&list = m_transaction.splits();
- QValueList<MyMoneySplit>::const_iterator it_s;
+ const TQValueList<MyMoneySplit>&list = m_transaction.splits();
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = list.begin(); it_s != list.end(); ++it_s) {
// check if the text is contained in one of the fields
// memo, number, payee, account
- if((*it_s).memo().contains(txt, false)
- || (*it_s).number().contains(txt, false))
+ if((*it_s).memo().tqcontains(txt, false)
+ || (*it_s).number().tqcontains(txt, false))
return true;
if(!(*it_s).payeeId().isEmpty()) {
const MyMoneyPayee& payee = file->payee((*it_s).payeeId());
- if(payee.name().contains(txt, false))
+ if(payee.name().tqcontains(txt, false))
return true;
}
const MyMoneyAccount& acc = file->account((*it_s).accountId());
- if(acc.name().contains(txt, false))
+ if(acc.name().tqcontains(txt, false))
return true;
if(!s.isEmpty()) {
// check if any of the value field matches if a value has been entered
- QString r = (*it_s).value().formatMoney(m_account.fraction(), false);
- if(r.contains(s, false))
+ TQString r = (*it_s).value().formatMoney(m_account.fraction(), false);
+ if(r.tqcontains(s, false))
return true;
const MyMoneyAccount& acc = file->account((*it_s).accountId());
r = (*it_s).shares().formatMoney(acc.fraction(), false);
- if(r.contains(s, false))
+ if(r.tqcontains(s, false))
return true;
}
}
@@ -839,8 +839,8 @@ void Transaction::setSelected(bool selected)
m_selected = selected;
}
-StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- Transaction(parent, transaction, split, uniqueId),
+StdTransaction::StdTransaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ Transaction(tqparent, transaction, split, uniqueId),
m_showAccountRow(false)
{
try {
@@ -867,7 +867,7 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans
if(KMyMoneyUtils::transactionType(m_transaction) == KMyMoneyUtils::InvestmentTransaction) {
MyMoneySplit split = KMyMoneyUtils::stockSplit(m_transaction);
m_payee = MyMoneyFile::instance()->account(split.accountId()).name();
- QString addon;
+ TQString addon;
if(split.action() == MyMoneySplit::ActionBuyShares) {
if(split.value().isNegative()) {
addon = i18n("Sell");
@@ -880,7 +880,7 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans
addon = i18n("Yield");
}
if(!addon.isEmpty()) {
- m_payee += QString(" (%1)").arg(addon);
+ m_payee += TQString(" (%1)").tqarg(addon);
}
m_payeeHeader = i18n("Activity");
m_category = i18n("Investment transaction");
@@ -889,10 +889,10 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans
// setup initial size
setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed()));
- emit parent->itemAdded(this);
+ emit tqparent->itemAdded(this);
}
-void StdTransaction::setupFormHeader(const QString& id)
+void StdTransaction::setupFormHeader(const TQString& id)
{
m_category = MyMoneyFile::instance()->accountToCategory(id);
switch(MyMoneyFile::instance()->account(id).accountGroup()) {
@@ -913,7 +913,7 @@ KMyMoneyRegister::Action StdTransaction::actionType(void) const
// if at least one split is referencing an income or
// expense account, we will not call it a transfer
- QValueList<MyMoneySplit>::const_iterator it_s;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = m_transaction.splits().begin(); it_s != m_transaction.splits().end(); ++it_s) {
if((*it_s).accountId() == m_split.accountId())
@@ -951,7 +951,7 @@ void StdTransaction::setupForm(TransactionForm* form)
{
Transaction::setupForm(form);
- QTableItem* memo = form->item(3, ValueColumn1);
+ TQTableItem* memo = form->item(3, ValueColumn1);
memo->setSpan(3, 1);
}
@@ -966,14 +966,14 @@ void StdTransaction::setShowRowInForm(int row, bool show)
m_showAccountRow = show;
}
-bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */)
+bool StdTransaction::formCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */)
{
// if(m_transaction != MyMoneyTransaction()) {
switch(row) {
case 0:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Account");
break;
}
@@ -982,23 +982,23 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
case 1:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_payeeHeader;
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_payee;
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveNumberField())
txt = i18n("Number");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveNumberField())
txt = m_split.number();
break;
@@ -1008,12 +1008,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
case 2:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_categoryHeader;
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_category;
if(m_transaction != MyMoneyTransaction()) {
if(txt.isEmpty() && !m_split.value().isZero())
@@ -1022,12 +1022,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Date");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_transaction != MyMoneyTransaction())
txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true);
break;
@@ -1037,25 +1037,25 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
case 3:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Memo");
break;
case ValueColumn1:
- align &= ~Qt::AlignVCenter;
- align |= Qt::AlignTop;
- align |= Qt::AlignLeft;
+ align &= ~TQt::AlignVCenter;
+ align |= TQt::AlignTop;
+ align |= TQt::AlignLeft;
if(m_transaction != MyMoneyTransaction())
txt = m_split.memo().section('\n', 0, 2);
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Amount");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_transaction != MyMoneyTransaction()) {
txt = (m_split.value(m_transaction.commodity(), m_splitCurrencyId).abs()).formatMoney(m_account.fraction());
}
@@ -1066,12 +1066,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
case 5:
switch(col) {
case LabelColumn2:
- align |= Qt::AlignLeft;
- txt = i18n("Status");
+ align |= TQt::AlignLeft;
+ txt = i18n("tqStatus");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
txt = reconcileState();
break;
}
@@ -1083,24 +1083,24 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP
return (col == ValueColumn1 && row < 4) || (col == ValueColumn2 && row > 0 && row != 4);
}
-void StdTransaction::registerCellText(QString& txt, int& align, int row, int col, QPainter* painter)
+void StdTransaction::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter)
{
switch(row) {
case 0:
switch(col) {
case NumberColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveNumberField())
txt = m_split.number();
break;
case DateColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true);
break;
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_payee;
if(txt.isEmpty() && m_rowsRegister < 3) {
singleLineMemo(txt, m_split);
@@ -1119,26 +1119,26 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col
break;
case ReconcileFlagColumn:
- align |= Qt::AlignHCenter;
+ align |= TQt::AlignHCenter;
txt = reconcileState(false);
break;
case PaymentColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_split.value().isNegative()) {
txt = (-m_split.value(m_transaction.commodity(), m_splitCurrencyId)).formatMoney(m_account.fraction());
}
break;
case DepositColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(!m_split.value().isNegative()) {
txt = m_split.value(m_transaction.commodity(), m_splitCurrencyId).formatMoney(m_account.fraction());
}
break;
case BalanceColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_showBalance)
txt = m_balance.formatMoney(m_account.fraction());
else
@@ -1158,7 +1158,7 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col
case 1:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = m_category;
if(txt.isEmpty() && !m_split.value().isZero()) {
txt = i18n("*** UNASSIGNED ***");
@@ -1175,7 +1175,7 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col
case 2:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
singleLineMemo(txt, m_split);
break;
@@ -1186,9 +1186,9 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col
}
}
-int StdTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetrics)
+int StdTransaction::registerColWidth(int col, const TQFontMetrics& cellFontMetrics)
{
- QString txt;
+ TQString txt;
int firstRow = 0, lastRow = 0;
int nw = 0;
@@ -1202,7 +1202,7 @@ int StdTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetric
return nw;
}
-void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets)
+void StdTransaction::arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets)
{
if(!m_form || !m_parent)
return;
@@ -1212,7 +1212,7 @@ void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets)
arrangeWidget(m_form, 0, ValueColumn1, editWidgets["account"]);
arrangeWidget(m_form, 1, LabelColumn1, editWidgets["cashflow"]);
arrangeWidget(m_form, 1, ValueColumn1, editWidgets["payee"]);
- arrangeWidget(m_form, 2, ValueColumn1, editWidgets["category"]->parentWidget());
+ arrangeWidget(m_form, 2, ValueColumn1, editWidgets["category"]->tqparentWidget());
arrangeWidget(m_form, 3, ValueColumn1, editWidgets["memo"]);
if(haveNumberField()) {
arrangeWidget(m_form, 1, LabelColumn2, editWidgets["number-label"]);
@@ -1225,68 +1225,68 @@ void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets)
arrangeWidget(m_form, 2, LabelColumn1, editWidgets["category-label"]);
// get rid of the hints. we don't need them for the form
- QMap<QString, QWidget*>::iterator it;
+ TQMap<TQString, TQWidget*>::iterator it;
for(it = editWidgets.begin(); it != editWidgets.end(); ++it) {
KMyMoneyCombo* combo = dynamic_cast<KMyMoneyCombo*>(*it);
kMyMoneyLineEdit* edit = dynamic_cast<kMyMoneyLineEdit*>(*it);
KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(*it);
if(combo)
- combo->setHint(QString());
+ combo->setHint(TQString());
if(edit)
- edit->setHint(QString());
+ edit->setHint(TQString());
if(payee)
- payee->setHint(QString());
+ payee->setHint(TQString());
}
// drop the tabbar on top of the original
KMyMoneyTransactionForm::TransactionForm* form = dynamic_cast<KMyMoneyTransactionForm::TransactionForm*>(m_form);
TabBar* w = dynamic_cast<TabBar*>(editWidgets["tabbar"]);
if(w) {
- w->reparent(form->tabBar(), QPoint(0, 0), true);
+ w->reparent(form->tabBar(), TQPoint(0, 0), true);
}
}
-void StdTransaction::tabOrderInForm(QWidgetList& tabOrderWidgets) const
+void StdTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const
{
- QStringList taborder = QStringList::split(",", KMyMoneyGlobalSettings::stdTransactionFormTabOrder());
- QStringList::const_iterator it_s = taborder.constBegin();
- QWidget* w;
+ TQStringList taborder = TQStringList::split(",", KMyMoneyGlobalSettings::stdTransactionFormTabOrder());
+ TQStringList::const_iterator it_s = taborder.constBegin();
+ TQWidget* w;
while(it_s != taborder.constEnd()) {
if(*it_s == "account") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1)));
} else if(*it_s == "cashflow") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, LabelColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, LabelColumn1)));
} else if(*it_s == "payee") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1)));
} else if(*it_s == "category") {
// make sure to have the category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_form->cellWidget(2, ValueColumn1);
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
} else if(*it_s == "memo") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn1)));
} else if(*it_s == "number") {
if(haveNumberField()) {
- if((w = focusWidget(m_form->cellWidget(1, ValueColumn2))))
+ if((w = tqfocusWidget(m_form->cellWidget(1, ValueColumn2))))
tabOrderWidgets.append(w);
}
} else if(*it_s == "date") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2)));
} else if(*it_s == "amount") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2)));
} else if(*it_s == "state") {
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2)));
}
++it_s;
}
}
-void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets)
+void StdTransaction::arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets)
{
if(!m_parent)
return;
@@ -1298,7 +1298,7 @@ void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidge
arrangeWidget(m_parent, m_startRow + 0, DateColumn, editWidgets["postdate"]);
arrangeWidget(m_parent, m_startRow + 1, DateColumn, editWidgets["status"]);
arrangeWidget(m_parent, m_startRow + 0, DetailColumn, editWidgets["payee"]);
- arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["category"]->parentWidget());
+ arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["category"]->tqparentWidget());
arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["memo"]);
arrangeWidget(m_parent, m_startRow + 0, PaymentColumn, editWidgets["payment"]);
arrangeWidget(m_parent, m_startRow + 0, DepositColumn, editWidgets["deposit"]);
@@ -1307,39 +1307,39 @@ void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidge
m_parent->setRowHeight(m_startRow+2, m_parent->rowHeightHint() * 3);
}
-void StdTransaction::tabOrderInRegister(QWidgetList& tabOrderWidgets) const
+void StdTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const
{
- QStringList taborder = QStringList::split(",", KMyMoneyGlobalSettings::stdTransactionRegisterTabOrder());
- QStringList::const_iterator it_s = taborder.constBegin();
- QWidget* w;
+ TQStringList taborder = TQStringList::split(",", KMyMoneyGlobalSettings::stdTransactionRegisterTabOrder());
+ TQStringList::const_iterator it_s = taborder.constBegin();
+ TQWidget* w;
while(it_s != taborder.constEnd()) {
if(*it_s == "number") {
if(haveNumberField()) {
- if((w = focusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn))))
+ if((w = tqfocusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn))))
tabOrderWidgets.append(w);
}
} else if(*it_s == "date") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
} else if(*it_s == "payee") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
} else if(*it_s == "category") {
// make sure to have the category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_parent->cellWidget(m_startRow + 1, DetailColumn);
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
} else if(*it_s == "memo") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn)));
} else if(*it_s == "payment") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn)));
} else if(*it_s == "deposit") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn)));
} else if(*it_s == "state") {
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
}
++it_s;
}
@@ -1370,14 +1370,14 @@ int StdTransaction::numRowsRegister(bool expanded) const
return numRows;
}
-TransactionEditor* StdTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate)
+TransactionEditor* StdTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate)
{
m_inRegisterEdit = regForm == m_parent;
return new StdTransactionEditor(regForm, this, list, lastPostDate);
}
-InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
- Transaction(parent, transaction, split, uniqueId)
+InvestTransaction::InvestTransaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) :
+ Transaction(tqparent, transaction, split, uniqueId)
{
// dissect the transaction into its type, splits, currency, security etc.
InvestTransactionEditor::dissectTransaction(m_transaction, m_split,
@@ -1388,7 +1388,7 @@ InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction&
m_currency,
m_transactionType);
- QValueList<MyMoneySplit>::ConstIterator it_s;
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
for(it_s = m_feeSplits.begin(); it_s != m_feeSplits.end(); ++it_s) {
m_feeAmount += (*it_s).value();
}
@@ -1429,18 +1429,18 @@ InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction&
// setup initial size
setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed()));
- emit parent->itemAdded(this);
+ emit tqparent->itemAdded(this);
}
void InvestTransaction::setupForm(TransactionForm* form)
{
Transaction::setupForm(form);
- QTableItem* memo = form->item(5, 1);
+ TQTableItem* memo = form->item(5, 1);
memo->setSpan(2, 1);
}
-void InvestTransaction::activity(QString& txt, MyMoneySplit::investTransactionTypeE type) const
+void InvestTransaction::activity(TQString& txt, MyMoneySplit::investTransactionTypeE type) const
{
switch(type) {
case MyMoneySplit::AddShares:
@@ -1473,7 +1473,7 @@ void InvestTransaction::activity(QString& txt, MyMoneySplit::investTransactionTy
}
}
-bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */)
+bool InvestTransaction::formCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */)
{
bool fieldEditable = false;
@@ -1481,23 +1481,23 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 0:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Activity");
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
fieldEditable = true;
activity(txt, m_transactionType);
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Date");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
fieldEditable = true;
if(m_transaction != MyMoneyTransaction())
txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true);
@@ -1508,19 +1508,19 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 1:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Security");
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
fieldEditable = true;
if(m_account.isInvest())
txt = m_security.name();
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveShares()) {
txt = i18n("Shares");
} else if(haveSplitRatio()) {
@@ -1529,11 +1529,11 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if((fieldEditable = haveShares()) == true) {
txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction()));
} else if(haveSplitRatio()) {
- txt = QString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1));
+ txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1));
}
break;
}
@@ -1542,26 +1542,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 2:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveAssetAccount())
txt = i18n("Account");
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if((fieldEditable = haveAssetAccount()) == true) {
txt = MyMoneyFile::instance()->accountToCategory(m_assetAccountSplit.accountId());
}
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(havePrice())
txt = i18n("Price/share");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if((fieldEditable = havePrice()) == true && !m_split.shares().isZero()) {
txt = m_split.price().formatMoney("", KMyMoneyGlobalSettings::pricePrecision());
}
@@ -1572,26 +1572,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 3:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveFees())
txt = i18n("Fees");
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if((fieldEditable = haveFees()) == true) {
txt = m_feeCategory;
}
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveFees() && !m_feeCategory.isEmpty())
txt = i18n("Amount");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveFees()) {
if((fieldEditable = !m_feeCategory.isEmpty()) == true) {
txt = m_feeAmount.formatMoney(m_currency);
@@ -1604,26 +1604,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 4:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveInterest())
txt = i18n("Interest");
break;
case ValueColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if((fieldEditable = haveInterest()) == true) {
txt = m_interestCategory;
}
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveInterest() && !m_interestCategory.isEmpty())
txt = i18n("Amount");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveInterest()) {
if((fieldEditable = !m_interestCategory.isEmpty()) == true) {
txt = (-m_interestAmount).formatMoney(m_currency);
@@ -1636,27 +1636,27 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 5:
switch(col) {
case LabelColumn1:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = i18n("Memo");
break;
case ValueColumn1:
- align &= ~Qt::AlignVCenter;
- align |= Qt::AlignTop;
- align |= Qt::AlignLeft;
+ align &= ~TQt::AlignVCenter;
+ align |= TQt::AlignTop;
+ align |= TQt::AlignLeft;
fieldEditable = true;
if(m_transaction != MyMoneyTransaction())
txt = m_split.memo().section('\n', 0, 2);
break;
case LabelColumn2:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveAmount())
txt = i18n("Total");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if((fieldEditable = haveAmount()) == true) {
txt = m_assetAccountSplit.value().abs().formatMoney(m_currency);
}
@@ -1666,12 +1666,12 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
case 6:
switch(col) {
case LabelColumn2:
- align |= Qt::AlignLeft;
- txt = i18n("Status");
+ align |= TQt::AlignLeft;
+ txt = i18n("tqStatus");
break;
case ValueColumn2:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
fieldEditable = true;
txt = reconcileState();
break;
@@ -1681,50 +1681,50 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col,
return fieldEditable;
}
-void InvestTransaction::registerCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */)
+void InvestTransaction::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */)
{
switch(row) {
case 0:
switch(col) {
case DateColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true);
break;
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
activity(txt, m_transactionType);
break;
case SecurityColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(m_account.isInvest())
txt = m_security.name();
break;
case ReconcileFlagColumn:
- align |= Qt::AlignHCenter;
+ align |= TQt::AlignHCenter;
txt = reconcileState(false);
break;
case QuantityColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveShares())
txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction()));
else if(haveSplitRatio()) {
- txt = QString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1));
+ txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1));
}
break;
case PriceColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(havePrice() && !m_split.shares().isZero()) {
txt = m_split.price().formatMoney(m_currency.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision());
}
break;
case ValueColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveAmount()) {
txt = m_assetAccountSplit.value().abs().formatMoney(m_currency);
@@ -1734,7 +1734,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
break;
case BalanceColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(m_showBalance)
txt = m_balance.formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction()));
else
@@ -1749,7 +1749,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
case 1:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()) {
txt = MyMoneyFile::instance()->accountToCategory(m_assetAccountSplit.accountId());
} else if(haveInterest() && m_interestSplits.count()) {
@@ -1761,7 +1761,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
break;
case QuantityColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()) {
// txt = m_interestAmount.abs().formatMoney(m_currency);
} else if(haveInterest() && m_interestSplits.count()) {
@@ -1779,7 +1779,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
case 2:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()
&& haveInterest() && m_interestSplits.count()) {
txt = m_interestCategory;
@@ -1790,7 +1790,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
break;
case QuantityColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()
&& haveInterest() && m_interestSplits.count()) {
txt = (-m_interestAmount).formatMoney(m_currency);
@@ -1807,7 +1807,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
case 3:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()
&& haveInterest() && m_interestSplits.count()
&& haveFees() && m_feeSplits.count()) {
@@ -1817,7 +1817,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
break;
case QuantityColumn:
- align |= Qt::AlignRight;
+ align |= TQt::AlignRight;
if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()
&& haveInterest() && m_interestSplits.count()
&& haveFees() && m_feeSplits.count()) {
@@ -1833,7 +1833,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
case 4:
switch(col) {
case DetailColumn:
- align |= Qt::AlignLeft;
+ align |= TQt::AlignLeft;
singleLineMemo(txt, m_split);
break;
@@ -1844,9 +1844,9 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int
}
}
-int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetrics)
+int InvestTransaction::registerColWidth(int col, const TQFontMetrics& cellFontMetrics)
{
- QString txt;
+ TQString txt;
MyMoneyMoney amount;
int nw = 0;
@@ -1855,7 +1855,7 @@ int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMet
int w;
Transaction::registerCellText(txt, row, col);
w = cellFontMetrics.width(txt+" ");
- nw = QMAX(nw, w);
+ nw = TQMAX(nw, w);
}
// TODO the optimized way would be to base the size on the contents of a single row
@@ -1876,7 +1876,7 @@ int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMet
return nw;
}
-void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets)
+void InvestTransaction::arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets)
{
if(!m_form || !m_parent)
return;
@@ -1890,9 +1890,9 @@ void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidget
arrangeWidget(m_form, 1, ValueColumn2, editWidgets["shares"]);
arrangeWidget(m_form, 2, ValueColumn1, editWidgets["asset-account"]);
arrangeWidget(m_form, 2, ValueColumn2, editWidgets["price"]);
- arrangeWidget(m_form, 3, ValueColumn1, editWidgets["fee-account"]->parentWidget());
+ arrangeWidget(m_form, 3, ValueColumn1, editWidgets["fee-account"]->tqparentWidget());
arrangeWidget(m_form, 3, ValueColumn2, editWidgets["fee-amount"]);
- arrangeWidget(m_form, 4, ValueColumn1, editWidgets["interest-account"]->parentWidget());
+ arrangeWidget(m_form, 4, ValueColumn1, editWidgets["interest-account"]->tqparentWidget());
arrangeWidget(m_form, 4, ValueColumn2, editWidgets["interest-amount"]);
arrangeWidget(m_form, 5, ValueColumn1, editWidgets["memo"]);
arrangeWidget(m_form, 5, ValueColumn2, editWidgets["total"]);
@@ -1909,77 +1909,77 @@ void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidget
arrangeWidget(m_form, 5, LabelColumn2, editWidgets["total-label"]);
// get rid of the hints. we don't need them for the form
- QMap<QString, QWidget*>::iterator it;
+ TQMap<TQString, TQWidget*>::iterator it;
for(it = editWidgets.begin(); it != editWidgets.end(); ++it) {
KMyMoneyCombo* combo = dynamic_cast<KMyMoneyCombo*>(*it);
kMyMoneyLineEdit* lineedit = dynamic_cast<kMyMoneyLineEdit*>(*it);
kMyMoneyEdit* edit = dynamic_cast<kMyMoneyEdit*>(*it);
KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(*it);
if(combo)
- combo->setHint(QString());
+ combo->setHint(TQString());
if(edit)
- edit->setHint(QString());
+ edit->setHint(TQString());
if(lineedit)
- lineedit->setHint(QString());
+ lineedit->setHint(TQString());
if(payee)
- payee->setHint(QString());
+ payee->setHint(TQString());
}
}
-void InvestTransaction::tabOrderInForm(QWidgetList& tabOrderWidgets) const
+void InvestTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const
{
// activity
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1)));
// date
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn2)));
// security
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1)));
// shares
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn2)));
// account
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn1)));
// price
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2)));
// make sure to have the fee category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
- QWidget* w = m_form->cellWidget(3, ValueColumn1);
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ TQWidget* w = m_form->cellWidget(3, ValueColumn1);
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// fee amount
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2)));
// the same applies for the interest categories
w = m_form->cellWidget(4, ValueColumn1);
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// interest amount
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(4, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(4, ValueColumn2)));
// memo
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn1)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn1)));
// total
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2)));
// state
- tabOrderWidgets.append(focusWidget(m_form->cellWidget(6, ValueColumn2)));
+ tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(6, ValueColumn2)));
}
-void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets)
+void InvestTransaction::arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets)
{
if(!m_parent)
return;
@@ -1990,8 +1990,8 @@ void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWi
arrangeWidget(m_parent, m_startRow + 0, SecurityColumn, editWidgets["security"]);
arrangeWidget(m_parent, m_startRow + 0, DetailColumn, editWidgets["activity"]);
arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["asset-account"]);
- arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["interest-account"]->parentWidget());
- arrangeWidget(m_parent, m_startRow + 3, DetailColumn, editWidgets["fee-account"]->parentWidget());
+ arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["interest-account"]->tqparentWidget());
+ arrangeWidget(m_parent, m_startRow + 3, DetailColumn, editWidgets["fee-account"]->tqparentWidget());
arrangeWidget(m_parent, m_startRow + 4, DetailColumn, editWidgets["memo"]);
arrangeWidget(m_parent, m_startRow + 0, QuantityColumn, editWidgets["shares"]);
arrangeWidget(m_parent, m_startRow + 0, PriceColumn, editWidgets["price"]);
@@ -2004,50 +2004,50 @@ void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWi
m_parent->setRowHeight(m_startRow+4, m_parent->rowHeightHint() * 3);
}
-void InvestTransaction::tabOrderInRegister(QWidgetList& tabOrderWidgets) const
+void InvestTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const
{
- QWidget* w;
+ TQWidget* w;
// date
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
// security
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn)));
// activity
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
// shares
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn)));
// price
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn)));
// asset account
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn)));
// make sure to have the category fields and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_parent->cellWidget(m_startRow + 2, DetailColumn); // interest account
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// interest amount
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn)));
w = m_parent->cellWidget(m_startRow + 3, DetailColumn); // fee account
- tabOrderWidgets.append(focusWidget(w));
- w = dynamic_cast<QWidget*>(w->child("splitButton"));
+ tabOrderWidgets.append(tqfocusWidget(w));
+ w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// fee amount
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn)));
// memo
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn)));
// status
- tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
+ tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
}
int InvestTransaction::numRowsRegister(bool expanded) const
@@ -2174,14 +2174,14 @@ bool InvestTransaction::haveSplitRatio(void) const
return m_transactionType == MyMoneySplit::SplitShares;
}
-void InvestTransaction::splits(MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& feeSplits) const
+void InvestTransaction::splits(MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& feeSplits) const
{
assetAccountSplit = m_assetAccountSplit;
interestSplits = m_interestSplits;
feeSplits = m_feeSplits;
}
-TransactionEditor* InvestTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate)
+TransactionEditor* InvestTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate)
{
m_inRegisterEdit = regForm == m_parent;
return new InvestTransactionEditor(regForm, this, list, lastPostDate);
diff --git a/kmymoney2/widgets/transaction.h b/kmymoney2/widgets/transaction.h
index 060d025..f74bb60 100644
--- a/kmymoney2/widgets/transaction.h
+++ b/kmymoney2/widgets/transaction.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpalette.h>
+#include <tqpalette.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,7 +36,7 @@
#include <kmymoney/selectedtransaction.h>
#include <kmymoney/mymoneyaccount.h>
-class QTable;
+class TQTable;
class TransactionEditor;
class TransactionEditorContainer;
@@ -68,7 +68,7 @@ typedef enum {
class Transaction : public RegisterItem
{
public:
- Transaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ Transaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~Transaction() {}
virtual const char* className(void) { return "Transaction"; }
@@ -87,18 +87,18 @@ public:
bool isErronous(void) const { return m_erronous; }
- virtual const QDate& sortPostDate(void) const { return m_transaction.postDate(); }
+ virtual const TQDate& sortPostDate(void) const { return m_transaction.postDate(); }
virtual int sortSamePostDate(void) const { return 2; }
- virtual const QDate& sortEntryDate(void) const { return m_transaction.entryDate(); }
- virtual const QString& sortPayee(void) const { return m_payee; }
+ virtual const TQDate& sortEntryDate(void) const { return m_transaction.entryDate(); }
+ virtual const TQString& sortPayee(void) const { return m_payee; }
virtual const MyMoneyMoney& sortValue(void) const { return m_split.shares(); }
- virtual const QString& sortNumber(void) const { return m_split.number(); }
- virtual const QString& sortEntryOrder(void) const { return m_uniqueId; }
+ virtual const TQString& sortNumber(void) const { return m_split.number(); }
+ virtual const TQString& sortEntryOrder(void) const { return m_uniqueId; }
virtual CashFlowDirection sortType(void) const { return m_split.shares().isNegative() ? Payment : Deposit; }
- virtual const QString& sortCategory(void) const { return m_category; }
+ virtual const TQString& sortCategory(void) const { return m_category; }
virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return m_split.reconcileFlag(); }
- virtual const QString& id(void) const { return m_uniqueId; }
+ virtual const TQString& id(void) const { return m_uniqueId; }
const MyMoneyTransaction& transaction(void) const { return m_transaction; }
const MyMoneySplit& split(void) const { return m_split; }
@@ -119,31 +119,31 @@ public:
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
/**
* paints the focus if the current cell defined by (@a row, @a col) has the focus.
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
* @param r area covering the cell
* @param cg the color definitions to be used
*/
- void paintRegisterCellFocus(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg);
+ void paintRegisterCellFocus(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg);
/**
* paints a cell of the register for the transaction. Uses paintRegisterCellSetup(), paintRegisterCellText()
* paintRegisterGrid(), paintRegisterIcons() and paintRegisterCellFocus() to actually do the job.
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
* @param r area covering the cell
@@ -151,44 +151,44 @@ public:
* @param cg the color definitions to be used
*
*/
- virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
- virtual void paintRegisterCellText(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg, int align, const QString& txt);
- virtual void paintRegisterCellBackground(QPainter* painter, int row, int col, const QRect& r, const QBrush& backgroundBrush);
- virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
- virtual void paintRegisterIcons(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg);
+ virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
+ virtual void paintRegisterCellText(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg, int align, const TQString& txt);
+ virtual void paintRegisterCellBackground(TQPainter* painter, int row, int col, const TQRect& r, const TQBrush& backgroundBrush);
+ virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const;
+ virtual void paintRegisterIcons(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg);
- virtual void paintFormCell(QPainter* /* painter */, int /* row */, int /* col */, const QRect& /* r */, bool /* selected */, const QColorGroup& /* cg */);
+ virtual void paintFormCell(TQPainter* /* painter */, int /* row */, int /* col */, const TQRect& /* r */, bool /* selected */, const TQColorGroup& /* cg */);
- virtual bool formCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) { return false; }
- virtual void registerCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) {}
- virtual int registerColWidth(int /* col */, const QFontMetrics& /* cellFontMetrics */) { return 0; }
+ virtual bool formCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) { return false; }
+ virtual void registerCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) {}
+ virtual int registerColWidth(int /* col */, const TQFontMetrics& /* cellFontMetrics */) { return 0; }
/**
* Helper method for the above method.
*/
- void registerCellText(QString& txt, int row, int col);
+ void registerCellText(TQString& txt, int row, int col);
virtual int formRowHeight(int row);
virtual int formRowHeight(void) const;
virtual void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
- virtual void setupFormPalette(QMap<QString, QWidget*>& editWidgets);
- virtual void setupRegisterPalette(QMap<QString, QWidget*>& editWidgets);
+ virtual void setupFormPalette(TQMap<TQString, TQWidget*>& editWidgets);
+ virtual void setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets);
virtual void loadTab(KMyMoneyTransactionForm::TransactionForm* form) = 0;
- virtual void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) = 0;
- virtual void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets) = 0;
- virtual void tabOrderInForm(QWidgetList& tabOrderWidgets) const = 0;
- virtual void tabOrderInRegister(QWidgetList& tabOrderWidgets) const = 0;
+ virtual void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets) = 0;
+ virtual void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets) = 0;
+ virtual void tabOrderInForm(TQWidgetList& tabOrderWidgets) const = 0;
+ virtual void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const = 0;
virtual KMyMoneyRegister::Action actionType(void) const = 0;
- QWidget* focusWidget(QWidget*) const;
- void arrangeWidget(QTable* tbl, int row, int col, QWidget* w) const;
+ TQWidget* tqfocusWidget(TQWidget*) const;
+ void arrangeWidget(TQTable* tbl, int row, int col, TQWidget* w) const;
bool haveNumberField(void) const;
- bool matches(const QString&) const;
+ bool matches(const TQString&) const;
/**
* Checks if the mouse hovered over an area that has a tooltip associated with it.
@@ -197,11 +197,11 @@ public:
*
* If a tooltip shall be shown, this method presets the rectangle @a r with the
* area in register coordinates and @a msg with the string that will be passed
- * to QToolTip::tip. @a true is returned in this case.
+ * to TQToolTip::tip. @a true is returned in this case.
*
* If no tooltip is available, @a false will be returned.
*/
- virtual bool maybeTip(const QPoint& relpos, int row, int col, QRect& r, QString& msg);
+ virtual bool maybeTip(const TQPoint& relpos, int row, int col, TQRect& r, TQString& msg);
/**
* This method returns the number of register rows required for a certain
@@ -223,7 +223,7 @@ public:
/**
* This method creates an editor for the transaction
*/
- virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) = 0;
+ virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) = 0;
virtual void setVisible(bool visible);
@@ -244,8 +244,8 @@ public:
virtual void setReducedIntensity(bool reduced) { m_reducedIntensity = reduced; }
protected:
- virtual void markAsErronous(QPainter* p, int row, int col, const QRect& r);
- virtual void markAttachment(QPainter* painter, int row, int col, const QRect& r);
+ virtual void markAsErronous(TQPainter* p, int row, int col, const TQRect& r);
+ virtual void markAttachment(TQPainter* painter, int row, int col, const TQRect& r);
/**
* This method converts m_split.reconcileFlag() into a readable string
@@ -255,30 +255,30 @@ protected:
* @return Textual representation or flag as selected via @p text of the
* reconciliation state of the split
*/
- QString reconcileState(bool text = true) const;
+ TQString reconcileState(bool text = true) const;
/**
* Helper method to reduce a multi line memo text into a single line.
*
- * @param txt QString that will receive the single line memo text
+ * @param txt TQString that will receive the single line memo text
* @param split const reference to the split to take the memo from
*/
- void singleLineMemo(QString& txt, const MyMoneySplit& split) const;
+ void singleLineMemo(TQString& txt, const MyMoneySplit& split) const;
- virtual void setupPalette(const QPalette& palette, QMap<QString, QWidget*>& editWidgets);
+ virtual void setupPalette(const TQPalette& palette, TQMap<TQString, TQWidget*>& editWidgets);
protected:
MyMoneyTransaction m_transaction;
MyMoneySplit m_split;
MyMoneyAccount m_account;
MyMoneyMoney m_balance;
- QTable* m_form;
- QString m_category;
- QString m_payee;
- QString m_payeeHeader;
- QString m_categoryHeader;
- QString m_splitCurrencyId;
- QString m_uniqueId;
+ TQTable* m_form;
+ TQString m_category;
+ TQString m_payee;
+ TQString m_payeeHeader;
+ TQString m_categoryHeader;
+ TQString m_splitCurrencyId;
+ TQString m_uniqueId;
int m_formRowHeight;
bool m_selected;
bool m_focus;
@@ -292,24 +292,24 @@ protected:
class StdTransaction : public Transaction
{
public:
- StdTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ StdTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~StdTransaction() {}
virtual const char* className(void) { return "StdTransaction"; }
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
- int registerColWidth(int col, const QFontMetrics& cellFontMetrics);
+ int registerColWidth(int col, const TQFontMetrics& cellFontMetrics);
void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
void loadTab(KMyMoneyTransactionForm::TransactionForm* form);
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
KMyMoneyRegister::Action actionType(void) const;
int numRowsRegister(bool expanded) const;
@@ -319,7 +319,7 @@ public:
*/
int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); }
- TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate);
+ TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate);
/**
* Return information if @a row should be shown (@a true )
@@ -334,7 +334,7 @@ public:
virtual void setShowRowInForm(int row, bool show);
protected:
- void setupFormHeader(const QString& id);
+ void setupFormHeader(const TQString& id);
private:
bool m_showAccountRow;
@@ -343,18 +343,18 @@ private:
class InvestTransaction : public Transaction
{
public:
- InvestTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ InvestTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~InvestTransaction() {}
- virtual const QString& sortSecurity(void) const { return m_security.name(); }
+ virtual const TQString& sortSecurity(void) const { return m_security.name(); }
virtual const char* className(void) { return "InvestTransaction"; }
- // virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ // virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
- int registerColWidth(int col, const QFontMetrics& cellFontMetrics);
+ int registerColWidth(int col, const TQFontMetrics& cellFontMetrics);
void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
/**
@@ -364,10 +364,10 @@ public:
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
KMyMoneyRegister::Action actionType(void) const { return KMyMoneyRegister::ActionNone; }
int numRowsRegister(bool expanded) const;
@@ -377,9 +377,9 @@ public:
*/
int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); }
- TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate);
+ TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate);
- void splits(MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& feeSplits) const;
+ void splits(MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& feeSplits) const;
protected:
bool haveShares(void) const;
@@ -394,20 +394,20 @@ protected:
* Returns textual representation of the activity identified
* by @p type.
*
- * @param txt reference to QString where to store the result
+ * @param txt reference to TQString where to store the result
* @param type activity represented as investTransactionTypeE
*/
- void activity(QString& txt, MyMoneySplit::investTransactionTypeE type) const;
+ void activity(TQString& txt, MyMoneySplit::investTransactionTypeE type) const;
private:
- QValueList<MyMoneySplit> m_feeSplits;
- QValueList<MyMoneySplit> m_interestSplits;
+ TQValueList<MyMoneySplit> m_feeSplits;
+ TQValueList<MyMoneySplit> m_interestSplits;
MyMoneySplit m_assetAccountSplit;
MyMoneySecurity m_security;
MyMoneySecurity m_currency;
MyMoneySplit::investTransactionTypeE m_transactionType;
- QString m_feeCategory;
- QString m_interestCategory;
+ TQString m_feeCategory;
+ TQString m_interestCategory;
MyMoneyMoney m_feeAmount;
MyMoneyMoney m_interestAmount;
MyMoneyMoney m_totalAmount;
diff --git a/kmymoney2/widgets/transactioneditorcontainer.h b/kmymoney2/widgets/transactioneditorcontainer.h
index 01474ee..6cf82cf 100644
--- a/kmymoney2/widgets/transactioneditorcontainer.h
+++ b/kmymoney2/widgets/transactioneditorcontainer.h
@@ -21,10 +21,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qmap.h>
-#include <qstring.h>
-#include <qtable.h>
-class QWidget;
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqtable.h>
+class TQWidget;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -42,17 +42,17 @@ typedef enum {
ProtectAll
} ProtectedAction;
-class TransactionEditorContainer : public QTable
+class TransactionEditorContainer : public TQTable
{
public:
- TransactionEditorContainer(QWidget* parent, const char* name) : QTable(parent, name) {}
+ TransactionEditorContainer(TQWidget* tqparent, const char* name) : TQTable(tqparent, name) {}
- virtual void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) = 0;
- virtual void removeEditWidgets(QMap<QString, QWidget*>& editWidgets) = 0;
- virtual void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const = 0;
+ virtual void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) = 0;
+ virtual void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets) = 0;
+ virtual void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const = 0;
// FIXME remove tabbar
- // virtual int action(QMap<QString, QWidget*>& editWidgets) const = 0;
- // virtual void setProtectedAction(QMap<QString, QWidget*>& editWidgets, ProtectedAction action) = 0;
+ // virtual int action(TQMap<TQString, TQWidget*>& editWidgets) const = 0;
+ // virtual void setProtectedAction(TQMap<TQString, TQWidget*>& editWidgets, ProtectedAction action) = 0;
};
#endif
diff --git a/kmymoney2/widgets/transactionform.cpp b/kmymoney2/widgets/transactionform.cpp
index 7097b6d..8686371 100644
--- a/kmymoney2/widgets/transactionform.cpp
+++ b/kmymoney2/widgets/transactionform.cpp
@@ -18,13 +18,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qstring.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qtabbar.h>
-#include <qpalette.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqtabbar.h>
+#include <tqpalette.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -47,11 +47,11 @@
using namespace KMyMoneyTransactionForm;
-TabBar::TabBar(QWidget* parent, const char* name) :
- QTabBar(parent, name),
+TabBar::TabBar(TQWidget* tqparent, const char* name) :
+ TQTabBar(tqparent, name),
m_signalType(SignalNormal)
{
- connect(this, SIGNAL(selected(int)), this, SLOT(slotTabSelected(int)));
+ connect(this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotTabSelected(int)));
}
TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type)
@@ -63,8 +63,8 @@ TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type)
int TabBar::currentTab(void) const
{
- QMap<int, int>::const_iterator it;
- it = m_idMap.find(QTabBar::currentTab());
+ TQMap<int, int>::const_iterator it;
+ it = m_idMap.tqfind(TQTabBar::currentTab());
if(it != m_idMap.end())
return *it;
return -1;
@@ -77,30 +77,30 @@ void TabBar::setCurrentTab(int id)
setCurrentTab(tab(id));
}
-QTab* TabBar::tab(int id) const
+TQTab* TabBar::tab(int id) const
{
- /* if a QAccel calls setCurrentTab, id will be as set by qt.
+ /* if a TQAccel calls setCurrentTab, id will be as set by qt.
* however if we call it programmatically, id will
- * be our own id. We do tell QTab about our id but
+ * be our own id. We do tell TQTab about our id but
* in qt3.3 I (woro) am not able to make sure that
- * QAccel also gets it. See registeritem.h: We defined
+ * TQAccel also gets it. See registeritem.h: We defined
* new values for our own ids which should lie way
* outside of the range that qt uses
*/
- QTab *result=QTabBar::tab(id);
- QMap<int, int>::const_iterator it;
+ TQTab *result=TQTabBar::tab(id);
+ TQMap<int, int>::const_iterator it;
for(it = m_idMap.begin(); it != m_idMap.end(); ++it)
if(*it == id)
- result=QTabBar::tab(it.key());
+ result=TQTabBar::tab(it.key());
return result;
}
-void TabBar::setCurrentTab(QTab* tab)
+void TabBar::setCurrentTab(TQTab* tab)
{
if(m_signalType != SignalNormal)
blockSignals(true);
- QTabBar::setCurrentTab(tab);
+ TQTabBar::setCurrentTab(tab);
if(m_signalType != SignalNormal)
blockSignals(false);
@@ -109,13 +109,13 @@ void TabBar::setCurrentTab(QTab* tab)
emit selected(tab->identifier());
}
-void TabBar::addTab(QTab* tab, int id)
+void TabBar::addTab(TQTab* tab, int id)
{
- QTabBar::addTab(tab);
+ TQTabBar::addTab(tab);
setIdentifier(tab, id);
}
-void TabBar::setIdentifier(QTab* tab, int newId)
+void TabBar::setIdentifier(TQTab* tab, int newId)
{
m_idMap[tab->identifier()] = newId;
}
@@ -127,8 +127,8 @@ void TransactionForm::enableTabBar(bool b)
void TabBar::slotTabSelected(int id)
{
- QMap<int, int>::const_iterator it;
- it = m_idMap.find(id);
+ TQMap<int, int>::const_iterator it;
+ it = m_idMap.tqfind(id);
if(it != m_idMap.end())
emit tabSelected(*it);
else
@@ -141,7 +141,7 @@ void TabBar::show(void)
if(m_signalType != SignalNormal)
blockSignals(true);
- QTabBar::show();
+ TQTabBar::show();
if(m_signalType != SignalNormal)
blockSignals(false);
@@ -155,9 +155,9 @@ void TabBar::copyTabs(const TabBar* otabbar)
}
// now create new ones. copy text, icon and identifier
for(int i=0; i < otabbar->count(); ++i) {
- QTab* otab = otabbar->tabAt(i);
- QTab* ntab = new QTab(otab->text());
- int nid = QTabBar::addTab(ntab);
+ TQTab* otab = otabbar->tabAt(i);
+ TQTab* ntab = new TQTab(otab->text());
+ int nid = TQTabBar::addTab(ntab);
m_idMap[nid] = otabbar->m_idMap[otab->identifier()];
ntab->setEnabled(otab->isEnabled());
if(otab->identifier() == otabbar->currentTab())
@@ -165,15 +165,15 @@ void TabBar::copyTabs(const TabBar* otabbar)
}
}
-TransactionForm::TransactionForm(QWidget *parent, const char *name) :
- TransactionEditorContainer(parent, name),
+TransactionForm::TransactionForm(TQWidget *tqparent, const char *name) :
+ TransactionEditorContainer(tqparent, name),
m_transaction(0),
m_tabBar(0)
{
- setBackgroundOrigin(QTable::WindowOrigin);
- setFrameShape( QTable::NoFrame);
+ setBackgroundOrigin(TQTable::WindowOrigin);
+ setFrameShape( TQTable::NoFrame);
setShowGrid( false );
- setSelectionMode( QTable::NoSelection );
+ setSelectionMode( TQTable::NoSelection );
verticalHeader()->hide();
horizontalHeader()->hide();
setLeftMargin(0);
@@ -182,34 +182,34 @@ TransactionForm::TransactionForm(QWidget *parent, const char *name) :
// make sure, that the table is 'invisible' by setting up the right background
// keep the original color group for painting the cells though
- QPalette p = palette();
- QColorGroup cg = p.active();
+ TQPalette p = palette();
+ TQColorGroup cg = p.active();
m_cellColorGroup = cg;
- cg.setBrush(QColorGroup::Base, cg.brush(QColorGroup::Background));
+ cg.setBrush(TQColorGroup::Base, cg.brush(TQColorGroup::Background));
p.setActive(cg);
p.setInactive(cg);
p.setDisabled(cg);
setPalette(p);
// never show vertical scroll bars
- setVScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
slotSetTransaction(0);
}
-void TransactionForm::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+void TransactionForm::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
{
- // the QTable::drawContents() method does not honor the block update flag
+ // the TQTable::drawContents() method does not honor the block update flag
// so we take care of it here
- if ( testWState(WState_Visible|WState_BlockUpdates) != WState_Visible )
+ if ( testWState((TQt::WidgetState)(WState_Visible|WState_BlockUpdates)) != WState_Visible )
return;
- QTable::drawContents(p, cx, cy, cw, ch);
+ TQTable::drawContents(p, cx, cy, cw, ch);
}
bool TransactionForm::focusNextPrevChild(bool next)
{
- return QFrame::focusNextPrevChild(next);
+ return TQFrame::focusNextPrevChild(next);
}
void TransactionForm::clear(void)
@@ -237,13 +237,13 @@ void TransactionForm::slotSetTransaction(KMyMoneyRegister::Transaction* transact
kMyMoneyDateInput dateInput(0, "editDate");
KMyMoneyCategory category(0, "category", true);
- // extract the maximal sizeHint height
- int height = QMAX(dateInput.sizeHint().height(), category.sizeHint().height());
+ // extract the maximal tqsizeHint height
+ int height = TQMAX(dateInput.tqsizeHint().height(), category.tqsizeHint().height());
for(int row = 0; row < numRows(); ++row) {
if(!transaction || transaction->showRowInForm(row)) {
showRow(row);
- QTable::setRowHeight(row, height);
+ TQTable::setRowHeight(row, height);
} else
hideRow(row);
}
@@ -256,25 +256,25 @@ void TransactionForm::slotSetTransaction(KMyMoneyRegister::Transaction* transact
setUpdatesEnabled(enabled);
// force resizeing of the columns
- QTimer::singleShot(0, this, SLOT(resize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(resize()));
}
-void TransactionForm::paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& /* cg */)
+void TransactionForm::paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& /* cg */)
{
if(m_transaction) {
m_transaction->paintFormCell(painter, row, col, r, selected, m_cellColorGroup);
}
}
-TabBar* TransactionForm::tabBar(QWidget* parent)
+TabBar* TransactionForm::tabBar(TQWidget* tqparent)
{
- if(!m_tabBar && parent) {
+ if(!m_tabBar && tqparent) {
// determine the height of the objects in the table
// create the tab bar
- m_tabBar = new TabBar( parent );
+ m_tabBar = new TabBar( tqparent );
m_tabBar->setSignalEmission(TabBar::SignalAlways);
- m_tabBar->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, m_tabBar->sizePolicy().hasHeightForWidth() ) );
- connect(m_tabBar, SIGNAL(tabSelected(int)), this, SLOT(slotActionSelected(int)));
+ m_tabBar->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_tabBar->sizePolicy().hasHeightForWidth() ) );
+ connect(m_tabBar, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(slotActionSelected(int)));
}
return m_tabBar;
}
@@ -287,7 +287,7 @@ void TransactionForm::slotActionSelected(int id)
void TransactionForm::setupForm(const MyMoneyAccount& acc)
{
// remove all tabs from the tabbar
- QTab* tab;
+ TQTab* tab;
for(tab = m_tabBar->tabAt(0); tab; tab = m_tabBar->tabAt(0)) {
m_tabBar->removeTab(tab);
}
@@ -299,40 +299,40 @@ void TransactionForm::setupForm(const MyMoneyAccount& acc)
// a different value
switch(acc.accountType()) {
default:
- tab = new QTab(i18n("&Deposit"));
+ tab = new TQTab(i18n("&Deposit"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit);
- tab = new QTab(i18n("&Transfer"));
+ tab = new TQTab(i18n("&Transfer"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer);
- tab = new QTab(i18n("&Withdrawal"));
+ tab = new TQTab(i18n("&Withdrawal"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal);
break;
case MyMoneyAccount::CreditCard:
- tab = new QTab(i18n("&Payment"));
+ tab = new TQTab(i18n("&Payment"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit);
- tab = new QTab(i18n("&Transfer"));
+ tab = new TQTab(i18n("&Transfer"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer);
- tab = new QTab(i18n("&Charge"));
+ tab = new TQTab(i18n("&Charge"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal);
break;
case MyMoneyAccount::Liability:
case MyMoneyAccount::Loan:
- tab = new QTab(i18n("&Decrease"));
+ tab = new TQTab(i18n("&Decrease"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit);
- tab = new QTab(i18n("&Transfer"));
+ tab = new TQTab(i18n("&Transfer"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer);
- tab = new QTab(i18n("&Increase"));
+ tab = new TQTab(i18n("&Increase"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal);
break;
case MyMoneyAccount::Asset:
case MyMoneyAccount::AssetLoan:
- tab = new QTab(i18n("&Increase"));
+ tab = new TQTab(i18n("&Increase"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit);
- tab = new QTab(i18n("&Transfer"));
+ tab = new TQTab(i18n("&Transfer"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer);
- tab = new QTab(i18n("&Decrease"));
+ tab = new TQTab(i18n("&Decrease"));
m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal);
break;
@@ -380,18 +380,18 @@ void TransactionForm::resize(int col)
updateContents();
}
-// needed to duplicate this here, as the QTable::tableSize method is private :-(
-QSize TransactionForm::tableSize(void) const
+// needed to duplicate this here, as the TQTable::tableSize method is private :-(
+TQSize TransactionForm::tableSize(void) const
{
- return QSize(columnPos(numCols()-1) + columnWidth(numCols()-1) + 10,
+ return TQSize(columnPos(numCols()-1) + columnWidth(numCols()-1) + 10,
rowPos(numRows()-1) + rowHeight(numRows()-1) + 10);
}
-QSize TransactionForm::sizeHint(void) const
+TQSize TransactionForm::tqsizeHint(void) const
{
- // I've taken this from qtable.cpp, QTable::sizeHint()
- int vmargin = QApplication::reverseLayout() ? rightMargin() : leftMargin();
- return QSize(tableSize().width() + vmargin + 5, tableSize().height() + topMargin() + 10);
+ // I've taken this from qtable.cpp, TQTable::tqsizeHint()
+ int vmargin = TQApplication::reverseLayout() ? rightMargin() : leftMargin();
+ return TQSize(tableSize().width() + vmargin + 5, tableSize().height() + topMargin() + 10);
}
void TransactionForm::adjustColumn(Column col)
@@ -403,22 +403,22 @@ void TransactionForm::adjustColumn(Column col)
if(col == ValueColumn2) {
kMyMoneyDateInput dateInput;
kMyMoneyEdit valInput;
- w = QMAX(dateInput.sizeHint().width(), valInput.sizeHint().width());
+ w = TQMAX(dateInput.tqsizeHint().width(), valInput.tqsizeHint().width());
}
if(m_transaction) {
- QString txt;
- QFontMetrics fontMetrics(KMyMoneyGlobalSettings::listCellFont());
+ TQString txt;
+ TQFontMetrics fontMetrics(KMyMoneyGlobalSettings::listCellFont());
// scan through the rows
for ( int i = numRows()-1; i >= 0; --i ) {
int align;
m_transaction->formCellText(txt, align, i, static_cast<int>(col), 0);
- QWidget* cw = cellWidget(i, col);
+ TQWidget* cw = cellWidget(i, col);
if(cw) {
- w = QMAX(w, cw->sizeHint().width()+10);
+ w = TQMAX(w, cw->tqsizeHint().width()+10);
}
- w = QMAX(w, fontMetrics.width(txt)+10);
+ w = TQMAX(w, fontMetrics.width(txt)+10);
}
}
@@ -426,22 +426,22 @@ void TransactionForm::adjustColumn(Column col)
setColumnWidth( col, w );
}
-void TransactionForm::arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t)
+void TransactionForm::arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t)
{
t->arrangeWidgetsInForm(editWidgets);
resize(ValueColumn1);
}
-void TransactionForm::tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const
+void TransactionForm::tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const
{
t->tabOrderInForm(tabOrderWidgets);
}
-void TransactionForm::removeEditWidgets(QMap<QString, QWidget*>& editWidgets)
+void TransactionForm::removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets)
{
- QMap<QString, QWidget*>::iterator it;
+ TQMap<TQString, TQWidget*>::iterator it;
for(it = editWidgets.begin(); it != editWidgets.end(); ) {
- if((*it)->parentWidget() == this) {
+ if((*it)->tqparentWidget() == this) {
editWidgets.remove(it);
it = editWidgets.begin();
} else
diff --git a/kmymoney2/widgets/transactionform.h b/kmymoney2/widgets/transactionform.h
index 13116da..5c50248 100644
--- a/kmymoney2/widgets/transactionform.h
+++ b/kmymoney2/widgets/transactionform.h
@@ -21,12 +21,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtable.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qpalette.h>
-#include <qwidgetlist.h>
-#include <qtabbar.h>
+#include <tqtable.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqpalette.h>
+#include <tqwidgetlist.h>
+#include <tqtabbar.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -47,9 +47,10 @@ namespace KMyMoneyTransactionForm {
/**
* @author Thomas Baumgart
*/
-class TabBar : public QTabBar
+class TabBar : public TQTabBar
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef enum {
SignalNormal = 0, // standard signal behaviour
@@ -57,18 +58,18 @@ public:
SignalAlways // always signal selection of a tab
} SignalEmissionE;
- TabBar(QWidget* parent = 0, const char* name = 0);
+ TabBar(TQWidget* tqparent = 0, const char* name = 0);
virtual ~TabBar() {}
SignalEmissionE setSignalEmission(SignalEmissionE type);
void copyTabs(const TabBar* otabbar);
- void addTab(QTab* tab, int id);
+ void addTab(TQTab* tab, int id);
- void setIdentifier(QTab* tab, int newId);
+ void setIdentifier(TQTab* tab, int newId);
- QTab* tab(int id) const;
+ TQTab* tab(int id) const;
int currentTab(void) const;
@@ -81,7 +82,7 @@ public slots:
/**
* overridden for internal reasons, API not changed
*/
- virtual void setCurrentTab( QTab * );
+ virtual void setCurrentTab( TQTab * );
/**
* overridden for internal reasons, API not changed
@@ -100,10 +101,10 @@ private:
/**
* maps our internal action ids to those used by
* qt3. Since it does not seem possible to tell
- * qt3 to use our ids everywhere (in QAccel) we
+ * qt3 to use our ids everywhere (in TQAccel) we
* need to know which is which
*/
- QMap<int, int> m_idMap;
+ TQMap<int, int> m_idMap;
};
@@ -123,34 +124,35 @@ typedef enum {
class TransactionForm : public TransactionEditorContainer
{
Q_OBJECT
+ TQ_OBJECT
public:
- TransactionForm(QWidget *parent = 0, const char *name = 0);
+ TransactionForm(TQWidget *tqparent = 0, const char *name = 0);
virtual ~TransactionForm() {}
/**
- * Override the QTable member function to avoid display of focus
+ * Override the TQTable member function to avoid display of focus
*/
- void paintFocus(QPainter* /*p*/, const QRect& /*cr*/ ) {}
+ void paintFocus(TQPainter* /*p*/, const TQRect& /*cr*/ ) {}
- QSize tableSize(void) const;
- QSize sizeHint(void) const;
+ TQSize tableSize(void) const;
+ TQSize tqsizeHint(void) const;
void adjustColumn(Column col);
void clear(void);
- void paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
void resize(int col);
- void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t);
- void removeEditWidgets(QMap<QString, QWidget*>& editWidgets);
- void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const;
+ void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t);
+ void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const;
/**
* reimplemented to prevent normal cell selection behavior
*/
void setCurrentCell(int, int) {}
- TabBar* tabBar(QWidget* parent = 0);
+ TabBar* tabBar(TQWidget* tqparent = 0);
void setupForm(const MyMoneyAccount& acc);
@@ -158,37 +160,37 @@ public:
protected:
/**
- * reimplemented to support QWidget::WState_BlockUpdates
+ * reimplemented to support TQWidget::WState_BlockUpdates
*/
- void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
/**
* reimplemented to prevent normal mouse press behavior
*/
- void contentsMousePressEvent(QMouseEvent* ev) { ev->ignore(); }
+ void contentsMousePressEvent(TQMouseEvent* ev) { ev->ignore(); }
/**
* reimplemented to prevent normal mouse move behavior
*/
- void contentsMouseMoveEvent(QMouseEvent* ev) { ev->ignore(); }
+ void contentsMouseMoveEvent(TQMouseEvent* ev) { ev->ignore(); }
/**
* reimplemented to prevent normal mouse release behavior
*/
- void contentsMouseReleaseEvent(QMouseEvent* ev) { ev->ignore(); }
+ void contentsMouseReleaseEvent(TQMouseEvent* ev) { ev->ignore(); }
/**
* reimplemented to prevent normal mouse double click behavior
*/
- void contentsMouseDoubleClickEvent(QMouseEvent* ev) { ev->ignore(); }
+ void contentsMouseDoubleClickEvent(TQMouseEvent* ev) { ev->ignore(); }
/**
* reimplemented to prevent normal keyboard behavior
*/
- void keyPressEvent(QKeyEvent* ev) { ev->ignore(); }
+ void keyPressEvent(TQKeyEvent* ev) { ev->ignore(); }
/**
- * Override logic and use standard QFrame behaviour
+ * Override logic and use standard TQFrame behaviour
*/
bool focusNextPrevChild(bool next);
@@ -212,7 +214,7 @@ signals:
protected:
KMyMoneyRegister::Transaction* m_transaction;
- QColorGroup m_cellColorGroup;
+ TQColorGroup m_cellColorGroup;
TabBar* m_tabBar;
};
diff --git a/kmymoney2/widgets/transactionsortoption.ui b/kmymoney2/widgets/transactionsortoption.ui
index 23de01b..887be10 100644
--- a/kmymoney2/widgets/transactionsortoption.ui
+++ b/kmymoney2/widgets/transactionsortoption.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>TransactionSortOption</class>
<author>Thomas Baumgart &lt;ipwizard@users.sourceforge.net&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>TransactionSortOption</cstring>
</property>
@@ -20,9 +20,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
@@ -55,9 +55,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
@@ -73,7 +73,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>67</height>
@@ -106,7 +106,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>67</height>
@@ -115,9 +115,9 @@
</spacer>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -150,9 +150,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
@@ -168,7 +168,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>67</height>
@@ -201,7 +201,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>67</height>
@@ -221,9 +221,9 @@
</connection>
<connection>
<sender>m_availableList</sender>
- <signal>selectionChanged(QListViewItem*)</signal>
+ <signal>selectionChanged(TQListViewItem*)</signal>
<receiver>TransactionSortOption</receiver>
- <slot>slotAvailableSelected(QListViewItem*)</slot>
+ <slot>slotAvailableSelected(TQListViewItem*)</slot>
</connection>
<connection>
<sender>m_downButton</sender>
@@ -239,9 +239,9 @@
</connection>
<connection>
<sender>m_selectedList</sender>
- <signal>selectionChanged(QListViewItem*)</signal>
+ <signal>selectionChanged(TQListViewItem*)</signal>
<receiver>TransactionSortOption</receiver>
- <slot>slotSelectedSelected(QListViewItem*)</slot>
+ <slot>slotSelectedSelected(TQListViewItem*)</slot>
</connection>
<connection>
<sender>m_upButton</sender>
@@ -251,37 +251,37 @@
</connection>
<connection>
<sender>m_selectedList</sender>
- <signal>doubleClicked(QListViewItem*)</signal>
+ <signal>doubleClicked(TQListViewItem*)</signal>
<receiver>TransactionSortOption</receiver>
- <slot>toggleDirection(QListViewItem*)</slot>
+ <slot>toggleDirection(TQListViewItem*)</slot>
</connection>
<connection>
<sender>m_selectedList</sender>
- <signal>spacePressed(QListViewItem*)</signal>
+ <signal>spacePressed(TQListViewItem*)</signal>
<receiver>TransactionSortOption</receiver>
- <slot>toggleDirection(QListViewItem*)</slot>
+ <slot>toggleDirection(TQListViewItem*)</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in implementation">transactionsortoption.ui.h</include>
</includes>
-<signals>
- <signal>settingsChanged(const QString&amp;)</signal>
-</signals>
-<slots>
- <slot>setSettings( const QString &amp; settings )</slot>
- <slot>toggleDirection( QListViewItem * item )</slot>
- <slot access="protected" specifier="non virtual">slotAvailableSelected( QListViewItem * item )</slot>
- <slot access="protected" specifier="non virtual">slotSelectedSelected( QListViewItem * item )</slot>
+<Q_SIGNALS>
+ <signal>settingsChanged(const TQString&amp;)</signal>
+</Q_SIGNALS>
+<Q_SLOTS>
+ <slot>setSettings( const TQString &amp; settings )</slot>
+ <slot>toggleDirection( TQListViewItem * item )</slot>
+ <slot access="protected" specifier="non virtual">slotAvailableSelected( TQListViewItem * item )</slot>
+ <slot access="protected" specifier="non virtual">slotSelectedSelected( TQListViewItem * item )</slot>
<slot access="protected" specifier="non virtual">slotAddItem( void )</slot>
<slot access="protected" specifier="non virtual">slotRemoveItem( void )</slot>
<slot access="protected" specifier="non virtual">slotUpItem( void )</slot>
<slot access="protected" specifier="non virtual">slotDownItem( void )</slot>
-</slots>
+</Q_SLOTS>
<functions>
<function specifier="non virtual">init()</function>
- <function access="protected" specifier="non virtual" returnType="QListViewItem *">addEntry( KListView * p, QListViewItem * after, int idx )</function>
- <function specifier="non virtual" returnType="QString">settings( void ) const</function>
+ <function access="protected" specifier="non virtual" returnType="TQListViewItem *">addEntry( KListView * p, TQListViewItem * after, int idx )</function>
+ <function specifier="non virtual" returnType="TQString">settings( void ) const</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/widgets/transactionsortoption.ui.h b/kmymoney2/widgets/transactionsortoption.ui.h
index 3784e0b..fe01eb2 100644
--- a/kmymoney2/widgets/transactionsortoption.ui.h
+++ b/kmymoney2/widgets/transactionsortoption.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
@@ -27,19 +27,19 @@
void TransactionSortOption::init()
{
KIconLoader* il = KGlobal::iconLoader();
- m_addButton->setIconSet(QIconSet(il->loadIcon("1rightarrow", KIcon::Small, KIcon::SizeSmall)));
- m_removeButton->setIconSet(QIconSet(il->loadIcon("1leftarrow", KIcon::Small, KIcon::SizeSmall)));
- m_upButton->setIconSet(QIconSet(il->loadIcon("1uparrow", KIcon::Small, KIcon::SizeSmall)));
- m_downButton->setIconSet(QIconSet(il->loadIcon("1downarrow", KIcon::Small, KIcon::SizeSmall)));
+ m_addButton->setIconSet(TQIconSet(il->loadIcon("1rightarrow", KIcon::Small, KIcon::SizeSmall)));
+ m_removeButton->setIconSet(TQIconSet(il->loadIcon("1leftarrow", KIcon::Small, KIcon::SizeSmall)));
+ m_upButton->setIconSet(TQIconSet(il->loadIcon("1uparrow", KIcon::Small, KIcon::SizeSmall)));
+ m_downButton->setIconSet(TQIconSet(il->loadIcon("1downarrow", KIcon::Small, KIcon::SizeSmall)));
// don't allow sorting of the selected entries
m_selectedList->setSortColumn(-1);
// defaults to "post date, value" sorting
- // setSettings(QString("1,4"));
- setSettings(QString());
+ // setSettings(TQString("1,4"));
+ setSettings(TQString());
- QListViewItem* p;
+ TQListViewItem* p;
if((p = m_availableList->firstChild()) != 0) {
m_availableList->setSelected(p, true);
}
@@ -58,17 +58,17 @@ void TransactionSortOption::init()
* it exists in @p settings without @a EntryOrderSort being present, it
* will add @a EntryOrderSort.
*/
-void TransactionSortOption::setSettings(const QString& settings)
+void TransactionSortOption::setSettings(const TQString& settings)
{
m_availableList->clear();
m_selectedList->clear();
- QStringList list = QStringList::split(',', settings);
- QMap<int, bool> selectedMap;
+ TQStringList list = TQStringList::split(',', settings);
+ TQMap<int, bool> selectedMap;
// fill selected list
- QStringList::const_iterator it_s;
- QListViewItem* last = 0;
+ TQStringList::const_iterator it_s;
+ TQListViewItem* last = 0;
int dateSign = 1;
for(it_s = list.begin(); it_s != list.end(); ++it_s) {
int val = (*it_s).toInt();
@@ -82,22 +82,22 @@ void TransactionSortOption::setSettings(const QString& settings)
}
// make sure to create EntryOrderSort if missing but required
- if(selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end()
- && selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) {
+ if(selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end()
+ && selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) {
int val = dateSign * static_cast<int>(KMyMoneyRegister::EntryOrderSort);
selectedMap[static_cast<int>(KMyMoneyRegister::EntryOrderSort)] = true;
last = addEntry(m_selectedList, last, val);
}
// fill available list
- QMap<int, bool>::const_iterator it_m;
+ TQMap<int, bool>::const_iterator it_m;
for(int i = static_cast<int>(KMyMoneyRegister::PostDateSort);
i < static_cast<int>(KMyMoneyRegister::MaxSortFields); ++i) {
// Never add EntryDateSort
if(i == static_cast<int>(KMyMoneyRegister::EntryDateSort))
continue;
// Only add those, that are not present in the list of selected items
- if(selectedMap.find(i) == selectedMap.end()) {
+ if(selectedMap.tqfind(i) == selectedMap.end()) {
int val = i;
if(i == static_cast<int>(KMyMoneyRegister::ValueSort))
val = -val;
@@ -106,16 +106,16 @@ void TransactionSortOption::setSettings(const QString& settings)
}
}
-QListViewItem* TransactionSortOption::addEntry( KListView * p, QListViewItem* after, int idx )
+TQListViewItem* TransactionSortOption::addEntry( KListView * p, TQListViewItem* after, int idx )
{
- QString txt = KMyMoneyRegister::sortOrderToText(static_cast<KMyMoneyRegister::TransactionSortField>(abs(idx)));
+ TQString txt = KMyMoneyRegister::sortOrderToText(static_cast<KMyMoneyRegister::TransactionSortField>(abs(idx)));
if(txt.isEmpty())
txt = "Unknown"; // i18n should be handled in sortOptionToText()
return new SortOptionListItem(p, after, txt, idx);
}
-void TransactionSortOption::toggleDirection(QListViewItem* item)
+void TransactionSortOption::toggleDirection(TQListViewItem* item)
{
SortOptionListItem* p = dynamic_cast<SortOptionListItem*>(item);
if(p) {
@@ -124,18 +124,18 @@ void TransactionSortOption::toggleDirection(QListViewItem* item)
}
}
-QString TransactionSortOption::settings( void ) const
+TQString TransactionSortOption::settings( void ) const
{
- QString rc;
+ TQString rc;
SortOptionListItem* item = dynamic_cast<SortOptionListItem*>(m_selectedList->firstChild());
while(item) {
int option = KMyMoneyRegister::textToSortOrder(item->text(0));
// if we look at the EntryOrderSort option, we have to make
// sure, that the EntryDateSort is prepended
if(option == KMyMoneyRegister::EntryOrderSort) {
- rc += QString::number(static_cast<int>(KMyMoneyRegister::EntryDateSort)*item->direction())+",";
+ rc += TQString::number(static_cast<int>(KMyMoneyRegister::EntryDateSort)*item->direction())+",";
}
- rc += QString::number(KMyMoneyRegister::textToSortOrder(item->text(0))*item->direction());
+ rc += TQString::number(KMyMoneyRegister::textToSortOrder(item->text(0))*item->direction());
item = dynamic_cast<SortOptionListItem*>(item->itemBelow());
if(item != 0)
rc += ",";
@@ -143,20 +143,20 @@ QString TransactionSortOption::settings( void ) const
return rc;
}
-void TransactionSortOption::slotAvailableSelected( QListViewItem * item )
+void TransactionSortOption::slotAvailableSelected( TQListViewItem * item )
{
m_addButton->setEnabled(item != 0);
m_removeButton->setDisabled(true);
m_upButton->setDisabled(true);
m_downButton->setDisabled(true);
- QListViewItem* p = m_selectedList->currentItem();
+ TQListViewItem* p = m_selectedList->currentItem();
if(p) {
m_selectedList->setSelected(p, false);
}
}
-void TransactionSortOption::slotSelectedSelected( QListViewItem * item )
+void TransactionSortOption::slotSelectedSelected( TQListViewItem * item )
{
m_addButton->setDisabled(true);
m_removeButton->setEnabled(item != 0);
@@ -168,7 +168,7 @@ void TransactionSortOption::slotSelectedSelected( QListViewItem * item )
m_downButton->setEnabled(false);
}
- QListViewItem* p = m_availableList->currentItem();
+ TQListViewItem* p = m_availableList->currentItem();
if(p) {
m_availableList->setSelected(p, false);
}
@@ -176,9 +176,9 @@ void TransactionSortOption::slotSelectedSelected( QListViewItem * item )
void TransactionSortOption::slotAddItem( void )
{
- QListViewItem* item;
+ TQListViewItem* item;
if((item = m_availableList->currentItem()) != 0) {
- QListViewItem* next = item->itemBelow();
+ TQListViewItem* next = item->itemBelow();
if(!next)
next = item->itemAbove();
m_availableList->takeItem(item);
@@ -194,9 +194,9 @@ void TransactionSortOption::slotAddItem( void )
void TransactionSortOption::slotRemoveItem( void )
{
- QListViewItem* item;
+ TQListViewItem* item;
if((item = m_selectedList->currentItem()) != 0) {
- QListViewItem* next = item->itemBelow();
+ TQListViewItem* next = item->itemBelow();
if(!next)
next = item->itemAbove();
m_selectedList->takeItem(item);
@@ -212,9 +212,9 @@ void TransactionSortOption::slotRemoveItem( void )
void TransactionSortOption::slotUpItem( void )
{
- QListViewItem* item;
+ TQListViewItem* item;
if((item = m_selectedList->currentItem()) != 0) {
- QListViewItem* prev = item->itemAbove();
+ TQListViewItem* prev = item->itemAbove();
if(prev) {
prev->moveItem(item);
m_selectedList->setCurrentItem(item);
@@ -228,9 +228,9 @@ void TransactionSortOption::slotUpItem( void )
void TransactionSortOption::slotDownItem( void )
{
- QListViewItem* item;
+ TQListViewItem* item;
if((item = m_selectedList->currentItem()) != 0) {
- QListViewItem* next = item->itemBelow();
+ TQListViewItem* next = item->itemBelow();
if(next) {
item->moveItem(next);
m_selectedList->setCurrentItem(item);