summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views')
-rw-r--r--kmymoney2/views/kaccountsview.cpp146
-rw-r--r--kmymoney2/views/kaccountsview.h37
-rw-r--r--kmymoney2/views/kaccountsviewdecl.ui33
-rw-r--r--kmymoney2/views/kbudgetview.cpp222
-rw-r--r--kmymoney2/views/kbudgetview.h37
-rw-r--r--kmymoney2/views/kbudgetviewdecl.ui44
-rw-r--r--kmymoney2/views/kcategoriesview.cpp84
-rw-r--r--kmymoney2/views/kcategoriesview.h23
-rw-r--r--kmymoney2/views/kcategoriesviewdecl.ui27
-rw-r--r--kmymoney2/views/kforecastview.cpp160
-rw-r--r--kmymoney2/views/kforecastview.h11
-rw-r--r--kmymoney2/views/kforecastviewdecl.ui74
-rw-r--r--kmymoney2/views/kgloballedgerview.cpp336
-rw-r--r--kmymoney2/views/kgloballedgerview.h104
-rw-r--r--kmymoney2/views/khomeview.cpp558
-rw-r--r--kmymoney2/views/khomeview.h33
-rw-r--r--kmymoney2/views/kinstitutionsview.cpp94
-rw-r--r--kmymoney2/views/kinstitutionsview.h23
-rw-r--r--kmymoney2/views/kinstitutionsviewdecl.ui19
-rw-r--r--kmymoney2/views/kinvestmentlistitem.cpp66
-rw-r--r--kmymoney2/views/kinvestmentlistitem.h18
-rw-r--r--kmymoney2/views/kinvestmentview.cpp50
-rw-r--r--kmymoney2/views/kinvestmentview.h11
-rw-r--r--kmymoney2/views/kinvestmentviewdecl.ui15
-rw-r--r--kmymoney2/views/kmymoneyfile.cpp2
-rw-r--r--kmymoney2/views/kmymoneyfile.h2
-rw-r--r--kmymoney2/views/kmymoneytransaction.cpp2
-rw-r--r--kmymoney2/views/kmymoneytransaction.h6
-rw-r--r--kmymoney2/views/kmymoneyview.cpp564
-rw-r--r--kmymoney2/views/kmymoneyview.h98
-rw-r--r--kmymoney2/views/kpayeesview.cpp288
-rw-r--r--kmymoney2/views/kpayeesview.h65
-rw-r--r--kmymoney2/views/kpayeesviewdecl.ui94
-rwxr-xr-xkmymoney2/views/kreportsview.cpp288
-rwxr-xr-xkmymoney2/views/kreportsview.h69
-rw-r--r--kmymoney2/views/kscheduledlistitem.cpp40
-rw-r--r--kmymoney2/views/kscheduledlistitem.h20
-rw-r--r--kmymoney2/views/kscheduledview.cpp118
-rw-r--r--kmymoney2/views/kscheduledview.h31
-rw-r--r--kmymoney2/views/kscheduledviewdecl.ui16
40 files changed, 1979 insertions, 1949 deletions
diff --git a/kmymoney2/views/kaccountsview.cpp b/kmymoney2/views/kaccountsview.cpp
index b0800cd..f84bf63 100644
--- a/kmymoney2/views/kaccountsview.cpp
+++ b/kmymoney2/views/kaccountsview.cpp
@@ -17,10 +17,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qtabwidget.h>
-#include <qpixmap.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -43,8 +43,8 @@
#include "../kmymoney2.h"
-KMyMoneyAccountIconItem::KMyMoneyAccountIconItem(QIconView *parent, const MyMoneyAccount& account) :
- KIconViewItem(parent, account.name()),
+KMyMoneyAccountIconItem::KMyMoneyAccountIconItem(TQIconView *tqparent, const MyMoneyAccount& account) :
+ KIconViewItem(tqparent, account.name()),
m_account(account),
m_reconcileFlag(false)
{
@@ -68,29 +68,29 @@ void KMyMoneyAccountIconItem::updateAccount(const MyMoneyAccount& account)
setPixmap(account.accountPixmap(m_reconcileFlag));
}
-KAccountsView::KAccountsView(QWidget *parent, const char *name) :
- KAccountsViewDecl(parent,name),
+KAccountsView::KAccountsView(TQWidget *tqparent, const char *name) :
+ KAccountsViewDecl(tqparent,name),
m_assetItem(0),
m_liabilityItem(0)
{
// create the searchline widget
- // and insert it into the existing layout
- m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->parentWidget());
- QVBoxLayout* layout = dynamic_cast<QVBoxLayout*>(m_accountTree->parentWidget()->layout());
- if(layout) {
- layout->insertWidget(0, m_searchWidget);
+ // and insert it into the existing tqlayout
+ m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->tqparentWidget());
+ TQVBoxLayout* tqlayout = dynamic_cast<TQVBoxLayout*>(m_accountTree->tqparentWidget()->tqlayout());
+ if(tqlayout) {
+ tqlayout->insertWidget(0, m_searchWidget);
}
// setup icons for collapse and expand button
KIconLoader *ic = KGlobal::iconLoader();
KGuiItem collapseGuiItem("",
- QIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)),
- QString(),
- QString());
+ TQIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)),
+ TQString(),
+ TQString());
KGuiItem expandGuiItem("",
- QIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)),
- QString(),
- QString());
+ TQIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)),
+ TQString(),
+ TQString());
m_collapseButton->setGuiItem(collapseGuiItem);
m_expandButton->setGuiItem(expandGuiItem);
@@ -101,21 +101,21 @@ KAccountsView::KAccountsView(QWidget *parent, const char *name) :
config->setGroup("Last Use Settings");
m_tab->setCurrentPage(config->readNumEntry("KAccountsView_LastType", 0));
- connect(m_tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotTabChanged(QWidget*)));
+ connect(m_tab, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotTabChanged(TQWidget*)));
- connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateNetWorth(void)));
- connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateNetWorth(void)));
+ connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)));
- connect(m_accountIcons, SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(slotSelectIcon(QIconViewItem*)));
- connect(m_accountIcons, SIGNAL(rightButtonClicked(QIconViewItem*, const QPoint&)), this, SLOT(slotOpenContext(QIconViewItem*)));
- connect(m_accountIcons, SIGNAL(executed(QIconViewItem*)), this, SLOT(slotOpenObject(QIconViewItem*)));
+ connect(m_accountIcons, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectIcon(TQIconViewItem*)));
+ connect(m_accountIcons, TQT_SIGNAL(rightButtonClicked(TQIconViewItem*, const TQPoint&)), this, TQT_SLOT(slotOpenContext(TQIconViewItem*)));
+ connect(m_accountIcons, TQT_SIGNAL(executed(TQIconViewItem*)), this, TQT_SLOT(slotOpenObject(TQIconViewItem*)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts()));
- connect(m_collapseButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse()));
- connect(m_expandButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts()));
+ connect(m_collapseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse()));
+ connect(m_expandButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse()));
}
KAccountsView::~KAccountsView()
@@ -137,7 +137,7 @@ void KAccountsView::slotLoadAccounts(void)
slotTabChanged(m_tab->currentPage());
}
-void KAccountsView::slotTabChanged(QWidget* _tab)
+void KAccountsView::slotTabChanged(TQWidget* _tab)
{
AccountsViewTab tab = static_cast<AccountsViewTab>(m_tab->indexOf(_tab));
@@ -196,7 +196,7 @@ void KAccountsView::polish(void)
{
// don't forget base class implementation
KAccountsViewDecl::polish();
- m_accountTree->setResizeMode(QListView::LastColumn);
+ m_accountTree->setResizeMode(TQListView::LastColumn);
m_accountTree->restoreLayout("Account View Settings");
}
@@ -222,7 +222,7 @@ void KAccountsView::loadIconView(void)
::timetrace("start load accounts icon view");
// remember the positions of the icons
- QMap<QString, QPoint> posMap;
+ TQMap<TQString, TQPoint> posMap;
KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(m_accountIcons->firstItem());
for(;p; p = dynamic_cast<KMyMoneyAccountIconItem*>(p->nextItem()))
posMap[p->itemObject().id()] = p->pos();
@@ -232,16 +232,16 @@ void KAccountsView::loadIconView(void)
// clear the current contents and recreate it
m_accountIcons->clear();
- QMap<QString, MyMoneyAccount> accountMap;
+ TQMap<TQString, MyMoneyAccount> accountMap;
MyMoneyFile* file = MyMoneyFile::instance();
// get account list and sort by name
- QValueList<MyMoneyAccount> alist;
+ TQValueList<MyMoneyAccount> alist;
file->accountList(alist);
- QValueList<MyMoneyAccount>::const_iterator it_a;
+ TQValueList<MyMoneyAccount>::const_iterator it_a;
for(it_a = alist.begin(); it_a != alist.end(); ++it_a) {
- accountMap[QString("%1-%2").arg((*it_a).name()).arg((*it_a).id())] = *it_a;
+ accountMap[TQString("%1-%2").tqarg((*it_a).name()).tqarg((*it_a).id())] = *it_a;
}
bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked()
@@ -249,12 +249,12 @@ void KAccountsView::loadIconView(void)
bool existNewIcons = false;
// parse list and add all asset and liability accounts
- QMap<QString, MyMoneyAccount>::const_iterator it;
+ TQMap<TQString, MyMoneyAccount>::const_iterator it;
for(it = accountMap.begin(); it != accountMap.end(); ++it) {
- QPoint loc;
+ TQPoint loc;
if((*it).isClosed() && !showClosedAccounts)
continue;
- const QString& pos = (*it).value("kmm-iconpos");
+ const TQString& pos = (*it).value("kmm-iconpos");
KMyMoneyAccountIconItem* item;
switch((*it).accountGroup()) {
case MyMoneyAccount::Equity:
@@ -271,12 +271,12 @@ void KAccountsView::loadIconView(void)
// if we have a position stored with the object and no other
// idea of it's current position, then take the one
// stored inside the object. Also, turn off auto arrangement
- if(!pos.isEmpty() && posMap[(*it).id()] == QPoint()) {
+ if(!pos.isEmpty() && posMap[(*it).id()] == TQPoint()) {
posMap[(*it).id()] = point(pos);
}
loc = posMap[(*it).id()];
- if(loc == QPoint()) {
+ if(loc == TQPoint()) {
existNewIcons = true;
} else {
m_accountIcons->setAutoArrange(false);
@@ -286,7 +286,7 @@ void KAccountsView::loadIconView(void)
if((*it).id() == m_reconciliationAccount.id())
item->setReconciliation(true);
- if(loc != QPoint()) {
+ if(loc != TQPoint()) {
item->move(loc);
}
break;
@@ -311,15 +311,15 @@ void KAccountsView::loadIconView(void)
void KAccountsView::loadListView(void)
{
- QMap<QString, bool> isOpen;
+ TQMap<TQString, bool> isOpen;
::timetrace("start load accounts list view");
// remember the id of the current selected item
KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem();
- QString selectedItemId = (item) ? item->id() : QString();
+ TQString selectedItemId = (item) ? item->id() : TQString();
// keep a map of all 'expanded' accounts
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item && item->isOpen()) {
@@ -329,7 +329,7 @@ void KAccountsView::loadListView(void)
}
// remember the upper left corner of the viewport
- QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_accountTree->setUpdatesEnabled(false);
@@ -344,9 +344,9 @@ void KAccountsView::loadListView(void)
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneySecurity> slist = file->currencyList();
+ TQValueList<MyMoneySecurity> slist = file->currencyList();
slist += file->securityList();
- QValueList<MyMoneySecurity>::const_iterator it_s;
+ TQValueList<MyMoneySecurity>::const_iterator it_s;
for(it_s = slist.begin(); it_s != slist.end(); ++it_s) {
m_securityMap[(*it_s).id()] = *it_s;
}
@@ -388,13 +388,13 @@ void KAccountsView::loadListView(void)
// scan through the list of accounts and re-expand those that were
// expanded and re-select the one that was probably selected before
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item) {
if(item->id() == selectedItemId)
m_accountTree->setSelected(item, true);
- if(isOpen.find(item->id()) != isOpen.end())
+ if(isOpen.tqfind(item->id()) != isOpen.end())
item->setOpen(true);
}
++it_lvi;
@@ -403,11 +403,11 @@ void KAccountsView::loadListView(void)
// reposition viewport
m_accountTree->setContentsPos(startPoint.x(), startPoint.y());
- m_searchWidget->searchLine()->updateSearch(QString::null);
+ m_searchWidget->searchLine()->updateSearch(TQString());
// turn updates back on
m_accountTree->setUpdatesEnabled(true);
- m_accountTree->repaintContents();
+ m_accountTree->tqrepaintContents();
// and in case we need to show things expanded, we'll do so
if(KMyMoneyGlobalSettings::showAccountsExpanded())
@@ -419,7 +419,7 @@ void KAccountsView::loadListView(void)
::timetrace("done load accounts list view");
}
-bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList)
+bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList)
{
MyMoneyFile* file = MyMoneyFile::instance();
@@ -427,10 +427,10 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri
bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked()
|| !KMyMoneyGlobalSettings::hideClosedAccounts();
- QStringList::const_iterator it_a;
+ TQStringList::const_iterator it_a;
for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) {
const MyMoneyAccount& acc = file->account(*it_a);
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
MyMoneySecurity security = file->baseCurrency();
try {
if(acc.isInvest()) {
@@ -452,7 +452,7 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri
delete e;
}
- KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security);
+ KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security);
if(acc.id() == m_reconciliationAccount.id())
item->setReconciliation(true);
@@ -478,14 +478,14 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri
return unused;
}
-void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance)
+void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance)
{
Q_UNUSED(reconciliationDate);
Q_UNUSED(endingBalance);
// scan through the list of accounts and mark all non
// expanded and re-select the one that was probably selected before
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
KMyMoneyAccountTreeItem* item;
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
@@ -506,7 +506,7 @@ void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate&
if(!acc.id().isEmpty()) {
// scan through the list of accounts and mark
// the one that is currently reconciled
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item && item->itemObject().id() == acc.id()) {
@@ -534,19 +534,19 @@ void KAccountsView::slotUpdateNetWorth(void)
MyMoneyMoney netWorth = m_assetItem->totalValue() - m_liabilityItem->totalValue();
- QString s(i18n("Net Worth: "));
+ TQString s(i18n("Net Worth: "));
// FIXME figure out how to deal with the approximate
// if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id())))
// s += "~ ";
- s.replace(QString(" "), QString("&nbsp;"));
+ s.tqreplace(TQString(" "), TQString("&nbsp;"));
if(netWorth.isNegative()) {
s += "<b><font color=\"red\">";
}
const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency();
- QString v(netWorth.formatMoney(sec));
- s += v.replace(QString(" "), QString("&nbsp;"));
+ TQString v(netWorth.formatMoney(sec));
+ s += v.tqreplace(TQString(" "), TQString("&nbsp;"));
if(netWorth.isNegative()) {
s += "</font></b>";
}
@@ -560,42 +560,42 @@ KMyMoneyAccountIconItem* KAccountsView::selectedIcon(void) const
return dynamic_cast<KMyMoneyAccountIconItem*>(m_accountIcons->currentItem());
}
-void KAccountsView::slotSelectIcon(QIconViewItem* item)
+void KAccountsView::slotSelectIcon(TQIconViewItem* item)
{
KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item);
if(p)
emit selectObject(p->itemObject());
}
-void KAccountsView::slotOpenContext(QIconViewItem* item)
+void KAccountsView::slotOpenContext(TQIconViewItem* item)
{
KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item);
if(p)
emit openContextMenu(p->itemObject());
}
-void KAccountsView::slotOpenObject(QIconViewItem* item)
+void KAccountsView::slotOpenObject(TQIconViewItem* item)
{
KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item);
if(p)
emit openObject(p->itemObject());
}
-QString KAccountsView::point(const QPoint& val) const
+TQString KAccountsView::point(const TQPoint& val) const
{
- return QString("%1;%2").arg(val.x()).arg(val.y());
+ return TQString("%1;%2").tqarg(val.x()).tqarg(val.y());
}
-QPoint KAccountsView::point(const QString& val) const
+TQPoint KAccountsView::point(const TQString& val) const
{
- QRegExp exp("(\\d+);(\\d+)");
+ TQRegExp exp("(\\d+);(\\d+)");
int x = 0;
int y = 0;
if(exp.search(val) != -1) {
x = exp.cap(1).toInt();
y = exp.cap(2).toInt();
}
- return QPoint(x, y);
+ return TQPoint(x, y);
}
void KAccountsView::slotUpdateIconPos(unsigned int action)
diff --git a/kmymoney2/views/kaccountsview.h b/kmymoney2/views/kaccountsview.h
index ed30ac5..33a787c 100644
--- a/kmymoney2/views/kaccountsview.h
+++ b/kmymoney2/views/kaccountsview.h
@@ -49,12 +49,12 @@ public:
/**
* Constructor to be used to construct an account icon object.
*
- * @param parent pointer to the KIconView object this entry should be
+ * @param tqparent pointer to the KIconView object this entry should be
* added to.
* @param account const reference to MyMoneyAccount for which
* the KIconView entry is constructed
*/
- KMyMoneyAccountIconItem(QIconView *parent, const MyMoneyAccount& account);
+ KMyMoneyAccountIconItem(TQIconView *tqparent, const MyMoneyAccount& account);
~KMyMoneyAccountIconItem();
/**
@@ -87,10 +87,11 @@ private:
class KAccountsView : public KAccountsViewDecl
{
Q_OBJECT
+ TQ_OBJECT
private:
public:
- KAccountsView(QWidget *parent=0, const char *name=0);
+ KAccountsView(TQWidget *tqparent=0, const char *name=0);
virtual ~KAccountsView();
public slots:
@@ -103,8 +104,8 @@ public slots:
void show(void);
/**
- * Override the base class behaviour to restore the layout. Do not
- * do this in show() because show() itself may change the layout
+ * Override the base class behaviour to restore the tqlayout. Do not
+ * do this in show() because show() itself may change the tqlayout
* in undesired ways.
*/
void polish(void);
@@ -117,7 +118,7 @@ public slots:
*/
void slotUpdateIconPos(unsigned int action);
- void slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance);
+ void slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance);
protected:
typedef enum {
@@ -136,7 +137,7 @@ protected:
void loadListView(void);
void loadIconView(void);
- bool loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList);
+ bool loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList);
/**
* This method returns a pointer to the currently selected
@@ -144,15 +145,15 @@ protected:
*/
KMyMoneyAccountIconItem* selectedIcon(void) const;
- QPoint point(const QString& str) const;
- QString point(const QPoint& val) const;
+ TQPoint point(const TQString& str) const;
+ TQString point(const TQPoint& val) const;
protected slots:
void slotUpdateNetWorth(void);
- void slotTabChanged(QWidget*);
- void slotSelectIcon(QIconViewItem* item);
- void slotOpenContext(QIconViewItem* item);
- void slotOpenObject(QIconViewItem* item);
+ void slotTabChanged(TQWidget*);
+ void slotSelectIcon(TQIconViewItem* item);
+ void slotOpenContext(TQIconViewItem* item);
+ void slotOpenObject(TQIconViewItem* item);
void slotExpandCollapse(void);
signals:
@@ -181,17 +182,17 @@ 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);
private:
MyMoneyAccount m_reconciliationAccount;
- QMap<QString, MyMoneySecurity> m_securityMap;
- QMap<QString, unsigned long> m_transactionCountMap;
+ TQMap<TQString, MyMoneySecurity> m_securityMap;
+ TQMap<TQString, unsigned long> m_transactionCountMap;
KMyMoneyAccountTreeItem* m_assetItem;
KMyMoneyAccountTreeItem* m_liabilityItem;
diff --git a/kmymoney2/views/kaccountsviewdecl.ui b/kmymoney2/views/kaccountsviewdecl.ui
index c8bb5ac..922844f 100644
--- a/kmymoney2/views/kaccountsviewdecl.ui
+++ b/kmymoney2/views/kaccountsviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KAccountsViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KAccountsViewDecl</cstring>
</property>
@@ -19,11 +19,11 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>m_tab</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -45,9 +45,9 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -85,7 +85,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>515</width>
<height>20</height>
@@ -96,7 +96,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -127,7 +127,7 @@
</vbox>
</widget>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_hiddenCategories</cstring>
</property>
@@ -135,9 +135,9 @@
<string>Note: Unused categories are not shown as selected by settings.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@@ -153,18 +153,18 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>367</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_totalProfitsLabel</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@@ -176,7 +176,7 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter|AlignRight</set>
</property>
<property name="hAlign" stdset="0">
@@ -200,5 +200,8 @@
<slot>slotCollapseAll()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include>
+</includes>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kbudgetview.cpp b/kmymoney2/views/kbudgetview.cpp
index a8d5bc1..c2bf5dc 100644
--- a/kmymoney2/views/kbudgetview.cpp
+++ b/kmymoney2/views/kbudgetview.cpp
@@ -19,17 +19,17 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qpixmap.h>
-#include <qtabwidget.h>
-#include <qlistbox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqpixmap.h>
+#include <tqtabwidget.h>
+#include <tqlistbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqtooltip.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -61,12 +61,12 @@
#include "../kmymoney2.h"
// *** KBudgetListItem Implementation ***
-KBudgetListItem::KBudgetListItem(KListView *parent, const MyMoneyBudget& budget) :
- KListViewItem(parent),
+KBudgetListItem::KBudgetListItem(KListView *tqparent, const MyMoneyBudget& budget) :
+ KListViewItem(tqparent),
m_budget(budget)
{
setText(0, budget.name());
- setText(1, QString("%1").arg(budget.budgetStart().year()));
+ setText(1, TQString("%1").tqarg(budget.budgetStart().year()));
// allow in column rename
setRenameEnabled(0, true);
@@ -76,18 +76,18 @@ KBudgetListItem::~KBudgetListItem()
{
}
-void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+void KBudgetListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
p->setFont(KMyMoneyGlobalSettings::listCellFont());
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
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());
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
@@ -95,8 +95,8 @@ void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column,
const int KBudgetView::m_iBudgetYearsAhead = 5;
const int KBudgetView::m_iBudgetYearsBack = 3;
-KBudgetView::KBudgetView(QWidget *parent, const char *name ) :
- KBudgetViewDecl(parent,name),
+KBudgetView::KBudgetView(TQWidget *tqparent, const char *name ) :
+ KBudgetViewDecl(tqparent,name),
m_needReload(false),
m_inSelection(false)
{
@@ -104,73 +104,73 @@ KBudgetView::KBudgetView(QWidget *parent, const char *name ) :
m_budgetList->setSorting(0);
KIconLoader* il = KGlobal::iconLoader();
- KGuiItem newButtenItem( QString(""),
- QIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)),
+ KGuiItem newButtenItem( TQString(""),
+ TQIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)),
i18n("Creates a new budget"),
i18n("Use this to create a new empty budget."));
m_newButton->setGuiItem(newButtenItem);
- QToolTip::add(m_newButton, newButtenItem.toolTip());
+ TQToolTip::add(m_newButton, newButtenItem.toolTip());
- KGuiItem renameButtenItem( QString(""),
- QIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)),
+ KGuiItem renameButtenItem( TQString(""),
+ TQIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)),
i18n("Rename the current selected budget"),
i18n("Use this to start renaming the selected budget."));
m_renameButton->setGuiItem(renameButtenItem);
- QToolTip::add(m_renameButton, renameButtenItem.toolTip());
+ TQToolTip::add(m_renameButton, renameButtenItem.toolTip());
- KGuiItem deleteButtenItem( QString(""),
- QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)),
+ KGuiItem deleteButtenItem( TQString(""),
+ TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)),
i18n("Delete the current selected budget"),
i18n("Use this to delete the selected budget."));
m_deleteButton->setGuiItem(deleteButtenItem);
- QToolTip::add(m_deleteButton, deleteButtenItem.toolTip());
+ TQToolTip::add(m_deleteButton, deleteButtenItem.toolTip());
- KGuiItem updateButtenItem( QString(""),
- QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)),
+ KGuiItem updateButtenItem( TQString(""),
+ TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)),
i18n("Accepts the entered values and stores the budget"),
i18n("Use this to store the modified data."));
m_updateButton->setGuiItem(updateButtenItem);
- QToolTip::add(m_updateButton, updateButtenItem.toolTip());
+ TQToolTip::add(m_updateButton, updateButtenItem.toolTip());
- KGuiItem resetButtenItem( QString(""),
- QIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)),
+ KGuiItem resetButtenItem( TQString(""),
+ TQIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)),
i18n("Revert budget to last saved state"),
i18n("Use this to discard the modified data."));
m_resetButton->setGuiItem(resetButtenItem);
- QToolTip::add(m_resetButton, resetButtenItem.toolTip());
+ TQToolTip::add(m_resetButton, resetButtenItem.toolTip());
- connect(m_budgetList, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)),
- this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(m_budgetList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenameBudget(QListViewItem*,int,const QString&)));
- connect(m_budgetList, SIGNAL(selectionChanged()), this, SLOT(slotSelectBudget()));
+ connect(m_budgetList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)),
+ this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(m_budgetList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenameBudget(TQListViewItem*,int,const TQString&)));
+ connect(m_budgetList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectBudget()));
- connect(m_cbBudgetSubaccounts, SIGNAL(clicked()), this, SLOT(cb_includesSubaccounts_clicked()));
+ connect(m_cbBudgetSubaccounts, TQT_SIGNAL(clicked()), this, TQT_SLOT(cb_includesSubaccounts_clicked()));
- connect(m_accountTree, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectAccount(QListViewItem*)));
- connect(m_accountTree, SIGNAL(valueChanged()), this, SLOT(slotRefreshHideUnusedButton()));
+ connect(m_accountTree, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectAccount(TQListViewItem*)));
+ connect(m_accountTree, TQT_SIGNAL(valueChanged()), this, TQT_SLOT(slotRefreshHideUnusedButton()));
// connect the buttons to the actions. Make sure the enabled state
// of the actions is reflected by the buttons
- connect(kmymoney2->action("budget_new"), SIGNAL(enabled(bool)), m_newButton, SLOT(setEnabled(bool)));
- connect(m_renameButton, SIGNAL(clicked()), kmymoney2->action("budget_rename"), SLOT(activate()));
- connect(kmymoney2->action("budget_rename"), SIGNAL(enabled(bool)), m_renameButton, SLOT(setEnabled(bool)));
- connect(m_deleteButton, SIGNAL(clicked()), kmymoney2->action("budget_delete"), SLOT(activate()));
- connect(kmymoney2->action("budget_delete"), SIGNAL(enabled(bool)), m_deleteButton, SLOT(setEnabled(bool)));
+ connect(kmymoney2->action("budget_new"), TQT_SIGNAL(enabled(bool)), m_newButton, TQT_SLOT(setEnabled(bool)));
+ connect(m_renameButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_rename"), TQT_SLOT(activate()));
+ connect(kmymoney2->action("budget_rename"), TQT_SIGNAL(enabled(bool)), m_renameButton, TQT_SLOT(setEnabled(bool)));
+ connect(m_deleteButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_delete"), TQT_SLOT(activate()));
+ connect(kmymoney2->action("budget_delete"), TQT_SIGNAL(enabled(bool)), m_deleteButton, TQT_SLOT(setEnabled(bool)));
- connect(m_budgetValue, SIGNAL(valuesChanged()), this, SLOT(slotBudgetedAmountChanged()));
+ connect(m_budgetValue, TQT_SIGNAL(valuesChanged()), this, TQT_SLOT(slotBudgetedAmountChanged()));
- connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewBudget()));
- connect(m_updateButton, SIGNAL(pressed()), this, SLOT(slotUpdateBudget()));
- connect(m_resetButton, SIGNAL(pressed()), this, SLOT(slotResetBudget()));
+ connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewBudget()));
+ connect(m_updateButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateBudget()));
+ connect(m_resetButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotResetBudget()));
- connect(m_hideUnusedButton, SIGNAL(toggled(bool)), this, SLOT(slotHideUnused(bool)));
+ connect(m_hideUnusedButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotHideUnused(bool)));
// setup initial state
m_newButton->setEnabled(kmymoney2->action("budget_new")->isEnabled());
m_renameButton->setEnabled(kmymoney2->action("budget_rename")->isEnabled());
m_deleteButton->setEnabled(kmymoney2->action("budget_delete")->isEnabled());
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotRefreshView()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotRefreshView()));
}
KBudgetView::~KBudgetView()
@@ -179,8 +179,8 @@ KBudgetView::~KBudgetView()
void KBudgetView::show()
{
- QTimer::singleShot(50, this, SLOT(slotRearrange()));
- QWidget::show();
+ TQTimer::singleShot(50, this, TQT_SLOT(slotRearrange()));
+ TQWidget::show();
if(m_needReload) {
slotRefreshView();
}
@@ -197,7 +197,7 @@ void KBudgetView::slotRearrange(void)
resizeEvent(0);
}
-void KBudgetView::resizeEvent(QResizeEvent* ev)
+void KBudgetView::resizeEvent(TQResizeEvent* ev)
{
// resize the register
KBudgetViewDecl::resizeEvent(ev);
@@ -212,7 +212,7 @@ void KBudgetView::slotReloadView(void)
void KBudgetView::loadBudgets(void)
{
- QString id;
+ TQString id;
::timetrace("Start KBudgetView::loadBudgets");
@@ -220,7 +220,7 @@ void KBudgetView::loadBudgets(void)
id = m_budget.id();
// remember the upper left corner of the viewport
- QPoint startPoint = m_budgetList->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_budgetList->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_budgetList->setUpdatesEnabled(false);
@@ -230,24 +230,24 @@ void KBudgetView::loadBudgets(void)
m_budgetValue->clear();
// add the correct years to the drop down list
- QDate date = QDate::currentDate(Qt::LocalTime);
+ TQDate date = TQDate::tqcurrentDate(Qt::LocalTime);
int iStartYear = date.year() - m_iBudgetYearsBack;
m_yearList.clear();
for (int i=0; i<m_iBudgetYearsAhead + m_iBudgetYearsBack; i++)
- m_yearList += QString::number(iStartYear+i);
+ m_yearList += TQString::number(iStartYear+i);
KBudgetListItem* currentItem = 0;
- QValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList();
- QValueList<MyMoneyBudget>::ConstIterator it;
+ TQValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList();
+ TQValueList<MyMoneyBudget>::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it)
{
KBudgetListItem* item = new KBudgetListItem(m_budgetList, *it);
// create a list of unique years
- if (m_yearList.findIndex(QString::number((*it).budgetStart().year())) == -1)
- m_yearList += QString::number((*it).budgetStart().year());
+ if (m_yearList.tqfindIndex(TQString::number((*it).budgetStart().year())) == -1)
+ m_yearList += TQString::number((*it).budgetStart().year());
if(item->budget().id() == id) {
m_budget = (*it);
@@ -266,7 +266,7 @@ void KBudgetView::loadBudgets(void)
// turn updates back on
m_budgetList->setUpdatesEnabled(true);
- m_budgetList->repaintContents();
+ m_budgetList->tqrepaintContents();
// reset the status of the buttons
m_updateButton->setEnabled(false);
@@ -278,9 +278,9 @@ void KBudgetView::loadBudgets(void)
::timetrace("End KBudgetView::loadBudgets");
}
-void KBudgetView::ensureBudgetVisible(const QString& id)
+void KBudgetView::ensureBudgetVisible(const TQString& id)
{
- for (QListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) {
+ for (TQListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) {
KBudgetListItem* p = dynamic_cast<KBudgetListItem*>(item);
if(p && p->budget().id() == id) {
if(p->itemAbove())
@@ -300,7 +300,7 @@ void KBudgetView::slotRefreshView(void)
{
if(isVisible()) {
if(m_inSelection)
- QTimer::singleShot(0, this, SLOT(slotRefreshView()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRefreshView()));
else {
loadBudgets();
m_needReload = false;
@@ -312,7 +312,7 @@ void KBudgetView::slotRefreshView(void)
void KBudgetView::loadAccounts(void)
{
- QMap<QString, bool> isOpen;
+ TQMap<TQString, bool> isOpen;
::timetrace("start load budget account view");
@@ -329,10 +329,10 @@ void KBudgetView::loadAccounts(void)
// remember the id of the current selected item
KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem();
- QString selectedItemId = (item) ? item->id() : QString();
+ TQString selectedItemId = (item) ? item->id() : TQString();
// keep a map of all 'expanded' accounts
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current());
if(item && item->isOpen()) {
@@ -342,7 +342,7 @@ void KBudgetView::loadAccounts(void)
}
// remember the upper left corner of the viewport
- QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_accountTree->setUpdatesEnabled(false);
@@ -368,13 +368,13 @@ void KBudgetView::loadAccounts(void)
m_accountTree->setBaseCurrency(security);
const MyMoneyAccount& income = file->income();
- QStringList incSubAcctList = income.accountList();
+ TQStringList incSubAcctList = income.accountList();
m_incomeItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, income, m_budget, security, i18n("Income"));
haveUnusedBudgets |= loadSubAccounts(m_incomeItem, incSubAcctList, m_budget);
m_incomeItem->setSelectable(false);
const MyMoneyAccount& expense = file->expense();
- QStringList expSubAcctList = expense.accountList();
+ TQStringList expSubAcctList = expense.accountList();
m_expenseItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, expense, m_budget, security, i18n("Expense"));
haveUnusedBudgets |= loadSubAccounts(m_expenseItem, expSubAcctList, m_budget);
m_expenseItem->setSelectable(false);
@@ -386,13 +386,13 @@ void KBudgetView::loadAccounts(void)
// scan through the list of accounts and re-expand those that were
// expanded and re-select the one that was probably selected before
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current());
if(item) {
if(item->id() == selectedItemId)
m_accountTree->setSelected(item, true);
- if(isOpen.find(item->id()) != isOpen.end())
+ if(isOpen.tqfind(item->id()) != isOpen.end())
item->setOpen(true);
}
++it_lvi;
@@ -403,7 +403,7 @@ void KBudgetView::loadAccounts(void)
// turn updates back on
m_accountTree->setUpdatesEnabled(true);
- m_accountTree->repaintContents();
+ m_accountTree->tqrepaintContents();
m_updateButton->setEnabled(!(selectedBudget() == m_budget));
m_resetButton->setEnabled(!(selectedBudget() == m_budget));
@@ -412,7 +412,7 @@ void KBudgetView::loadAccounts(void)
}
-bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QStringList& accountList, const MyMoneyBudget& budget)
+bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStringList& accountList, const MyMoneyBudget& budget)
{
MyMoneyFile* file = MyMoneyFile::instance();
@@ -421,24 +421,24 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString
//sort the subaccount list
//FIXME this is just a hack to order the accounts
if ( !accountList.isEmpty() ) {
- QMap<QString, MyMoneyAccount> accountMap;
- QValueList<MyMoneyAccount> alist;
+ TQMap<TQString, MyMoneyAccount> accountMap;
+ TQValueList<MyMoneyAccount> alist;
file->accountList ( alist, accountList );
accountList.clear();
- QValueList<MyMoneyAccount>::const_iterator it_ac;
+ TQValueList<MyMoneyAccount>::const_iterator it_ac;
for ( it_ac = alist.begin(); it_ac != alist.end(); ++it_ac ) {
accountMap[(*it_ac).name()] = *it_ac;
}
- QMap<QString, MyMoneyAccount>::const_iterator it_am;
+ TQMap<TQString, MyMoneyAccount>::const_iterator it_am;
for ( it_am = accountMap.begin(); it_am != accountMap.end(); ++it_am ) {
accountList.prepend((*it_am).id()); //use prepend instead of append otherwise account show up in ascending order
}
}
- QStringList::const_iterator it_a;
+ TQStringList::const_iterator it_a;
for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) {
const MyMoneyAccount& acc = file->account(*it_a);
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
MyMoneySecurity security = file->baseCurrency();
try {
if(acc.isInvest()) {
@@ -460,12 +460,12 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString
delete e;
}
- QStringList subAcctList = acc.accountList();
- KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(parent, acc, budget, prices, security);
+ TQStringList subAcctList = acc.accountList();
+ KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(tqparent, acc, budget, prices, security);
unused |= loadSubAccounts(item, subAcctList, budget);
// no child accounts and no value assigned to this account
- bool thisUnused = (!item->firstChild()) && (!budget.contains(acc.id()));
+ bool thisUnused = (!item->firstChild()) && (!budget.tqcontains(acc.id()));
// In case of a budget which is unused and we are requested to suppress
// the display of those,
@@ -485,8 +485,8 @@ void KBudgetView::askSave(void)
// check if the content of a currently selected budget was modified
// and ask to store the data
if (m_updateButton->isEnabled()) {
- if (KMessageBox::questionYesNo(this, QString("<qt>%1</qt>").arg(
- i18n("Do you want to save the changes for <b>%1</b>").arg(m_budget.name())),
+ if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg(
+ i18n("Do you want to save the changes for <b>%1</b>").tqarg(m_budget.name())),
i18n("Save changes")) == KMessageBox::Yes) {
m_inSelection = true;
slotUpdateBudget();
@@ -517,7 +517,7 @@ void KBudgetView::slotSelectBudget(void)
m_assignmentBox->setEnabled(false);
m_budget = MyMoneyBudget();
- QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected);
+ TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected);
item = dynamic_cast<KBudgetListItem*>(it_l.current());
if(item) {
m_budget = item->budget();
@@ -527,7 +527,7 @@ void KBudgetView::slotSelectBudget(void)
slotRefreshHideUnusedButton();
loadAccounts();
- QValueList<MyMoneyBudget> budgetList;
+ TQValueList<MyMoneyBudget> budgetList;
if(!m_budget.id().isEmpty())
budgetList << m_budget;
emit selectObjects(budgetList);
@@ -546,7 +546,7 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const
{
static MyMoneyBudget nullBudget;
- QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected);
+ TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected);
KBudgetListItem* item = dynamic_cast<KBudgetListItem*>(it_l.current());
if(item) {
return item->budget();
@@ -557,12 +557,12 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const
KMyMoneyAccountTreeBudgetItem* KBudgetView::selectedAccount(void) const
{
- QListViewItemIterator it_l(m_accountTree, QListViewItemIterator::Selected);
+ TQListViewItemIterator it_l(m_accountTree, TQListViewItemIterator::Selected);
KMyMoneyAccountTreeBudgetItem* item = dynamic_cast<KMyMoneyAccountTreeBudgetItem*>(it_l.current());
return item;
}
-void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p)
+void KBudgetView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p)
{
Q_UNUSED(lv);
Q_UNUSED(p);
@@ -580,15 +580,15 @@ void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPo
void KBudgetView::slotStartRename(void)
{
- QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
if((it_v = it_l.current()) != 0) {
it_v->startRename(0);
}
}
// This variant is only called when a single budget is selected and renamed.
-void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString& txt)
+void KBudgetView::slotRenameBudget(TQListViewItem* p , int /*col*/, const TQString& txt)
{
KBudgetListItem *pBudget = dynamic_cast<KBudgetListItem*> (p);
if (!pBudget)
@@ -596,7 +596,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString
//kdDebug() << "[KPayeesView::slotRenamePayee]" << endl;
// create a copy of the new name without appended whitespaces
- QString new_name = txt.stripWhiteSpace();
+ TQString new_name = txt.stripWhiteSpace();
if (pBudget->budget().name() != new_name) {
MyMoneyFileTransaction ft;
try {
@@ -609,7 +609,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString
if (KMessageBox::questionYesNo(this,
i18n("A budget with the name '%1' already exists. It is not advisable to have "
"multiple budgets with the same identification name. Are you sure you would like "
- "to rename the budget?").arg(new_name)) != KMessageBox::Yes)
+ "to rename the budget?").tqarg(new_name)) != KMessageBox::Yes)
{
p->setText(0,pBudget->budget().name());
return;
@@ -633,7 +633,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to modify budget"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -642,7 +642,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString
}
}
-void KBudgetView::slotSelectAccount(QListViewItem* item)
+void KBudgetView::slotSelectAccount(TQListViewItem* item)
{
if(item->listView() == m_accountTree) {
m_assignmentBox->setEnabled(false);
@@ -653,7 +653,7 @@ void KBudgetView::slotSelectAccount(QListViewItem* item)
if (m_budget.id().isEmpty() )
return;
- QString id = account->id();
+ TQString id = account->id();
m_leAccounts->setText(MyMoneyFile::instance()->accountToCategory(id));
m_cbBudgetSubaccounts->setChecked(m_budget.account(id).budgetSubaccounts());
m_accountTotal->setValue(m_budget.account(id).totalBalance());
@@ -709,7 +709,7 @@ void KBudgetView::cb_includesSubaccounts_clicked()
return;
if(selectedAccount() != 0) {
- QString accountID = selectedAccount()->id();
+ TQString accountID = selectedAccount()->id();
// now, we get a reference to the accountgroup, to mofify its atribute,
// and then put the resulting account group instead of the original
@@ -734,7 +734,7 @@ void KBudgetView::slotResetBudget(void)
loadAccounts();
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to reset budget"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -748,7 +748,7 @@ void KBudgetView::slotUpdateBudget(void)
slotRefreshHideUnusedButton();
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to modify budget"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -757,11 +757,11 @@ void KBudgetView::languageChange(void)
{
KBudgetViewDecl::languageChange();
- m_newButton->setText(QString());
- m_renameButton->setText(QString());
- m_deleteButton->setText(QString());
- m_updateButton->setText(QString());
- m_resetButton->setText(QString());
+ m_newButton->setText(TQString());
+ m_renameButton->setText(TQString());
+ m_deleteButton->setText(TQString());
+ m_updateButton->setText(TQString());
+ m_resetButton->setText(TQString());
}
#include "kbudgetview.moc"
diff --git a/kmymoney2/views/kbudgetview.h b/kmymoney2/views/kbudgetview.h
index f857a15..14c7611 100644
--- a/kmymoney2/views/kbudgetview.h
+++ b/kmymoney2/views/kbudgetview.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
+#include <tqwidget.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -50,20 +50,20 @@ public:
/**
* Constructor to be used to construct a budget 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 budget const reference to MyMoneyBudget for which
* the KListView entry is constructed
*/
- KBudgetListItem(KListView *parent, const MyMoneyBudget& budget);
+ KBudgetListItem(KListView *tqparent, const MyMoneyBudget& budget);
~KBudgetListItem();
/**
- * 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);
const MyMoneyBudget& budget(void) { return m_budget; };
void setBudget(const MyMoneyBudget& budget) { m_budget = budget; }
@@ -79,14 +79,15 @@ private:
class KBudgetView : public KBudgetViewDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KBudgetView(QWidget *parent=0, const char *name=0);
+ KBudgetView(TQWidget *tqparent=0, const char *name=0);
~KBudgetView();
void show();
/**
- * Override the base class behaviour to restore the layout. Do not
- * do this in show() because show() itself may change the layout
+ * Override the base class behaviour to restore the tqlayout. Do not
+ * do this in show() because show() itself may change the tqlayout
* in undesired ways.
*/
void polish(void);
@@ -123,16 +124,16 @@ public slots:
protected:
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
void loadAccounts(void);
- bool loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QStringList& accountList, const MyMoneyBudget& budget);
+ bool loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStringList& accountList, const MyMoneyBudget& budget);
/**
* This method loads all available budgets into the budget list widget. If a budget is
* currently selected it remains selected if it is still present.
*/
void loadBudgets(void);
- void ensureBudgetVisible(const QString& id);
+ void ensureBudgetVisible(const TQString& id);
const MyMoneyBudget& selectedBudget(void) const;
KMyMoneyAccountTreeBudgetItem* selectedAccount(void) const;
void setTimeSpan(KMyMoneyAccountTreeBudgetItem *account, MyMoneyBudget::AccountGroup& accountGroup, int iTimeSpan);
@@ -148,7 +149,7 @@ protected slots:
* @param col The column where the name is located
* @param txt The text of the new name
*/
- void slotRenameBudget(QListViewItem *p, int col, const QString& txt);
+ void slotRenameBudget(TQListViewItem *p, int col, const TQString& txt);
/**
* This slot is called when the amount of a budget is changed. It
@@ -158,7 +159,7 @@ protected slots:
/**
*/
- void slotSelectAccount(QListViewItem*);
+ void slotSelectAccount(TQListViewItem*);
void AccountEnter();
@@ -181,14 +182,14 @@ private slots:
* @param i the item on which the cursor resides
* @param p position of the pointing device
*/
- void slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p);
+ void slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p);
signals:
/**
* This signal serves as proxy for KMyMoneyBudgetList::selectObject()
*/
void openContextMenu(const MyMoneyObject& obj);
- void selectObjects(const QValueList<MyMoneyBudget>& budget);
+ void selectObjects(const TQValueList<MyMoneyBudget>& budget);
private:
typedef enum {
@@ -200,8 +201,8 @@ private:
MyMoneyBudget m_budget;
- QMap<QString, unsigned long> m_transactionCountMap;
- QStringList m_yearList;
+ TQMap<TQString, unsigned long> m_transactionCountMap;
+ TQStringList m_yearList;
KMyMoneyAccountTreeBudgetItem* m_incomeItem;
KMyMoneyAccountTreeBudgetItem* m_expenseItem;
diff --git a/kmymoney2/views/kbudgetviewdecl.ui b/kmymoney2/views/kbudgetviewdecl.ui
index f3fb5be..e03457d 100644
--- a/kmymoney2/views/kbudgetviewdecl.ui
+++ b/kmymoney2/views/kbudgetviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KBudgetViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KBudgetViewDecl</cstring>
</property>
@@ -30,15 +30,15 @@
<property name="margin">
<number>0</number>
</property>
- <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="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -57,9 +57,9 @@
<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">
@@ -163,9 +163,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
@@ -184,7 +184,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_hideUnusedButton</cstring>
</property>
@@ -192,7 +192,7 @@
<string>Hide unused budget categories</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>m_assignmentBox</cstring>
</property>
@@ -211,15 +211,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <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>textLabel3</cstring>
</property>
@@ -227,7 +227,7 @@
<string>Account</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>m_leAccounts</cstring>
</property>
@@ -246,7 +246,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -273,7 +273,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_cbBudgetSubaccounts</cstring>
</property>
@@ -281,9 +281,9 @@
<string>Include subaccounts</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
@@ -304,7 +304,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
@@ -344,5 +344,9 @@
<data format="PNG" length="870">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000032d49444154388db59531681c4714863f892dde8004b320c32e3870020b74458a6b0f5458e581c016a809a8496b42208454098604d2c4904a6954a410511ae752085b858c1208dc35221244b00119f60ac12ee860062c980719708a95a248f129459cd7cceeccf0edb76fff61a706830197d5ed765ff3166a30184c4d5d829fed3c7bdd5e6ce3bda71a5738ef301802e1d6d179477152303c1842bc822797a64fbf7b4a9a43be00ada817cb0e12011c2611205ccd73755f9c087c6b19bef0d7c100f5b8267d07caf10fe8ab9210156320fc01be16aa5a11043307f30b20a21041019985f48ef2f7fa0becc68e80475fd584e831b396f210f67795c3831a4940a3228925bb27f4d652ba4b01a199b73342f3981be0ca57745042ac30c632d853b6373d44b056c8ef0922508d94d14be59b2f4aeaf58cd5751069e06f3436890114332b9487d0bf80f61e64dc5f813c3790045453f67703fd4d4f7f6b4496b5597e689044af194f5f5e841800210478bee3d1a8f41e64acbe0f69ae6852e1cf0ccf7f74f4d652defbc042226c6f55e8f89f91bb6e9c387c9d521c9558db988a3416fe3c67e32b4779ec7167f0e8939ce19ea7fc5d298a80c875f03563930855ed2081bc05e91d5014ef53363eaf288e3d6285ee520a338e76c7a251a94e41e30470d3631004a262672e3eca59cec6978ef2b889979d11f2bb904af3be92081a416e28dfe831983920b1142345d5b0ff2234a6334276d7321ad53c795c511ca654a5a251996f19b83d158ef602b45a423d52f67703abeb29ee4ce9de4fc93378f218462f6b3efdb042cf3d59666977a0aa6fe9310888d25b13342afd4dcffeaee3d147399da540ab13f8f8b39c2cb3f8710d11ba2b96f9c57fcd7180287497a03ecde86f8dd8fe1a867b9ef6bb1612a84a871f6bd35b94e217a53832589970f2dcd85d9c7d4580d57521cbdaf4bfaf288e95e268d4ec8e60e72ccb0f2dbffea454e71e8d29f57882717152509482a48d8924b0bc12e82ee51445a03a6da079cbd0eec0fc22142b06620e89a3fc8d3783870743d814d2bc8994aa6ff286472e764902e5a96f72bbd3b4c37b280e95aa9e604c84e1cf978b37c74935797d7ae2ca7fac6968fe51ff0bf86dc30783c1d49f0baa9bb819e612310000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include>
+ <include location="global" impldecl="in implementation">kmymoney/kbudgetvalues.h</include>
+</includes>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kcategoriesview.cpp b/kmymoney2/views/kcategoriesview.cpp
index e01d62b..3c31f34 100644
--- a/kmymoney2/views/kcategoriesview.cpp
+++ b/kmymoney2/views/kcategoriesview.cpp
@@ -23,8 +23,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,44 +46,44 @@
#include "../kmymoney2.h"
-KCategoriesView::KCategoriesView(QWidget *parent, const char *name ) :
- KCategoriesViewDecl(parent, name),
+KCategoriesView::KCategoriesView(TQWidget *tqparent, const char *name ) :
+ KCategoriesViewDecl(tqparent, name),
m_incomeItem(0),
m_expenseItem(0),
m_needReload(false)
{
// create the searchline widget
- // and insert it into the existing layout
- m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->parentWidget());
- QVBoxLayout* layout = dynamic_cast<QVBoxLayout*>(m_accountTree->parentWidget()->layout());
- if(layout) {
- layout->insertWidget(0, m_searchWidget);
+ // and insert it into the existing tqlayout
+ m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->tqparentWidget());
+ TQVBoxLayout* tqlayout = dynamic_cast<TQVBoxLayout*>(m_accountTree->tqparentWidget()->tqlayout());
+ if(tqlayout) {
+ tqlayout->insertWidget(0, m_searchWidget);
}
// setup icons for collapse and expand button
KIconLoader *ic = KGlobal::iconLoader();
KGuiItem collapseGuiItem("",
- QIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)),
- QString(),
- QString());
+ TQIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)),
+ TQString(),
+ TQString());
KGuiItem expandGuiItem("",
- QIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)),
- QString(),
- QString());
+ TQIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)),
+ TQString(),
+ TQString());
m_collapseButton->setGuiItem(collapseGuiItem);
m_expandButton->setGuiItem(expandGuiItem);
m_accountTree->setSectionHeader(i18n("Category"));
- connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateProfit(void)));
- connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateProfit(void)));
+ connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts()));
- connect(m_collapseButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse()));
- connect(m_expandButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts()));
+ connect(m_collapseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse()));
+ connect(m_expandButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse()));
}
KCategoriesView::~KCategoriesView()
@@ -118,7 +118,7 @@ void KCategoriesView::show(void)
void KCategoriesView::polish(void)
{
KCategoriesViewDecl::polish();
- m_accountTree->setResizeMode(QListView::LastColumn);
+ m_accountTree->setResizeMode(TQListView::LastColumn);
m_accountTree->restoreLayout("Category View Settings");
}
@@ -134,15 +134,15 @@ void KCategoriesView::slotLoadAccounts(void)
void KCategoriesView::loadAccounts(void)
{
- QMap<QString, bool> isOpen;
+ TQMap<TQString, bool> isOpen;
::timetrace("start load categories view");
// remember the id of the current selected item
KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem();
- QString selectedItemId = (item) ? item->id() : QString();
+ TQString selectedItemId = (item) ? item->id() : TQString();
// keep a map of all 'expanded' accounts
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item && item->isOpen()) {
@@ -152,7 +152,7 @@ void KCategoriesView::loadAccounts(void)
}
// remember the upper left corner of the viewport
- QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_accountTree->setUpdatesEnabled(false);
@@ -167,9 +167,9 @@ void KCategoriesView::loadAccounts(void)
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneySecurity> slist = file->currencyList();
+ TQValueList<MyMoneySecurity> slist = file->currencyList();
slist += file->securityList();
- QValueList<MyMoneySecurity>::const_iterator it_s;
+ TQValueList<MyMoneySecurity>::const_iterator it_s;
for(it_s = slist.begin(); it_s != slist.end(); ++it_s) {
m_securityMap[(*it_s).id()] = *it_s;
}
@@ -198,13 +198,13 @@ void KCategoriesView::loadAccounts(void)
// scan through the list of accounts and re-expand those that were
// expanded and re-select the one that was probably selected before
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item) {
if(item->id() == selectedItemId)
m_accountTree->setSelected(item, true);
- if(isOpen.find(item->id()) != isOpen.end())
+ if(isOpen.tqfind(item->id()) != isOpen.end())
item->setOpen(true);
}
++it_lvi;
@@ -213,11 +213,11 @@ void KCategoriesView::loadAccounts(void)
// reposition viewport
m_accountTree->setContentsPos(startPoint.x(), startPoint.y());
- m_searchWidget->searchLine()->updateSearch(QString::null);
+ m_searchWidget->searchLine()->updateSearch(TQString());
// turn updates back on
m_accountTree->setUpdatesEnabled(true);
- m_accountTree->repaintContents();
+ m_accountTree->tqrepaintContents();
// and in case we need to show things expanded, we'll do so
if(KMyMoneyGlobalSettings::showAccountsExpanded())
@@ -229,16 +229,16 @@ void KCategoriesView::loadAccounts(void)
::timetrace("done load categories view");
}
-bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList)
+bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList)
{
MyMoneyFile* file = MyMoneyFile::instance();
bool unused = false;
- QStringList::const_iterator it_a;
+ TQStringList::const_iterator it_a;
for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) {
const MyMoneyAccount& acc = file->account(*it_a);
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
MyMoneySecurity security = file->baseCurrency();
try {
if(acc.isInvest()) {
@@ -260,7 +260,7 @@ bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QSt
delete e;
}
- KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security);
+ KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security);
unused |= loadSubAccounts(item, acc.accountList());
// no child accounts and not transactions in this account means 'unused'
@@ -286,7 +286,7 @@ void KCategoriesView::slotUpdateProfit(void)
MyMoneyMoney profit = m_incomeItem->totalValue() - m_expenseItem->totalValue();
- QString s(i18n("Profit: "));
+ TQString s(i18n("Profit: "));
if(profit.isNegative())
s = i18n("Loss: ");
@@ -294,13 +294,13 @@ void KCategoriesView::slotUpdateProfit(void)
// if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id())))
// s += "~ ";
- s.replace(QString(" "), QString("&nbsp;"));
+ s.tqreplace(TQString(" "), TQString("&nbsp;"));
if(profit.isNegative()) {
s += "<b><font color=\"red\">";
}
const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency();
- QString v(profit.abs().formatMoney(sec));
- s += v.replace(QString(" "), QString("&nbsp;"));
+ TQString v(profit.abs().formatMoney(sec));
+ s += v.tqreplace(TQString(" "), TQString("&nbsp;"));
if(profit.isNegative()) {
s += "</font></b>";
}
diff --git a/kmymoney2/views/kcategoriesview.h b/kmymoney2/views/kcategoriesview.h
index 4a6ad3c..d37e74d 100644
--- a/kmymoney2/views/kcategoriesview.h
+++ b/kmymoney2/views/kcategoriesview.h
@@ -45,7 +45,7 @@ class KListViewSearchLineWidget;
* @author Michael Edwardes, Thomas Baumgart
*
* While named "categories view", this view actually displays all accounts
- * that are children of the global "Income" and "Expense" accounts. Even though
+ * that are tqchildren of the global "Income" and "Expense" accounts. Even though
* categories are internally just accounts as well, the distinction between
* categories and accounts in the user interface is done for better
* usability and clarity.
@@ -63,8 +63,9 @@ class KListViewSearchLineWidget;
class KCategoriesView : public KCategoriesViewDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KCategoriesView(QWidget *parent=0, const char *name=0);
+ KCategoriesView(TQWidget *tqparent=0, const char *name=0);
virtual ~KCategoriesView();
@@ -78,15 +79,15 @@ public slots:
void show(void);
/**
- * Override the base class behaviour to restore the layout. Do not
- * do this in show() because show() itself may change the layout
+ * Override the base class behaviour to restore the tqlayout. Do not
+ * do this in show() because show() itself may change the tqlayout
* in undesired ways.
*/
void polish(void);
protected:
void loadAccounts(void);
- bool loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList);
+ bool loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList);
protected slots:
void slotUpdateProfit(void);
@@ -99,7 +100,7 @@ private:
*
* @param type account type as defined in MyMoneyAccount::accountTypeE
*/
- const QPixmap accountImage(const MyMoneyAccount::accountTypeE type) const;
+ const TQPixmap accountImage(const MyMoneyAccount::accountTypeE type) const;
signals:
/**
@@ -121,16 +122,16 @@ 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);
private:
- QMap<QString, MyMoneySecurity> m_securityMap;
- QMap<QString, unsigned long> m_transactionCountMap;
+ TQMap<TQString, MyMoneySecurity> m_securityMap;
+ TQMap<TQString, unsigned long> m_transactionCountMap;
KMyMoneyAccountTreeItem* m_incomeItem;
KMyMoneyAccountTreeItem* m_expenseItem;
diff --git a/kmymoney2/views/kcategoriesviewdecl.ui b/kmymoney2/views/kcategoriesviewdecl.ui
index 858cc54..7ede46b 100644
--- a/kmymoney2/views/kcategoriesviewdecl.ui
+++ b/kmymoney2/views/kcategoriesviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KCategoriesViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KCategoriesViewDecl</cstring>
</property>
@@ -27,9 +27,9 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5_2</cstring>
+ <cstring>tqlayout5_2</cstring>
</property>
<hbox>
<property name="name">
@@ -67,7 +67,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>515</width>
<height>20</height>
@@ -76,7 +76,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_hiddenCategories</cstring>
</property>
@@ -84,9 +84,9 @@
<string>Note: Unused categories are not shown as selected by settings.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -102,18 +102,18 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>310</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_totalProfitsLabel</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@@ -125,7 +125,7 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter|AlignRight</set>
</property>
<property name="hAlign" stdset="0">
@@ -149,5 +149,8 @@
<slot>slotCollapseAll()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include>
+</includes>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kforecastview.cpp b/kmymoney2/views/kforecastview.cpp
index c7bcb0a..bf27e7f 100644
--- a/kmymoney2/views/kforecastview.cpp
+++ b/kmymoney2/views/kforecastview.cpp
@@ -17,12 +17,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtabwidget.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qtextedit.h>
-#include <qlayout.h>
+#include <tqtabwidget.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -46,8 +46,8 @@
#include "../reports/pivottable.h"
#include "../reports/pivotgrid.h"
-KForecastView::KForecastView(QWidget *parent, const char *name) :
- KForecastViewDecl(parent,name)
+KForecastView::KForecastView(TQWidget *tqparent, const char *name) :
+ KForecastViewDecl(tqparent,name)
{
for(int i=0; i < MaxViewTabs; ++i)
m_needReload[i] = false;
@@ -56,11 +56,11 @@ KForecastView::KForecastView(QWidget *parent, const char *name) :
config->setGroup("Last Use Settings");
m_tab->setCurrentPage(config->readNumEntry("KForecastView_LastType", 0));
- connect(m_tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotTabChanged(QWidget*)));
+ connect(m_tab, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotTabChanged(TQWidget*)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadForecast()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadForecast()));
- connect(m_forecastButton, SIGNAL(clicked()), this, SLOT(slotManualForecast()));
+ connect(m_forecastButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotManualForecast()));
m_forecastList->setAllColumnsShowFocus(true);
m_summaryList->setAllColumnsShowFocus(true);
@@ -68,7 +68,7 @@ KForecastView::KForecastView(QWidget *parent, const char *name) :
m_advancedList->setAllColumnsShowFocus(true);
m_forecastChart = new KReportChartView(m_tabChart, "forecastChart" );
- m_forecastChart->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ m_forecastChart->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
loadForecastSettings();
@@ -78,7 +78,7 @@ KForecastView::~KForecastView()
{
}
-void KForecastView::slotTabChanged(QWidget* _tab)
+void KForecastView::slotTabChanged(TQWidget* _tab)
{
ForecastViewTab tab = static_cast<ForecastViewTab>(m_tab->indexOf(_tab));
@@ -212,7 +212,7 @@ void KForecastView::loadListView(void)
void KForecastView::loadSummaryView(void)
{
MyMoneyForecast forecast;
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
int dropMinimum;
int dropZero;
@@ -246,7 +246,7 @@ void KForecastView::loadSummaryView(void)
//Get all accounts of the right type to calculate forecast
m_nameIdx.clear();
accList = forecast.accountList();
- QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
+ TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
for(; accList_t != accList.end(); ++accList_t ) {
MyMoneyAccount acc = *accList_t;
if(m_nameIdx[acc.id()] != acc.id()) { //Check if the account is there
@@ -254,7 +254,7 @@ void KForecastView::loadSummaryView(void)
}
}
- QMap<QString, QString>::ConstIterator it_nc;
+ TQMap<TQString, TQString>::ConstIterator it_nc;
for(it_nc = m_nameIdx.begin(); it_nc != m_nameIdx.end(); ++it_nc) {
const MyMoneyAccount& acc = file->account(*it_nc);
@@ -269,7 +269,7 @@ void KForecastView::loadSummaryView(void)
}
//Check if the account is going to be below zero or below the minimal balance in the forecast period
- QString minimumBalance = acc.value("minimumBalance");
+ TQString minimumBalance = acc.value("minimumBalance");
MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance);
//Check if the account is going to be below minimal balance
@@ -279,7 +279,7 @@ void KForecastView::loadSummaryView(void)
dropZero = forecast.daysToZeroBalance(acc);
// spit out possible warnings
- QString msg;
+ TQString msg;
// if a minimum balance has been specified, an appropriate warning will
// only be shown, if the drop below 0 is on a different day or not present
@@ -292,14 +292,14 @@ void KForecastView::loadSummaryView(void)
case -1:
break;
case 0:
- msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %2 is below the minimum balance %3 today.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency));
- msg += QString("</font>");
+ msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %2 is below the minimum balance %3 today.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency));
+ msg += TQString("</font>");
break;
default:
- msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)).arg(dropMinimum-1);
- msg += QString("</font>");
+ msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)).tqarg(dropMinimum-1);
+ msg += TQString("</font>");
}
if(!msg.isEmpty()) {
@@ -308,31 +308,31 @@ void KForecastView::loadSummaryView(void)
}
// a drop below zero is always shown
- msg = QString();
+ msg = TQString();
switch(dropZero) {
case -1:
break;
case 0:
if(acc.accountGroup() == MyMoneyAccount::Asset) {
- msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 is below %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency));
- msg += QString("</font>");
+ msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 is below %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency));
+ msg += TQString("</font>");
break;
}
if(acc.accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 is above %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency));
+ msg = i18n("The balance of %1 is above %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency));
break;
}
break;
default:
if(acc.accountGroup() == MyMoneyAccount::Asset) {
- msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 will drop below %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero);
- msg += QString("</font>");
+ msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 will drop below %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero);
+ msg += TQString("</font>");
break;
}
if(acc.accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero);
+ msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero);
break;
}
}
@@ -341,12 +341,12 @@ void KForecastView::loadSummaryView(void)
}
//advice about trends
- msg = QString();
+ msg = TQString();
MyMoneyMoney accCycleVariation = forecast.accountCycleVariation(acc);
if (accCycleVariation < MyMoneyMoney(0, 1)) {
- msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The account %1 is decreasing %2 per cycle.").arg(acc.name()).arg(accCycleVariation.formatMoney(acc, currency));
- msg += QString("</font>");
+ msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The account %1 is decreasing %2 per cycle.").tqarg(acc.name()).tqarg(accCycleVariation.formatMoney(acc, currency));
+ msg += TQString("</font>");
}
if(!msg.isEmpty()) {
@@ -360,7 +360,7 @@ void KForecastView::loadSummaryView(void)
void KForecastView::loadAdvancedView(void)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
MyMoneySecurity baseCurrency = file->baseCurrency();
MyMoneyForecast forecast;
int daysToBeginDay;
@@ -376,7 +376,7 @@ void KForecastView::loadAdvancedView(void)
//Get all accounts of the right type to calculate forecast
m_nameIdx.clear();
accList = forecast.accountList();
- QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
+ TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
for(; accList_t != accList.end(); ++accList_t ) {
MyMoneyAccount acc = *accList_t;
if(m_nameIdx[acc.id()] != acc.id()) { //Check if the account is there
@@ -393,32 +393,32 @@ void KForecastView::loadAdvancedView(void)
int accountColumn = m_advancedList->addColumn(i18n("Account"), -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();
}
//add columns
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = m_advancedList->addColumn(i18n("Min Bal %1").arg(i), -1);
- m_advancedList->setColumnAlignment(col, Qt::AlignRight);
- m_advancedList->addColumn(i18n("Min Date %1").arg(i), -1);
+ int col = m_advancedList->addColumn(i18n("Min Bal %1").tqarg(i), -1);
+ m_advancedList->setColumnAlignment(col, TQt::AlignRight);
+ m_advancedList->addColumn(i18n("Min Date %1").tqarg(i), -1);
}
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = m_advancedList->addColumn(i18n("Max Bal %1").arg(i), -1);
- m_advancedList->setColumnAlignment(col, Qt::AlignRight);
- m_advancedList->addColumn(i18n("Max Date %1").arg(i), -1);
+ int col = m_advancedList->addColumn(i18n("Max Bal %1").tqarg(i), -1);
+ m_advancedList->setColumnAlignment(col, TQt::AlignRight);
+ m_advancedList->addColumn(i18n("Max Date %1").tqarg(i), -1);
}
int col = m_advancedList->addColumn(i18n("Average"), -1);
- m_advancedList->setColumnAlignment(col, Qt::AlignRight);
+ m_advancedList->setColumnAlignment(col, TQt::AlignRight);
m_advancedList->setSorting(-1);
KMyMoneyForecastListViewItem *advancedItem = 0;
- QMap<QString, QString>::ConstIterator it_nc;
+ TQMap<TQString, TQString>::ConstIterator it_nc;
for(it_nc = m_nameIdx.begin(); it_nc != m_nameIdx.end(); ++it_nc) {
const MyMoneyAccount& acc = file->account(*it_nc);
- QString amount;
+ TQString amount;
MyMoneyMoney amountMM;
MyMoneySecurity currency;
@@ -436,35 +436,35 @@ void KForecastView::loadAdvancedView(void)
int it_c = 1; // iterator for the columns of the listview
//get minimum balance list
- QValueList<QDate> minBalanceList = forecast.accountMinimumBalanceDateList(acc);
- QValueList<QDate>::Iterator t_min;
+ TQValueList<TQDate> minBalanceList = forecast.accountMinimumBalanceDateList(acc);
+ TQValueList<TQDate>::Iterator t_min;
for(t_min = minBalanceList.begin(); t_min != minBalanceList.end() ; ++t_min)
{
- QDate minDate = *t_min;
+ TQDate minDate = *t_min;
amountMM = forecast.forecastBalance(acc, minDate);
amount = amountMM.formatMoney(acc, currency);
advancedItem->setText(it_c, amount, amountMM.isNegative());
it_c++;
- QString dateString = KGlobal::locale()->formatDate(minDate, true);
+ TQString dateString = KGlobal::locale()->formatDate(minDate, true);
advancedItem->setText(it_c, dateString, amountMM.isNegative());
it_c++;
}
//get maximum balance list
- QValueList<QDate> maxBalanceList = forecast.accountMaximumBalanceDateList(acc);
- QValueList<QDate>::Iterator t_max;
+ TQValueList<TQDate> maxBalanceList = forecast.accountMaximumBalanceDateList(acc);
+ TQValueList<TQDate>::Iterator t_max;
for(t_max = maxBalanceList.begin(); t_max != maxBalanceList.end() ; ++t_max)
{
- QDate maxDate = *t_max;
+ TQDate maxDate = *t_max;
amountMM = forecast.forecastBalance(acc, maxDate);
amount = amountMM.formatMoney(acc, currency);
advancedItem->setText(it_c, amount, amountMM.isNegative());
it_c++;
- QString dateString = KGlobal::locale()->formatDate(maxDate, true);
+ TQString dateString = KGlobal::locale()->formatDate(maxDate, true);
advancedItem->setText(it_c, dateString, amountMM.isNegative());
it_c++;
}
@@ -481,15 +481,15 @@ void KForecastView::loadBudgetView(void)
{
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyForecast forecast;
-// QValueList<MyMoneyAccount> accList;
+// TQValueList<MyMoneyAccount> accList;
m_budgetList->setBaseCurrency(file->baseCurrency());
//get the settings from current page and calculate this year based on last year
- QDate historyEndDate = QDate(QDate::currentDate().year()-1, 12, 31);
- QDate historyStartDate = historyEndDate.addDays(-m_accountsCycle->value() * m_forecastCycles->value());
- QDate forecastStartDate = QDate(QDate::currentDate().year(), 1, 1);
- QDate forecastEndDate = QDate::currentDate().addDays(m_forecastDays->value());
+ TQDate historyEndDate = TQDate(TQDate::tqcurrentDate().year()-1, 12, 31);
+ TQDate historyStartDate = historyEndDate.addDays(-m_accountsCycle->value() * m_forecastCycles->value());
+ TQDate forecastStartDate = TQDate(TQDate::tqcurrentDate().year(), 1, 1);
+ TQDate forecastEndDate = TQDate::tqcurrentDate().addDays(m_forecastDays->value());
forecast.setHistoryMethod(m_historyMethod->selectedId());
MyMoneyBudget budget;
@@ -513,10 +513,10 @@ void KForecastView::loadBudgetView(void)
m_budgetList->show();
}
-QValueList<MyMoneyPrice> KForecastView::getAccountPrices(const MyMoneyAccount& acc)
+TQValueList<MyMoneyPrice> KForecastView::getAccountPrices(const MyMoneyAccount& acc)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
MyMoneySecurity security = file->baseCurrency();
try {
if(acc.isInvest()) {
@@ -543,7 +543,7 @@ void KForecastView::addAssetLiabilityRows(const MyMoneyForecast& forecast)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyPrice> basePrices;
+ TQValueList<MyMoneyPrice> basePrices;
m_assetItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->asset(), forecast, basePrices, file->baseCurrency() );
m_assetItem->setOpen(true);
m_liabilityItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->liability(), forecast, basePrices, file->baseCurrency());
@@ -554,7 +554,7 @@ void KForecastView::addIncomeExpenseRows(const MyMoneyForecast& forecast)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyPrice> basePrices;
+ TQValueList<MyMoneyPrice> basePrices;
m_incomeItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->income(), forecast, basePrices, file->baseCurrency() );
m_incomeItem->setOpen(true);
m_expenseItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->expense(), forecast, basePrices, file->baseCurrency());
@@ -576,10 +576,10 @@ bool KForecastView::includeAccount(MyMoneyForecast& forecast, const MyMoneyAccou
if( forecast.isForecastAccount(acc) )
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 = file->account(*it_acc);
if( includeAccount(forecast, account) )
@@ -589,10 +589,10 @@ bool KForecastView::includeAccount(MyMoneyForecast& forecast, const MyMoneyAccou
return false;
}
-void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* parentItem, int forecastType )
+void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* tqparentItem, int forecastType )
{
- QMap<QString, QString> nameIdx;
- QStringList accList;
+ TQMap<TQString, TQString> nameIdx;
+ TQStringList accList;
MyMoneyFile* file = MyMoneyFile::instance();
KMyMoneyAccountTreeForecastItem *forecastItem = 0;
@@ -602,16 +602,16 @@ void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount
if(accList.size() == 0)
return;
- QStringList::ConstIterator accList_t;
+ TQStringList::ConstIterator accList_t;
for(accList_t = accList.begin(); accList_t != accList.end(); ++accList_t ) {
MyMoneyAccount subAccount = file->account(*accList_t);
- //only add the account if it is a forecast account or the parent of a forecast account
+ //only add the account if it is a forecast account or the tqparent of a forecast account
if(includeAccount(forecast, subAccount)) {
nameIdx[subAccount.id()] = subAccount.id();
}
}
- QMap<QString, QString>::ConstIterator it_nc;
+ TQMap<TQString, TQString>::ConstIterator it_nc;
for(it_nc = nameIdx.begin(); it_nc != nameIdx.end(); ++it_nc) {
const MyMoneyAccount subAccount = file->account(*it_nc);
@@ -623,14 +623,14 @@ void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount
currency = file->security(subAccount.currencyId());
}
- QString amount;
- QString vAmount;
+ TQString amount;
+ TQString vAmount;
MyMoneyMoney vAmountMM;
//get prices
- QValueList<MyMoneyPrice> prices = getAccountPrices(subAccount);
+ TQValueList<MyMoneyPrice> prices = getAccountPrices(subAccount);
- forecastItem = new KMyMoneyAccountTreeForecastItem( parentItem, subAccount, forecast, prices, currency, static_cast<KMyMoneyAccountTreeForecastItem::EForecastViewType>(forecastType) );
+ forecastItem = new KMyMoneyAccountTreeForecastItem( tqparentItem, subAccount, forecast, prices, currency, static_cast<KMyMoneyAccountTreeForecastItem::EForecastViewType>(forecastType) );
forecastItem->setOpen(true);
loadAccounts(forecast, subAccount, forecastItem, forecastType);
@@ -658,7 +658,7 @@ void KForecastView::loadChartView(void)
reportCfg.setColumnsAreDays( true );
reportCfg.setConvertCurrency( true );
reportCfg.setIncludingForecast( true );
- reportCfg.setDateFilter(QDate::currentDate(),QDate::currentDate().addDays(m_forecastDays->value()));
+ reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(m_forecastDays->value()));
reports::PivotTable table(reportCfg);
diff --git a/kmymoney2/views/kforecastview.h b/kmymoney2/views/kforecastview.h
index 8beb24a..36de0e5 100644
--- a/kmymoney2/views/kforecastview.h
+++ b/kmymoney2/views/kforecastview.h
@@ -46,10 +46,11 @@ using namespace reports;
class KForecastView : public KForecastViewDecl
{
Q_OBJECT
+ TQ_OBJECT
private:
public:
- KForecastView(QWidget *parent=0, const char *name=0);
+ KForecastView(TQWidget *tqparent=0, const char *name=0);
virtual ~KForecastView();
void show(void);
@@ -69,7 +70,7 @@ protected:
MaxViewTabs
} ForecastViewTab;
- QMap<QString, QString> m_nameIdx;
+ TQMap<TQString, TQString> m_nameIdx;
/**
@@ -108,21 +109,21 @@ protected:
void loadForecastSettings(void);
protected slots:
- void slotTabChanged(QWidget*);
+ void slotTabChanged(TQWidget*);
/**
* Get the list of prices for an account
* This is used later to create an instance of KMyMoneyAccountTreeForecastItem
*
*/
- QValueList<MyMoneyPrice> getAccountPrices(const MyMoneyAccount& acc);
+ TQValueList<MyMoneyPrice> getAccountPrices(const MyMoneyAccount& acc);
private:
void addAssetLiabilityRows(const MyMoneyForecast& forecast);
void addIncomeExpenseRows(const MyMoneyForecast& forecast);
void addTotalRow(KMyMoneyAccountTreeForecast* forecastList, const MyMoneyForecast& forecast);
bool includeAccount(MyMoneyForecast& forecast, const MyMoneyAccount& acc);
- void loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* parentItem, int forecastType);
+ void loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* tqparentItem, int forecastType);
bool m_needReload[MaxViewTabs];
KMyMoneyAccountTreeForecastItem* m_totalItem;
diff --git a/kmymoney2/views/kforecastviewdecl.ui b/kmymoney2/views/kforecastviewdecl.ui
index 6d2bf3b..3110bbf 100644
--- a/kmymoney2/views/kforecastviewdecl.ui
+++ b/kmymoney2/views/kforecastviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KForecastViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KForecastViewDecl</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -30,15 +30,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -54,7 +54,7 @@
<string>Days to Forecast:</string>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>m_forecastDays</cstring>
</property>
@@ -65,7 +65,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -81,7 +81,7 @@
<string>Days of Accounts Cycle:</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>m_accountsCycle</cstring>
</property>
@@ -100,7 +100,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -108,7 +108,7 @@
<string>Day of Month to start Forecast:</string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="1">
+ <widget class="TQSpinBox" row="2" column="1">
<property name="name">
<cstring>m_beginDay</cstring>
</property>
@@ -119,7 +119,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -127,7 +127,7 @@
<string>Historic Cycles:</string>
</property>
</widget>
- <widget class="QSpinBox" row="3" column="1">
+ <widget class="TQSpinBox" row="3" column="1">
<property name="name">
<cstring>m_forecastCycles</cstring>
</property>
@@ -138,7 +138,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -146,7 +146,7 @@
<string>Chart Detail:</string>
</property>
</widget>
- <widget class="QComboBox" row="4" column="1">
+ <widget class="TQComboBox" row="4" column="1">
<item>
<property name="text">
<string>All</string>
@@ -189,24 +189,24 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>31</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout76</cstring>
+ <cstring>tqlayout76</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<vbox>
<property name="name">
@@ -216,7 +216,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -232,7 +232,7 @@
<string>Current Forecast Method:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_forecastMethod</cstring>
</property>
@@ -254,7 +254,7 @@
</property>
</widget>
</hbox>
- <widget class="QButtonGroup" row="2" column="0">
+ <widget class="TQButtonGroup" row="2" column="0">
<property name="name">
<cstring>m_historyMethod</cstring>
</property>
@@ -265,7 +265,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton11</cstring>
</property>
@@ -276,7 +276,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton12</cstring>
</property>
@@ -287,7 +287,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton12</cstring>
</property>
@@ -312,16 +312,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>6</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout75</cstring>
+ <cstring>tqlayout75</cstring>
</property>
<hbox>
<property name="name">
@@ -345,7 +345,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>21</height>
@@ -369,7 +369,7 @@
</widget>
</hbox>
</widget>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>m_tab</cstring>
</property>
@@ -381,7 +381,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>summary</cstring>
</property>
@@ -470,7 +470,7 @@
<enum>AutoOneFit</enum>
</property>
</widget>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<item>
<property name="text">
<string>New Item</string>
@@ -502,7 +502,7 @@
</hbox>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>detail</cstring>
</property>
@@ -526,7 +526,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>advanced</cstring>
</property>
@@ -550,7 +550,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>budget</cstring>
</property>
@@ -574,7 +574,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_tabChart</cstring>
</property>
@@ -610,5 +610,5 @@
</sizepolicy>
</customwidget>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp
index bf95e50..981f5e1 100644
--- a/kmymoney2/views/kgloballedgerview.cpp
+++ b/kmymoney2/views/kgloballedgerview.cpp
@@ -20,9 +20,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qframe.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -65,26 +65,26 @@ public:
MousePressFilter* m_mousePressFilter;
KMyMoneyRegister::RegisterSearchLineWidget* m_registerSearchLine;
- QPoint m_startPoint;
- QString m_reconciliationAccount;
- QDate m_reconciliationDate;
+ TQPoint m_startPoint;
+ TQString m_reconciliationAccount;
+ TQDate m_reconciliationDate;
MyMoneyMoney m_endingBalance;
int m_precision;
bool m_inLoading;
bool m_recursion;
bool m_showDetails;
KMyMoneyRegister::Action m_action;
- QTimer m_viewPosTimer;
+ TQTimer m_viewPosTimer;
};
-MousePressFilter::MousePressFilter(QWidget* parent, const char* name) :
- QObject(parent, name),
+MousePressFilter::MousePressFilter(TQWidget* tqparent, const char* name) :
+ TQObject(tqparent, name),
m_lastMousePressEvent(0),
m_filterActive(true)
{
}
-void MousePressFilter::addWidget(QWidget* w)
+void MousePressFilter::addWidget(TQWidget* w)
{
m_parents.append(w);
}
@@ -94,27 +94,27 @@ void MousePressFilter::setFilterActive(bool state)
m_filterActive = state;
}
-bool MousePressFilter::isChildOf( QWidget* child, QWidget *parent )
+bool MousePressFilter::isChildOf( TQWidget* child, TQWidget *tqparent )
{
while(child) {
- if(child == parent)
+ if(child == tqparent)
return true;
// If one of the ancestors is a KPassivePopup then it's as
// if it is a child of our own
if(dynamic_cast<KPassivePopup*>(child))
return true;
- child = child->parentWidget();
+ child = child->tqparentWidget();
}
return false;
}
-bool MousePressFilter::eventFilter(QObject* o, QEvent* e)
+bool MousePressFilter::eventFilter(TQObject* o, TQEvent* e)
{
if(m_filterActive) {
- if(e->type() == QEvent::MouseButtonPress && !m_lastMousePressEvent) {
- QValueList<QWidget*>::const_iterator it_w;
+ if(e->type() == TQEvent::MouseButtonPress && !m_lastMousePressEvent) {
+ TQValueList<TQWidget*>::const_iterator it_w;
for(it_w = m_parents.begin(); it_w != m_parents.end(); ++it_w) {
- if(isChildOf((QWidget*)o, (*it_w))) {
+ if(isChildOf((TQWidget*)o, (*it_w))) {
m_lastMousePressEvent = e;
break;
}
@@ -126,7 +126,7 @@ bool MousePressFilter::eventFilter(QObject* o, QEvent* e)
}
}
- if(e->type() != QEvent::MouseButtonPress) {
+ if(e->type() != TQEvent::MouseButtonPress) {
m_lastMousePressEvent = 0;
}
}
@@ -143,21 +143,21 @@ KGlobalLedgerView::Private::Private() :
{
}
-QDate KGlobalLedgerView::m_lastPostDate;
+TQDate KGlobalLedgerView::m_lastPostDate;
-KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name )
- : KMyMoneyViewBase(parent, name, i18n("Ledgers")),
+KGlobalLedgerView::KGlobalLedgerView(TQWidget *tqparent, const char *name )
+ : KMyMoneyViewBase(tqparent, name, i18n("Ledgers")),
d(new Private),
m_needReload(false),
m_newAccountLoaded(true),
m_inEditMode(false)
{
- d->m_mousePressFilter = new MousePressFilter((QWidget*)this);
+ d->m_mousePressFilter = new MousePressFilter((TQWidget*)this);
d->m_action = KMyMoneyRegister::ActionNone;;
// create the toolbar frame at the top of the view
- m_toolbarFrame = new QFrame(this);
- QVBoxLayout* toolbarLayout = new QVBoxLayout(m_toolbarFrame, 0, 0);
+ m_toolbarFrame = new TQFrame(this);
+ TQVBoxLayout* toolbarLayout = new TQVBoxLayout(m_toolbarFrame, 0, 0);
m_toolbar = new KToolBar(m_toolbarFrame, 0, true);
toolbarLayout->addWidget(m_toolbar);
@@ -176,21 +176,21 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name )
//m_toolbar->setMaximumSize(50,20);
m_toolbar->alignItemRight(1);
#endif
- m_toolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- layout()->addWidget(m_toolbarFrame);
+ m_toolbar->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ tqlayout()->addWidget(m_toolbarFrame);
// create the register frame
- m_registerFrame = new QFrame(this);
- QVBoxLayout* registerFrameLayout = new QVBoxLayout(m_registerFrame, 0, 0);
- layout()->addWidget(m_registerFrame);
- layout()->setStretchFactor(m_registerFrame, 2);
+ m_registerFrame = new TQFrame(this);
+ TQVBoxLayout* registerFrameLayout = new TQVBoxLayout(m_registerFrame, 0, 0);
+ tqlayout()->addWidget(m_registerFrame);
+ tqlayout()->setStretchFactor(m_registerFrame, 2);
m_register = new KMyMoneyRegister::Register(m_registerFrame);
registerFrameLayout->addWidget(m_register);
m_register->installEventFilter(this);
- connect(m_register, SIGNAL(openContextMenu()), this, SIGNAL(openContextMenu()));
- connect(m_register, SIGNAL(headerClicked()), this, SLOT(slotSortOptions()));
- connect(m_register, SIGNAL(reconcileStateColumnClicked(KMyMoneyRegister::Transaction*)), this, SLOT(slotToggleTransactionMark(KMyMoneyRegister::Transaction*)));
- connect(&d->m_viewPosTimer, SIGNAL(timeout()), this, SLOT(slotUpdateViewPos()));
+ connect(m_register, TQT_SIGNAL(openContextMenu()), this, TQT_SIGNAL(openContextMenu()));
+ connect(m_register, TQT_SIGNAL(headerClicked()), this, TQT_SLOT(slotSortOptions()));
+ connect(m_register, TQT_SIGNAL(reconcileStateColumnClicked(KMyMoneyRegister::Transaction*)), this, TQT_SLOT(slotToggleTransactionMark(KMyMoneyRegister::Transaction*)));
+ connect(&d->m_viewPosTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateViewPos()));
// insert search line widget
@@ -198,24 +198,24 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name )
m_toolbar->setStretchableWidget(d->m_registerSearchLine);
// create the summary frame
- m_summaryFrame = new QFrame(this);
- QHBoxLayout* summaryFrameLayout = new QHBoxLayout(m_summaryFrame, 0, 0);
- m_leftSummaryLabel = new QLabel(m_summaryFrame);
- m_centerSummaryLabel = new QLabel(m_summaryFrame);
- m_rightSummaryLabel = new QLabel(m_summaryFrame);
+ m_summaryFrame = new TQFrame(this);
+ TQHBoxLayout* summaryFrameLayout = new TQHBoxLayout(m_summaryFrame, 0, 0);
+ m_leftSummaryLabel = new TQLabel(m_summaryFrame);
+ m_centerSummaryLabel = new TQLabel(m_summaryFrame);
+ m_rightSummaryLabel = new TQLabel(m_summaryFrame);
summaryFrameLayout->addWidget(m_leftSummaryLabel);
- QSpacerItem* spacer = new QSpacerItem( 20, 1, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
summaryFrameLayout->addItem(spacer);
summaryFrameLayout->addWidget(m_centerSummaryLabel);
- spacer = new QSpacerItem( 20, 1, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer = new TQSpacerItem( 20, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
summaryFrameLayout->addItem(spacer);
summaryFrameLayout->addWidget(m_rightSummaryLabel);
- layout()->addWidget(m_summaryFrame);
+ tqlayout()->addWidget(m_summaryFrame);
// create the button frame
- m_buttonFrame = new QFrame(this);
- QVBoxLayout* buttonLayout = new QVBoxLayout(m_buttonFrame, 0, 0);
- layout()->addWidget(m_buttonFrame);
+ m_buttonFrame = new TQFrame(this);
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout(m_buttonFrame, 0, 0);
+ tqlayout()->addWidget(m_buttonFrame);
m_buttonbar = new KToolBar(m_buttonFrame, 0, true);
m_buttonbar->setIconText(KToolBar::IconTextRight);
buttonLayout->addWidget(m_buttonbar);
@@ -229,26 +229,26 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name )
kmymoney2->action("transaction_match")->plug(m_buttonbar);
// create the transaction form frame
- m_formFrame = new QFrame(this);
- QVBoxLayout* frameLayout = new QVBoxLayout(m_formFrame, 5, 0);
+ m_formFrame = new TQFrame(this);
+ TQVBoxLayout* frameLayout = new TQVBoxLayout(m_formFrame, 5, 0);
m_form = new KMyMoneyTransactionForm::TransactionForm(m_formFrame);
frameLayout->addWidget(m_form->tabBar(m_formFrame));
frameLayout->addWidget(m_form);
- m_formFrame->setFrameShape( QFrame::Panel );
- m_formFrame->setFrameShadow( QFrame::Raised );
- layout()->addWidget(m_formFrame);
-
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView()));
- connect(m_register, SIGNAL(focusChanged(KMyMoneyRegister::Transaction*)), m_form, SLOT(slotSetTransaction(KMyMoneyRegister::Transaction*)));
- connect(m_register, SIGNAL(focusChanged()), kmymoney2, SLOT(slotUpdateActions()));
- connect(m_accountComboBox, SIGNAL(accountSelected(const QString&)), this, SLOT(slotSelectAccount(const QString&)));
- connect(m_register, SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)));
- connect(m_register, SIGNAL(editTransaction()), this, SIGNAL(startEdit()));
- connect(m_register, SIGNAL(emptyItemSelected()), this, SLOT(slotNewTransaction()));
- connect(m_register, SIGNAL(aboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)), this, SLOT(slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)));
- connect(d->m_mousePressFilter, SIGNAL(mousePressedOnExternalWidget(bool&)), this, SIGNAL(cancelOrEndEdit(bool&)));
-
- connect(m_form, SIGNAL(newTransaction(KMyMoneyRegister::Action)), this, SLOT(slotNewTransaction(KMyMoneyRegister::Action)));
+ m_formFrame->setFrameShape( TQFrame::Panel );
+ m_formFrame->setFrameShadow( TQFrame::Raised );
+ tqlayout()->addWidget(m_formFrame);
+
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView()));
+ connect(m_register, TQT_SIGNAL(focusChanged(KMyMoneyRegister::Transaction*)), m_form, TQT_SLOT(slotSetTransaction(KMyMoneyRegister::Transaction*)));
+ connect(m_register, TQT_SIGNAL(focusChanged()), kmymoney2, TQT_SLOT(slotUpdateActions()));
+ connect(m_accountComboBox, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(slotSelectAccount(const TQString&)));
+ connect(m_register, TQT_SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)));
+ connect(m_register, TQT_SIGNAL(editTransaction()), this, TQT_SIGNAL(startEdit()));
+ connect(m_register, TQT_SIGNAL(emptyItemSelected()), this, TQT_SLOT(slotNewTransaction()));
+ connect(m_register, TQT_SIGNAL(aboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)), this, TQT_SLOT(slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)));
+ connect(d->m_mousePressFilter, TQT_SIGNAL(mousePressedOnExternalWidget(bool&)), this, TQT_SIGNAL(cancelOrEndEdit(bool&)));
+
+ connect(m_form, TQT_SIGNAL(newTransaction(KMyMoneyRegister::Action)), this, TQT_SLOT(slotNewTransaction(KMyMoneyRegister::Action)));
// setup mouse press filter
d->m_mousePressFilter->addWidget(m_formFrame);
@@ -287,8 +287,8 @@ void KGlobalLedgerView::clear(void)
m_register->clear();
// setup header font
- QFont font = KMyMoneyGlobalSettings::listHeaderFont();
- QFontMetrics fm( font );
+ TQFont font = KMyMoneyGlobalSettings::listHeaderFont();
+ TQFontMetrics fm( font );
int height = fm.lineSpacing()+6;
m_register->horizontalHeader()->setMinimumHeight(height);
m_register->horizontalHeader()->setMaximumHeight(height);
@@ -305,7 +305,7 @@ void KGlobalLedgerView::clear(void)
m_transactionList.clear();
// and the selected account in the combo box
- m_accountComboBox->setSelected(QString());
+ m_accountComboBox->setSelected(TQString());
// fraction defaults to two digits
d->m_precision = 2;
@@ -324,12 +324,12 @@ void KGlobalLedgerView::loadView(void)
KMyMoneyRegister::SelectedTransactions list;
emit transactionsSelected(list);
- QMap<QString, bool> isSelected;
- QString focusItemId;
- QString anchorItemId;
+ TQMap<TQString, bool> isSelected;
+ TQString focusItemId;
+ TQString anchorItemId;
if(!d->m_inLoading)
- d->m_startPoint = QPoint(-1, -1);
+ d->m_startPoint = TQPoint(-1, -1);
if(!m_newAccountLoaded) {
// remember the current selected transactions
@@ -348,11 +348,11 @@ void KGlobalLedgerView::loadView(void)
// remember the upper left corner of the viewport
if(!d->m_inLoading && d->m_showDetails == KMyMoneyGlobalSettings::showRegisterDetailed())
- d->m_startPoint = QPoint(m_register->contentsX(), m_register->contentsY());
+ d->m_startPoint = TQPoint(m_register->contentsX(), m_register->contentsY());
} else {
if(d->m_viewPosTimer.isActive())
d->m_viewPosTimer.stop();
- d->m_startPoint = QPoint(-1, -1);
+ d->m_startPoint = TQPoint(-1, -1);
d->m_inLoading = false;
d->m_registerSearchLine->searchLine()->reset();
}
@@ -381,14 +381,14 @@ void KGlobalLedgerView::loadView(void)
// ... and recreate it
KMyMoneyRegister::RegisterItem* focusItem = 0;
KMyMoneyRegister::RegisterItem* anchorItem = 0;
- QMap<QString, MyMoneyMoney> actBalance, clearedBalance, futureBalance;
- QMap<QString, MyMoneyMoney>::iterator it_b;
+ TQMap<TQString, MyMoneyMoney> actBalance, clearedBalance, futureBalance;
+ TQMap<TQString, MyMoneyMoney>::iterator it_b;
try {
// setup the filter to select the transactions we want to display
// and update the sort order
- QString sortOrder;
- QString key;
- QDate reconciliationDate = d->m_reconciliationDate;
+ TQString sortOrder;
+ TQString key;
+ TQDate reconciliationDate = d->m_reconciliationDate;
MyMoneyTransactionFilter filter(m_account.id());
// if it's an investment account, we also take care of
@@ -402,7 +402,7 @@ void KGlobalLedgerView::loadView(void)
filter.addState(MyMoneyTransactionFilter::notReconciled);
filter.addState(MyMoneyTransactionFilter::cleared);
} else {
- filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), QDate());
+ filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), TQDate());
key = "kmm-sort-std";
sortOrder = KMyMoneyGlobalSettings::sortNormalView();
if (KMyMoneyGlobalSettings::hideReconciledTransactions()
@@ -426,8 +426,8 @@ void KGlobalLedgerView::loadView(void)
kmymoney2->slotStatusProgressBar(0, m_transactionList.count());
// create the elements for the register
- QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it;
- QMap<QString, int>uniqueMap;
+ TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it;
+ TQMap<TQString, int>uniqueMap;
int i = 0;
for(it = m_transactionList.begin(); it != m_transactionList.end(); ++it) {
uniqueMap[(*it).first.id()]++;
@@ -448,10 +448,10 @@ void KGlobalLedgerView::loadView(void)
// show scheduled transactions which have a scheduled postdate
// within the next 'period' days. In reconciliation mode, the
// period starts on the statement date.
- QDate endDate = QDate::currentDate().addDays(period);
+ TQDate endDate = TQDate::tqcurrentDate().addDays(period);
if(isReconciliationAccount())
endDate = reconciliationDate.addDays(period);
- QValueList<MyMoneySchedule> scheduleList = MyMoneyFile::instance()->scheduleList(m_account.id());
+ TQValueList<MyMoneySchedule> scheduleList = MyMoneyFile::instance()->scheduleList(m_account.id());
while(scheduleList.count() > 0){
MyMoneySchedule& s = scheduleList.first();
for(;;) {
@@ -464,11 +464,11 @@ void KGlobalLedgerView::loadView(void)
// certainly be posted in the past. So we take todays date
// as the alternative
if(s.isOverdue())
- t.setPostDate(QDate::currentDate());
+ t.setPostDate(TQDate::tqcurrentDate());
else
t.setPostDate(s.adjustedNextDueDate());
- const QValueList<MyMoneySplit>& splits = t.splits();
- QValueList<MyMoneySplit>::const_iterator it_s;
+ const TQValueList<MyMoneySplit>& splits = t.splits();
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = splits.begin(); it_s != splits.end(); ++it_s) {
if((*it_s).accountId() == m_account.id()) {
new KMyMoneyRegister::StdTransactionScheduled(m_register, t, *it_s, uniqueMap[t.id()]);
@@ -476,7 +476,7 @@ void KGlobalLedgerView::loadView(void)
}
// keep track of this payment locally (not in the engine)
if(s.isOverdue())
- s.setLastPayment(QDate::currentDate());
+ s.setLastPayment(TQDate::tqcurrentDate());
else
s.setLastPayment(s.nextDueDate());
@@ -528,7 +528,7 @@ void KGlobalLedgerView::loadView(void)
actBalance[m_account.id()] = MyMoneyMoney();
if(m_account.accountType() == MyMoneyAccount::Investment) {
- QValueList<QString>::const_iterator it_a;
+ TQValueList<TQString>::const_iterator it_a;
for(it_a = m_account.accountList().begin(); it_a != m_account.accountList().end(); ++it_a) {
actBalance[*it_a] = MyMoneyMoney();
}
@@ -544,10 +544,10 @@ void KGlobalLedgerView::loadView(void)
|| m_account.accountGroup() == MyMoneyAccount::Equity)
factor = -factor;
- QMap<QString, int> deposits;
- QMap<QString, int> payments;
- QMap<QString, MyMoneyMoney> depositAmount;
- QMap<QString, MyMoneyMoney> paymentAmount;
+ TQMap<TQString, int> deposits;
+ TQMap<TQString, int> payments;
+ TQMap<TQString, MyMoneyMoney> depositAmount;
+ TQMap<TQString, MyMoneyMoney> paymentAmount;
for(it_b = actBalance.begin(); it_b != actBalance.end(); ++it_b) {
MyMoneyMoney balance = MyMoneyFile::instance()->balance(it_b.key());
balance = balance * factor;
@@ -590,7 +590,7 @@ void KGlobalLedgerView::loadView(void)
while(p) {
KMyMoneyRegister::Transaction* t = dynamic_cast<KMyMoneyRegister::Transaction*>(p);
if(t) {
- if(isSelected.contains(t->id()))
+ if(isSelected.tqcontains(t->id()))
t->setSelected(true);
if(t->id() == focusItemId)
@@ -629,7 +629,7 @@ void KGlobalLedgerView::loadView(void)
}
}
- if(t->transaction().postDate() > QDate::currentDate()) {
+ if(t->transaction().postDate() > TQDate::tqcurrentDate()) {
tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).data(), t->transaction().id().data(), split.id().data(), t->transaction().postDate().toString(Qt::ISODate).data());
actBalance[split.accountId()] -= split.shares() * factor;
}
@@ -652,11 +652,11 @@ void KGlobalLedgerView::loadView(void)
arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) );
}
if(pStatement) {
- pStatement->setText(i18n("%1 payments (%2)").arg(payments[m_account.id()]).
+ pStatement->setText(i18n("%1 payments (%2)").tqarg(payments[m_account.id()]).
arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) );
}
if(dStatement) {
- dStatement->setText(i18n("%1 deposits (%2)").arg(deposits[m_account.id()]).
+ dStatement->setText(i18n("%1 deposits (%2)").tqarg(deposits[m_account.id()]).
arg(depositAmount[m_account.id()].abs().formatMoney(m_account.fraction())) );
}
@@ -699,9 +699,9 @@ void KGlobalLedgerView::loadView(void)
// (re-)position viewport
if(m_newAccountLoaded) {
if(focusItem) {
- d->m_startPoint = QPoint(-1, -1);
+ d->m_startPoint = TQPoint(-1, -1);
} else {
- d->m_startPoint = QPoint(0, 0);
+ d->m_startPoint = TQPoint(0, 0);
}
}
if(!d->m_inLoading) {
@@ -715,7 +715,7 @@ void KGlobalLedgerView::loadView(void)
emit accountSelected(m_account);
}
-void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& actBalance, const QMap<QString, MyMoneyMoney>& clearedBalance)
+void KGlobalLedgerView::updateSummaryLine(const TQMap<TQString, MyMoneyMoney>& actBalance, const TQMap<TQString, MyMoneyMoney>& clearedBalance)
{
MyMoneyFile* file = MyMoneyFile::instance();
m_leftSummaryLabel->show();
@@ -724,24 +724,24 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act
if(isReconciliationAccount()) {
if(m_account.accountType() != MyMoneyAccount::Investment) {
- m_leftSummaryLabel->setText(i18n("Statement: %1").arg(d->m_endingBalance.formatMoney("", d->m_precision)));
- m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision)));
- m_rightSummaryLabel->setText(i18n("Difference: %1").arg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision)));
+ m_leftSummaryLabel->setText(i18n("Statement: %1").tqarg(d->m_endingBalance.formatMoney("", d->m_precision)));
+ m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision)));
+ m_rightSummaryLabel->setText(i18n("Difference: %1").tqarg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision)));
}
} else {
// update summary line in normal mode
- QDate reconcileDate = m_account.lastReconciliationDate();
+ TQDate reconcileDate = m_account.lastReconciliationDate();
if(reconcileDate.isValid()) {
- m_leftSummaryLabel->setText(i18n("Last reconciled: %1").arg(KGlobal::locale()->formatDate(reconcileDate, true)));
+ m_leftSummaryLabel->setText(i18n("Last reconciled: %1").tqarg(KGlobal::locale()->formatDate(reconcileDate, true)));
} else {
m_leftSummaryLabel->setText(i18n("Never reconciled"));
}
m_rightSummaryLabel->setPaletteForegroundColor(m_leftSummaryLabel->paletteForegroundColor());
if(m_account.accountType() != MyMoneyAccount::Investment) {
- m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision)));
- m_rightSummaryLabel->setText(i18n("Balance: %1").arg(actBalance[m_account.id()].formatMoney("", d->m_precision)));
+ m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision)));
+ m_rightSummaryLabel->setText(i18n("Balance: %1").tqarg(actBalance[m_account.id()].formatMoney("", d->m_precision)));
bool showNegative = actBalance[m_account.id()].isNegative();
if(m_account.accountGroup() == MyMoneyAccount::Liability && !actBalance[m_account.id()].isZero())
showNegative = !showNegative;
@@ -752,11 +752,11 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act
m_centerSummaryLabel->hide();
MyMoneyMoney balance;
MyMoneySecurity base = file->baseCurrency();
- QMap<QString, MyMoneyMoney>::const_iterator it_b;
+ TQMap<TQString, MyMoneyMoney>::const_iterator it_b;
bool approx = false;
for(it_b = actBalance.begin(); it_b != actBalance.end(); ++it_b) {
MyMoneyAccount stock = file->account(it_b.key());
- QString currencyId = stock.currencyId();
+ TQString currencyId = stock.currencyId();
MyMoneySecurity sec = file->security(currencyId);
MyMoneyPrice priceInfo;
MyMoneyMoney rate(1,1);
@@ -775,7 +775,7 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act
}
balance += ((*it_b) * rate).convert(base.smallestAccountFraction());
}
- m_rightSummaryLabel->setText(i18n("Investment value: %1%2").arg(approx ? "~" : "").arg(balance.formatMoney(base.tradingSymbol(), d->m_precision)));
+ m_rightSummaryLabel->setText(i18n("Investment value: %1%2").tqarg(approx ? "~" : "").tqarg(balance.formatMoney(base.tradingSymbol(), d->m_precision)));
}
}
}
@@ -784,18 +784,18 @@ void KGlobalLedgerView::slotUpdateViewPos(void)
{
m_register->setUpdatesEnabled(true);
- if(d->m_startPoint == QPoint(-1, -1)) {
+ if(d->m_startPoint == TQPoint(-1, -1)) {
m_register->ensureItemVisible(m_register->focusItem());
m_register->updateContents();
} else {
m_register->setContentsPos(d->m_startPoint.x(), d->m_startPoint.y());
- m_register->repaintContents();
+ m_register->tqrepaintContents();
}
d->m_inLoading = false;
}
-void KGlobalLedgerView::resizeEvent(QResizeEvent* ev)
+void KGlobalLedgerView::resizeEvent(TQResizeEvent* ev)
{
m_register->resize(KMyMoneyRegister::DetailColumn);
m_form->resize(KMyMoneyTransactionForm::ValueColumn1);
@@ -820,9 +820,9 @@ void KGlobalLedgerView::loadAccounts(void)
m_accountComboBox->loadList((KMyMoneyUtils::categoryTypeE)(KMyMoneyUtils::asset | KMyMoneyUtils::liability));
if(m_account.id().isEmpty()) {
- QStringList list = m_accountComboBox->accountList();
+ TQStringList list = m_accountComboBox->accountList();
if(list.count()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = list.begin(); it != list.end(); ++it) {
MyMoneyAccount a = file->account(*it);
if(!a.isInvest()) {
@@ -849,7 +849,7 @@ void KGlobalLedgerView::loadAccounts(void)
}
}
-void KGlobalLedgerView::selectTransaction(const QString& id)
+void KGlobalLedgerView::selectTransaction(const TQString& id)
{
if(!id.isEmpty()) {
KMyMoneyRegister::RegisterItem* p = m_register->lastItem();
@@ -879,14 +879,14 @@ void KGlobalLedgerView::slotSelectAllTransactions(void)
}
p = p->nextItem();
}
- m_register->repaintItems();
+ m_register->tqrepaintItems();
// inform everyone else about the selected items
KMyMoneyRegister::SelectedTransactions list(m_register);
emit transactionsSelected(list);
}
-void KGlobalLedgerView::slotSetReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance)
+void KGlobalLedgerView::slotSetReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance)
{
if(d->m_reconciliationAccount != acc.id()) {
// make sure the account is selected
@@ -935,7 +935,7 @@ bool KGlobalLedgerView::slotSelectAccount(const MyMoneyObject& obj)
return rc;
}
-bool KGlobalLedgerView::slotSelectAccount(const QString& id, const QString& transactionId)
+bool KGlobalLedgerView::slotSelectAccount(const TQString& id, const TQString& transactionId)
{
bool rc = true;
@@ -944,9 +944,9 @@ bool KGlobalLedgerView::slotSelectAccount(const QString& id, const QString& tran
try {
m_account = MyMoneyFile::instance()->account(id);
// if a stock account is selected, we show the
- // the corresponding parent (investment) account
+ // the corresponding tqparent (investment) account
if(m_account.isInvest()) {
- m_account = MyMoneyFile::instance()->account(m_account.parentAccountId());
+ m_account = MyMoneyFile::instance()->account(m_account.tqparentAccountId());
}
m_newAccountLoaded = true;
slotLoadView();
@@ -1089,14 +1089,14 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected
}
// decide, if we edit in the register or in the form
- TransactionEditorContainer* parent;
+ TransactionEditorContainer* tqparent;
if(m_formFrame->isVisible())
- parent = m_form;
+ tqparent = m_form;
else {
- parent = m_register;
+ tqparent = m_register;
}
- editor = item->createEditor(parent, list, m_lastPostDate);
+ editor = item->createEditor(tqparent, list, m_lastPostDate);
// check that we use the same transaction commodity in all selected transactions
// if not, we need to update this in the editor's list. The user can also bail out
@@ -1111,27 +1111,27 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected
}
if(editor) {
- if(parent == m_register) {
+ if(tqparent == m_register) {
// make sure, the height of the table is correct
m_register->updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm());
}
m_inEditMode = true;
- connect(editor, SIGNAL(transactionDataSufficient(bool)), kmymoney2->action("transaction_enter"), SLOT(setEnabled(bool)));
- connect(editor, SIGNAL(returnPressed()), kmymoney2->action("transaction_enter"), SLOT(activate()));
- connect(editor, SIGNAL(escapePressed()), kmymoney2->action("transaction_cancel"), SLOT(activate()));
+ connect(editor, TQT_SIGNAL(transactionDataSufficient(bool)), kmymoney2->action("transaction_enter"), TQT_SLOT(setEnabled(bool)));
+ connect(editor, TQT_SIGNAL(returnPressed()), kmymoney2->action("transaction_enter"), TQT_SLOT(activate()));
+ connect(editor, TQT_SIGNAL(escapePressed()), kmymoney2->action("transaction_cancel"), TQT_SLOT(activate()));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets()));
- connect(editor, SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&)));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets()));
+ connect(editor, TQT_SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&)));
- connect(editor, SIGNAL(objectCreation(bool)), d->m_mousePressFilter, SLOT(setFilterDeactive(bool)));
- connect(editor, SIGNAL(createPayee(const QString&, QString&)), kmymoney2, SLOT(slotPayeeNew(const QString&, QString&)));
- connect(editor, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&)));
- connect(editor, SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&)));
- connect(editor, SIGNAL(assignNumber(void)), kmymoney2, SLOT(slotTransactionAssignNumber()));
- connect(editor, SIGNAL(lastPostDateUsed(const QDate&)), this, SLOT(slotKeepPostDate(const QDate&)));
+ connect(editor, TQT_SIGNAL(objectCreation(bool)), d->m_mousePressFilter, TQT_SLOT(setFilterDeactive(bool)));
+ connect(editor, TQT_SIGNAL(createPayee(const TQString&, TQString&)), kmymoney2, TQT_SLOT(slotPayeeNew(const TQString&, TQString&)));
+ connect(editor, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(editor, TQT_SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(editor, TQT_SIGNAL(assignNumber(void)), kmymoney2, TQT_SLOT(slotTransactionAssignNumber()));
+ connect(editor, TQT_SIGNAL(lastPostDateUsed(const TQDate&)), this, TQT_SLOT(slotKeepPostDate(const TQDate&)));
- // create the widgets, place them in the parent and load them with data
+ // create the widgets, place them in the tqparent and load them with data
// setup tab order
m_tabOrderWidgets.clear();
editor->setup(m_tabOrderWidgets, m_account, d->m_action);
@@ -1139,22 +1139,22 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected
Q_ASSERT(!m_tabOrderWidgets.isEmpty());
// install event filter in all taborder widgets
- for(QWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) {
+ for(TQWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) {
w->installEventFilter(this);
}
// Install a filter that checks if a mouse press happened outside
// of one of our own widgets.
- qApp->installEventFilter(d->m_mousePressFilter);
+ tqApp->installEventFilter(d->m_mousePressFilter);
// Check if the editor has some preference on where to set the focus
// If not, set the focus to the first widget in the tab order
- QWidget* focusWidget = editor->firstWidget();
- if(!focusWidget)
- focusWidget = m_tabOrderWidgets.first();
+ TQWidget* tqfocusWidget = editor->firstWidget();
+ if(!tqfocusWidget)
+ tqfocusWidget = m_tabOrderWidgets.first();
// for some reason, this only works reliably if delayed a bit
- QTimer::singleShot(10, focusWidget, SLOT(setFocus()));
+ TQTimer::singleShot(10, tqfocusWidget, TQT_SLOT(setFocus()));
// preset to 'I have no idea which type to create' for the next round.
d->m_action = KMyMoneyRegister::ActionNone;
@@ -1166,7 +1166,7 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected
void KGlobalLedgerView::slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions& list)
{
m_inEditMode = false;
- qApp->removeEventFilter(d->m_mousePressFilter);
+ tqApp->removeEventFilter(d->m_mousePressFilter);
// a possible focusOut event may have removed the focus, so we
// install it back again.
@@ -1204,13 +1204,13 @@ bool KGlobalLedgerView::focusNextPrevChild(bool next)
// qDebug("KGlobalLedgerView::focusNextPrevChild(editmode=%s)", m_inEditMode ? "true" : "false");
if(m_inEditMode) {
- QWidget *w = 0;
- QWidget *currentWidget;
+ TQWidget *w = 0;
+ TQWidget *currentWidget;
- w = qApp->focusWidget();
- while(w && m_tabOrderWidgets.find(w) == -1) {
- // qDebug("'%s' not in list, use parent", w->className());
- w = w->parentWidget();
+ w = tqApp->tqfocusWidget();
+ while(w && m_tabOrderWidgets.tqfind(w) == -1) {
+ // qDebug("'%s' not in list, use tqparent", w->className());
+ w = w->tqparentWidget();
}
// if(w) qDebug("tab order is at '%s'", w->className());
currentWidget = m_tabOrderWidgets.current();
@@ -1222,7 +1222,7 @@ bool KGlobalLedgerView::focusNextPrevChild(bool next)
}
if(w != currentWidget
- && ((w->focusPolicy() & TabFocus) == TabFocus)
+ && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus)
&& w->isVisible() && w->isEnabled()) {
// qDebug("Selecting '%s' as focus", w->className());
w->setFocus();
@@ -1258,26 +1258,26 @@ void KGlobalLedgerView::show(void)
KMyMoneyViewBase::show();
}
-bool KGlobalLedgerView::eventFilter(QObject* o, QEvent* e)
+bool KGlobalLedgerView::eventFilter(TQObject* o, TQEvent* e)
{
bool rc = false;
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent *k = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent *k = TQT_TQKEYEVENT(e);
if(m_inEditMode) {
// qDebug("object = %s, key = %d", o->className(), k->key());
- if(o == m_register) {
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) {
// we hide all key press events from the register
// while editing a transaction
rc = true;
}
} else {
// qDebug("object = %s, key = %d", o->className(), k->key());
- if(o == m_register) {
- if((k->state() & Qt::KeyButtonMask) == 0) {
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) {
+ if((k->state() & TQt::KeyButtonMask) == 0) {
switch(k->key()) {
- case Qt::Key_Return:
- case Qt::Key_Enter:
+ case TQt::Key_Return:
+ case TQt::Key_Enter:
kmymoney2->action("transaction_edit")->activate();
rc = true;
break;
@@ -1297,8 +1297,8 @@ void KGlobalLedgerView::slotSortOptions(void)
{
KSortOptionDlg* dlg = new KSortOptionDlg(this);
- QString key;
- QString sortOrder, def;
+ TQString key;
+ TQString sortOrder, def;
if(isReconciliationAccount()) {
key = "kmm-sort-reconcile";
def = KMyMoneyGlobalSettings::sortReconcileView();
@@ -1311,11 +1311,11 @@ void KGlobalLedgerView::slotSortOptions(void)
if(!m_account.value(key).isEmpty())
sortOrder = m_account.value(key);
- QString oldOrder = sortOrder;
+ TQString oldOrder = sortOrder;
dlg->setSortOption(sortOrder, def);
- if(dlg->exec() == QDialog::Accepted) {
+ if(dlg->exec() == TQDialog::Accepted) {
sortOrder = dlg->sortOption();
if(sortOrder != oldOrder) {
if(sortOrder.isEmpty()) {
@@ -1343,12 +1343,12 @@ void KGlobalLedgerView::slotToggleTransactionMark(KMyMoneyRegister::Transaction*
}
}
-void KGlobalLedgerView::slotKeepPostDate(const QDate& date)
+void KGlobalLedgerView::slotKeepPostDate(const TQDate& date)
{
m_lastPostDate = date;
}
-bool KGlobalLedgerView::canCreateTransactions(QString& tooltip) const
+bool KGlobalLedgerView::canCreateTransactions(TQString& tooltip) const
{
bool rc = true;
if(m_account.id().isEmpty()) {
@@ -1367,7 +1367,7 @@ bool KGlobalLedgerView::canCreateTransactions(QString& tooltip) const
return rc;
}
-bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
if(m_register->focusItem() == 0)
return false;
@@ -1379,17 +1379,17 @@ bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedT
return list.count() > 0;
}
-bool KGlobalLedgerView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KGlobalLedgerView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
return canProcessTransactions(list,tooltip) && list.canModify();
}
-bool KGlobalLedgerView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KGlobalLedgerView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
return canProcessTransactions(list,tooltip) && list.canDuplicate();
}
-bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
// check if we can edit the list of transactions. We can edit, if
//
@@ -1421,7 +1421,7 @@ bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTran
KMyMoneyRegister::SelectedTransactions::const_iterator it_t;
for(it_t = list.begin(); rc && it_t != list.end(); ++it_t) {
if((*it_t).transaction().id().isEmpty()) {
- tooltip = QString();
+ tooltip = TQString();
rc = false;
continue;
}
diff --git a/kmymoney2/views/kgloballedgerview.h b/kmymoney2/views/kgloballedgerview.h
index 861bd0e..0d782ab 100644
--- a/kmymoney2/views/kgloballedgerview.h
+++ b/kmymoney2/views/kgloballedgerview.h
@@ -26,9 +26,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qwidgetlist.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqwidgetlist.h>
+#include <tqstring.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -45,12 +45,12 @@
#include <kmymoney/register.h>
#include <kmymoney/transactionform.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QPopupMenu;
-class QFrame;
-class QLabel;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQPopupMenu;
+class TQFrame;
+class TQLabel;
class KMyMoneyAccountCombo;
class KToolBar;
@@ -63,17 +63,18 @@ class TransactionEditor;
* events on widgets outside a given set of widgets. This is used internally
* to detect when to leave the edit mode.
*/
-class MousePressFilter : public QObject
+class MousePressFilter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- MousePressFilter(QWidget* parent = 0, const char* name = 0);
+ MousePressFilter(TQWidget* tqparent = 0, const char* name = 0);
/**
- * Add widget @p w to the list of possible parent objects. See eventFilter() how
+ * Add widget @p w to the list of possible tqparent objects. See eventFilter() how
* they will be used.
*/
- void addWidget(QWidget* w);
+ void addWidget(TQWidget* w);
public slots:
/**
@@ -95,32 +96,32 @@ public slots:
protected:
/**
* This method checks if the widget @p child is a child of
- * the widget @p parent and returns either @a true or @a false.
+ * the widget @p tqparent and returns either @a true or @a false.
*
* @param child pointer to child widget
- * @param parent pointer to parent widget
- * @retval true @p child points to widget which has @p parent as parent or grand-parent
- * @retval false @p child points to a widget which is not related to @p parent
+ * @param tqparent pointer to tqparent widget
+ * @retval true @p child points to widget which has @p tqparent as tqparent or grand-tqparent
+ * @retval false @p child points to a widget which is not related to @p tqparent
*/
- bool isChildOf(QWidget* child, QWidget* parent);
+ bool isChildOf(TQWidget* child, TQWidget* tqparent);
/**
* Reimplemented from base class. Sends out the mousePressedOnExternalWidget() signal
* if object @p o points to an object which is not a child widget of any added previously
* using the addWidget() method. The signal is sent out only once for each event @p e.
*
- * @param o pointer to QObject
- * @param e pointer to QEvent
+ * @param o pointer to TQObject
+ * @param e pointer to TQEvent
* @return always returns @a false
*/
- bool eventFilter(QObject* o, QEvent* e);
+ bool eventFilter(TQObject* o, TQEvent* e);
signals:
void mousePressedOnExternalWidget(bool&);
private:
- QValueList<QWidget*> m_parents;
- QEvent* m_lastMousePressEvent;
+ TQValueList<TQWidget*> m_parents;
+ TQEvent* m_lastMousePressEvent;
bool m_filterActive;
};
@@ -130,15 +131,16 @@ private:
class KGlobalLedgerView : public KMyMoneyViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGlobalLedgerView(QWidget *parent=0, const char *name=0);
+ KGlobalLedgerView(TQWidget *tqparent=0, const char *name=0);
~KGlobalLedgerView();
/**
* This method returns the id of the currently selected account
- * or QString() if none is selected.
+ * or TQString() if none is selected.
*/
- const QString accountId(void) const { return m_account.id(); }
+ const TQString accountId(void) const { return m_account.id(); }
/**
* Checks if new transactions can be created in the current context
@@ -150,7 +152,7 @@ public:
* @retval true Yes, view allows to create transactions (tooltip is not changed)
* @retval false No, view does not support creation of transactions (tooltip is updated with message)
*/
- bool canCreateTransactions(QString& tooltip) const;
+ bool canCreateTransactions(TQString& tooltip) const;
/**
* Checks if a list of transactions can be modified (edit/delete) in the current context
@@ -163,9 +165,9 @@ public:
* @retval true Yes, view allows to edit/delete transactions (tooltip is not changed)
* @retval false No, view cannot edit/delete transactions (tooltip is updated with message)
*/
- bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
- bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
/**
* Checks if the list of transactions can be edited in the current context
@@ -177,7 +179,7 @@ public:
*
* @return @c true if edit operation is possible, @c false if not
*/
- bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
TransactionEditor* startEdit(const KMyMoneyRegister::SelectedTransactions& list);
@@ -204,13 +206,13 @@ public slots:
*
* @param accountId Internal id used for the account to show
* @param transactionId Internal id used for the transaction to select.
- * Default is QString() which will select the last
+ * Default is TQString() which will select the last
* transaction in the ledger if not the same account
*
* @retval true selection of account referenced by @p id succeeded
* @retval false selection of account failed
*/
- bool slotSelectAccount(const QString& accountId, const QString& transactionId = QString());
+ bool slotSelectAccount(const TQString& accountId, const TQString& transactionId = TQString());
/**
* This method is provided for convenience and acts as the method above.
@@ -228,7 +230,7 @@ public slots:
* @param endingBalance The calculated ending balance for the statement
* Default ist 0.
*/
- void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const QDate& reconciliationDate = QDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney());
+ void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const TQDate& reconciliationDate = TQDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney());
/**
* Select all transactions in the ledger that are not hidden.
@@ -253,9 +255,9 @@ protected:
void loadView(void);
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
- void selectTransaction(const QString& id);
+ void selectTransaction(const TQString& id);
/**
* This method handles the focus of the keyboard. When in edit mode
@@ -268,7 +270,7 @@ protected:
*/
bool focusNextPrevChild(bool next);
- bool eventFilter(QObject* o, QEvent* e);
+ bool eventFilter(TQObject* o, TQEvent* e);
/**
* Returns @a true if setReconciliationAccount() has been called for
@@ -287,7 +289,7 @@ protected:
* @param actBalance map of account indexed values to be used as actual balance
* @param clearedBalance map of account indexed values to be used as cleared balance
*/
- void updateSummaryLine(const QMap<QString, MyMoneyMoney>& actBalance, const QMap<QString, MyMoneyMoney>& clearedBalance);
+ void updateSummaryLine(const TQMap<TQString, MyMoneyMoney>& actBalance, const TQMap<TQString, MyMoneyMoney>& clearedBalance);
/**
* setup the default action according to the current account type
@@ -301,13 +303,13 @@ protected slots:
/**
* Sets the contentsPos of the register to d->m_startPoint or makes
- * the focus item visible if d->m_startPoint equals QPoint(-1, -1).
+ * the focus item visible if d->m_startPoint equals TQPoint(-1, -1).
*/
void slotUpdateViewPos(void);
void slotSortOptions(void);
void slotToggleTransactionMark(KMyMoneyRegister::Transaction* t);
- void slotKeepPostDate(const QDate&);
+ void slotKeepPostDate(const TQDate&);
void slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&);
@@ -318,7 +320,7 @@ protected:
* and is used to preset the posting date when new transactions are created.
* This member is initialised to the current date when the program is started.
*/
- static QDate m_lastPostDate;
+ static TQDate m_lastPostDate;
private:
/// \internal d-pointer class.
@@ -327,11 +329,11 @@ private:
Private* const d;
// frames
- QFrame* m_toolbarFrame;
- QFrame* m_registerFrame;
- QFrame* m_buttonFrame;
- QFrame* m_formFrame;
- QFrame* m_summaryFrame;
+ TQFrame* m_toolbarFrame;
+ TQFrame* m_registerFrame;
+ TQFrame* m_buttonFrame;
+ TQFrame* m_formFrame;
+ TQFrame* m_summaryFrame;
// widgets
KMyMoneyAccountCombo* m_accountComboBox;
@@ -347,11 +349,11 @@ private:
/**
* This member holds the transaction list
*/
- QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList;
+ TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList;
- QLabel* m_leftSummaryLabel;
- QLabel* m_centerSummaryLabel;
- QLabel* m_rightSummaryLabel;
+ TQLabel* m_leftSummaryLabel;
+ TQLabel* m_centerSummaryLabel;
+ TQLabel* m_rightSummaryLabel;
KMyMoneyTransactionForm::TransactionForm* m_form;
@@ -359,7 +361,7 @@ private:
bool m_newAccountLoaded;
bool m_inEditMode;
- QWidgetList m_tabOrderWidgets;
+ TQWidgetList m_tabOrderWidgets;
signals:
void accountSelected(const MyMoneyObject&);
@@ -396,7 +398,7 @@ signals:
void toggleReconciliationFlag(void);
private:
- bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
};
#endif
diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp
index 95b7323..51e9c65 100644
--- a/kmymoney2/views/khomeview.cpp
+++ b/kmymoney2/views/khomeview.cpp
@@ -23,16 +23,16 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
#include <dom/dom_element.h>
#include <dom/dom_doc.h>
#include <dom/dom_text.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqbuffer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -88,12 +88,12 @@ class KHomeView::Private
{
public:
Private() {}
- void addNameIndex(QMap<QString, MyMoneyAccount> &idx, const MyMoneyAccount& account);
+ void addNameIndex(TQMap<TQString, MyMoneyAccount> &idx, const MyMoneyAccount& account);
};
-void KHomeView::Private::addNameIndex(QMap<QString, MyMoneyAccount> &idx, const MyMoneyAccount& account)
+void KHomeView::Private::addNameIndex(TQMap<TQString, MyMoneyAccount> &idx, const MyMoneyAccount& account)
{
- QString key = account.name();
+ TQString key = account.name();
if(idx[key].id().isEmpty()) {
idx[key] = account;
@@ -101,15 +101,15 @@ void KHomeView::Private::addNameIndex(QMap<QString, MyMoneyAccount> &idx, const
} else if(idx[key].id() != account.id()) {
key = account.name() + "[%1]";
int dup = 2;
- while(!idx[key.arg(dup)].id().isEmpty()
- && idx[key.arg(dup)].id() != account.id())
+ while(!idx[key.tqarg(dup)].id().isEmpty()
+ && idx[key.tqarg(dup)].id() != account.id())
++dup;
- idx[key.arg(dup)] = account;
+ idx[key.tqarg(dup)] = account;
}
}
-KHomeView::KHomeView(QWidget *parent, const char *name ) :
- KMyMoneyViewBase(parent, name, i18n("Home")),
+KHomeView::KHomeView(TQWidget *tqparent, const char *name ) :
+ KMyMoneyViewBase(tqparent, name, i18n("Home")),
d(new Private),
m_showAllSchedules(false),
m_needReload(true)
@@ -117,13 +117,13 @@ KHomeView::KHomeView(QWidget *parent, const char *name ) :
m_part = new KHTMLPart(this, "htmlpart_km2");
addWidget(m_part->view());
- m_filename = KMyMoneyUtils::findResource("appdata", QString("html/home%1.html"));
+ m_filename = KMyMoneyUtils::findResource("appdata", TQString("html/home%1.html"));
// m_part->openURL(m_filename);
- connect(m_part->browserExtension(), SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)),
- this, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs&)));
+ connect(m_part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)),
+ this, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs&)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView()));
}
KHomeView::~KHomeView()
@@ -153,7 +153,7 @@ void KHomeView::show(void)
loadView();
m_needReload = false;
}
- QWidget::show();
+ TQWidget::show();
}
void KHomeView::slotPrintView(void)
@@ -167,7 +167,7 @@ void KHomeView::loadView(void)
m_part->setZoomFactor( KMyMoneyGlobalSettings::fontSizePercentage() );
//kdDebug() << "Setting font size: " << m_part->zoomFactor() << endl;
- QValueList<MyMoneyAccount> list;
+ TQValueList<MyMoneyAccount> list;
MyMoneyFile::instance()->accountList(list);
if(list.count() == 0)
{
@@ -186,7 +186,7 @@ void KHomeView::loadView(void)
else
{
qDebug("Element id=test found!");
- QString tagname = e.tagName().string();
+ TQString tagname = e.tagName().string();
qDebug("%s",tagname.latin1());
qDebug("%s id=%s",e.tagName().string().latin1(),e.getAttribute("id").string().latin1());
@@ -214,23 +214,23 @@ void KHomeView::loadView(void)
//clear the forecast flag so it will be reloaded
m_forecast.setForecastDone(false);
- QString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css");
- QString header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").arg(filename);
+ TQString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css");
+ TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").tqarg(filename);
header += KMyMoneyUtils::variableCSS();
header += "</head><body id=\"summaryview\">\n";
- QString footer = "</body></html>\n";
+ TQString footer = "</body></html>\n";
m_part->begin();
m_part->write(header);
- m_part->write(QString("<div id=\"summarytitle\">%1</div>").arg(i18n("Your Financial Summary")));
+ m_part->write(TQString("<div id=\"summarytitle\">%1</div>").tqarg(i18n("Your Financial Summary")));
- QStringList settings = KMyMoneyGlobalSettings::itemList();
+ TQStringList settings = KMyMoneyGlobalSettings::itemList();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = settings.begin(); it != settings.end(); ++it) {
int option = (*it).toInt();
@@ -246,7 +246,7 @@ void KHomeView::loadView(void)
case 3: // payment accounts
// Check if preferred accounts are shown separately
- if(settings.find("2") == settings.end()) {
+ if(settings.tqfind("2") == settings.end()) {
showAccounts(static_cast<paymentTypeE> (Payment | Preferred),
i18n("Payment Accounts"));
} else {
@@ -279,7 +279,7 @@ void KHomeView::loadView(void)
}
m_part->write("<div id=\"returnlink\">");
- m_part->write(link(VIEW_WELCOME, QString()) + i18n("Show KMyMoney welcome page") + linkend());
+ m_part->write(link(VIEW_WELCOME, TQString()) + i18n("Show KMyMoney welcome page") + linkend());
m_part->write("</div>");
m_part->write("<div id=\"vieweffect\"></div>");
m_part->write(footer);
@@ -291,7 +291,7 @@ void KHomeView::loadView(void)
void KHomeView::showNetWorthGraph(void)
{
#ifdef HAVE_KDCHART
- m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("Networth Forecast")));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("Networth Forecast")));
MyMoneyReport reportCfg = MyMoneyReport(
MyMoneyReport::eAssetLiability,
@@ -311,7 +311,7 @@ void KHomeView::showNetWorthGraph(void)
reportCfg.setColumnsAreDays( true );
reportCfg.setConvertCurrency( true );
reportCfg.setIncludingForecast( true );
- reportCfg.setDateFilter(QDate::currentDate(),QDate::currentDate().addDays(+90));
+ reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(+90));
reports::PivotTable table(reportCfg);
@@ -330,7 +330,7 @@ void KHomeView::showNetWorthGraph(void)
const int idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue);
//KDChartPropertySet propSetLastValue("last value", idPropFutureValue);
- //propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, Qt::AlignLeft | Qt::AlignBottom);
+ //propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignBottom);
//propSetLastValue.setExtraLinesWidth(KDChartPropertySet::OwnID, -4);
//propSetLastValue.setExtraLinesColor(KDChartPropertySet::OwnID, KMyMoneyGlobalSettings::listGridColor());
// propSetLastValue.setShowMarker(KDChartPropertySet::OwnID, true);
@@ -349,19 +349,19 @@ void KHomeView::showNetWorthGraph(void)
chartWidget->resize(width()-80, nh);
}
- QPixmap pm(chartWidget->width(), chartWidget->height());
+ TQPixmap pm(chartWidget->width(), chartWidget->height());
pm.fill(KGlobalSettings::baseColor());
- QPainter p(&pm);
+ TQPainter p(&pm);
chartWidget->paintTo(p);
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
pm.save( &buffer, "PNG" ); // writes pixmap into ba in PNG format
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr>");
- m_part->write(QString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").arg(KCodecs::base64Encode(ba)));
+ m_part->write(TQString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").tqarg(TQString(KCodecs::base64Encode(ba))));
m_part->write("</tr>");
m_part->write("</table></div></div>");
@@ -372,8 +372,8 @@ void KHomeView::showNetWorthGraph(void)
void KHomeView::showPayments(void)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneySchedule> overdues;
- QValueList<MyMoneySchedule> schedule;
+ TQValueList<MyMoneySchedule> overdues;
+ TQValueList<MyMoneySchedule> schedule;
int i = 0;
//if forecast has not been executed yet, do it.
@@ -383,12 +383,12 @@ void KHomeView::showPayments(void)
schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- QDate::currentDate(),
- QDate::currentDate().addMonths(1));
+ TQDate::tqcurrentDate(),
+ TQDate::tqcurrentDate().addMonths(1));
overdues = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- QDate(), QDate(), true);
+ TQDate(), TQDate(), true);
if(schedule.empty() && overdues.empty())
return;
@@ -396,11 +396,11 @@ void KHomeView::showPayments(void)
// HACK
// Remove the finished schedules
- QValueList<MyMoneySchedule>::Iterator d_it;
+ TQValueList<MyMoneySchedule>::Iterator d_it;
for (d_it=schedule.begin(); d_it!=schedule.end();)
{
// FIXME cleanup old code
- // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == QDate())
+ // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == TQDate())
if ((*d_it).isFinished())
{
d_it = schedule.remove(d_it);
@@ -412,7 +412,7 @@ void KHomeView::showPayments(void)
for (d_it=overdues.begin(); d_it!=overdues.end();)
{
// FIXME cleanup old code
- // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == QDate())
+ // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == TQDate())
if ((*d_it).isFinished())
{
d_it = overdues.remove(d_it);
@@ -422,17 +422,17 @@ void KHomeView::showPayments(void)
}
m_part->write("<div class=\"shadow\"><div class=\"displayblock\">");
- m_part->write(QString("<div class=\"summaryheader\">%1</div>\n").arg(i18n("Payments")));
+ m_part->write(TQString("<div class=\"summaryheader\">%1</div>\n").tqarg(i18n("Payments")));
if(overdues.count() > 0) {
m_part->write("<div class=\"gap\">&nbsp;</div>\n");
qBubbleSort(overdues);
- QValueList<MyMoneySchedule>::Iterator it;
- QValueList<MyMoneySchedule>::Iterator it_f;
+ TQValueList<MyMoneySchedule>::Iterator it;
+ TQValueList<MyMoneySchedule>::Iterator it_f;
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(QString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").arg(showColoredAmount(i18n("Overdue payments"), true)));
+ m_part->write(TQString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").tqarg(showColoredAmount(i18n("Overdue payments"), true)));
m_part->write("<tr class=\"item warning\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -453,9 +453,9 @@ void KHomeView::showPayments(void)
for(it = overdues.begin(); it != overdues.end(); ++it) {
// determine number of overdue payments
- QDate nextDate = (*it).adjustedNextDueDate();
+ TQDate nextDate = (*it).adjustedNextDueDate();
int cnt = 0;
- while(nextDate.isValid() && nextDate < QDate::currentDate()) {
+ while(nextDate.isValid() && nextDate < TQDate::tqcurrentDate()) {
++cnt;
nextDate = (*it).nextPayment(nextDate);
// for single occurence nextDate will not change, so we
@@ -464,7 +464,7 @@ void KHomeView::showPayments(void)
break;
}
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*it, cnt);
m_part->write("</tr>");
// make sure to not repeat overdues later again
@@ -483,15 +483,15 @@ void KHomeView::showPayments(void)
qBubbleSort(schedule);
// Extract todays payments if any
- QValueList<MyMoneySchedule> todays;
- QValueList<MyMoneySchedule>::Iterator t_it;
+ TQValueList<MyMoneySchedule> todays;
+ TQValueList<MyMoneySchedule>::Iterator t_it;
for (t_it=schedule.begin(); t_it!=schedule.end();) {
- if ((*t_it).nextDueDate() == QDate::currentDate()) {
+ if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) {
todays.append(*t_it);
(*t_it).setNextDueDate((*t_it).nextPayment((*t_it).nextDueDate()));
- //if nextDueDate is still currentDate then remove it from scheduled payments
- if ((*t_it).nextDueDate() == QDate::currentDate()) {
+ //if nextDueDate is still tqcurrentDate then remove it from scheduled payments
+ if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) {
t_it = schedule.remove(t_it);
continue;
}
@@ -502,7 +502,7 @@ void KHomeView::showPayments(void)
if (todays.count() > 0) {
m_part->write("<div class=\"gap\">&nbsp;</div>\n");
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(QString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Today's payments")));
+ m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Today's payments")));
m_part->write("<tr class=\"item\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -522,7 +522,7 @@ void KHomeView::showPayments(void)
m_part->write("</tr>");
for(t_it = todays.begin(); t_it != todays.end(); ++t_it) {
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*t_it);
m_part->write("</tr>");
}
@@ -533,10 +533,10 @@ void KHomeView::showPayments(void)
{
m_part->write("<div class=\"gap\">&nbsp;</div>\n");
- QValueList<MyMoneySchedule>::Iterator it;
+ TQValueList<MyMoneySchedule>::Iterator it;
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(QString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Future payments")));
+ m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Future payments")));
m_part->write("<tr class=\"item\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -560,7 +560,7 @@ void KHomeView::showPayments(void)
cnt = (m_showAllSchedules) ? -1 : 6;
bool needMoreLess = m_showAllSchedules;
- QDate lastDate = QDate::currentDate().addMonths(1);
+ TQDate lastDate = TQDate::tqcurrentDate().addMonths(1);
qBubbleSort(schedule);
do {
it = schedule.begin();
@@ -569,7 +569,7 @@ void KHomeView::showPayments(void)
// if the next due date is invalid (schedule is finished)
// we remove it from the list
- QDate nextDate = (*it).nextDueDate();
+ TQDate nextDate = (*it).nextDueDate();
if(!nextDate.isValid()) {
schedule.remove(it);
continue;
@@ -585,7 +585,7 @@ void KHomeView::showPayments(void)
if(cnt > 0)
--cnt;
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*it);
m_part->write("</tr>");
@@ -602,12 +602,12 @@ void KHomeView::showPayments(void)
while(1);
if (needMoreLess) {
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
m_part->write("<td>");
if(m_showAllSchedules) {
- m_part->write(link(VIEW_SCHEDULE, QString("?mode=%1").arg("reduced")) + i18n("Less...") + linkend());
+ m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("reduced")) + i18n("Less...") + linkend());
} else {
- m_part->write(link(VIEW_SCHEDULE, QString("?mode=%1").arg("full")) + i18n("More...") + linkend());
+ m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("full")) + i18n("More...") + linkend());
}
m_part->write("</td><td></td><td></td><td></td><td></td>");
m_part->write("</tr>");
@@ -620,7 +620,7 @@ void KHomeView::showPayments(void)
void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt)
{
- QString tmp;
+ TQString tmp;
MyMoneyFile* file = MyMoneyFile::instance();
try {
@@ -629,49 +629,49 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt)
MyMoneyTransaction t = sched.transaction();
// only show the entry, if it is still active
// FIXME clean old code
- // if(!sched.isFinished() && sched.nextPayment(sched.lastPayment()) != QDate()) {
+ // if(!sched.isFinished() && sched.nextPayment(sched.lastPayment()) != TQDate()) {
if(!sched.isFinished()) {
MyMoneySplit sp = t.splitByAccount(acc.id(), true);
- QString pathEnter, pathSkip;
+ TQString pathEnter, pathSkip;
KGlobal::iconLoader()->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, &pathEnter);
KGlobal::iconLoader()->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, &pathSkip);
//show payment date
- tmp = QString("<td>") +
+ tmp = TQString("<td>") +
KGlobal::locale()->formatDate(sched.adjustedNextDueDate(), true) +
"</td><td>";
if(pathEnter.length() > 0)
- tmp += link(VIEW_SCHEDULE, QString("?id=%1&mode=enter").arg(sched.id()), i18n("Enter schedule")) + QString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathEnter) + linkend();
+ tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").tqarg(sched.id()), i18n("Enter schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathEnter) + linkend();
if(pathSkip.length() > 0)
- tmp += "&nbsp;" + link(VIEW_SCHEDULE, QString("?id=%1&mode=skip").arg(sched.id()), i18n("Skip schedule")) + QString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathSkip) + linkend();
+ tmp += "&nbsp;" + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").tqarg(sched.id()), i18n("Skip schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathSkip) + linkend();
- tmp += QString("&nbsp;");
- tmp += link(VIEW_SCHEDULE, QString("?id=%1&mode=edit").arg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend();
+ tmp += TQString("&nbsp;");
+ tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").tqarg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend();
//show quantity of payments overdue if any
if(cnt > 1)
- tmp += i18n(" (%1 payments)").arg(cnt);
+ tmp += i18n(" (%1 payments)").tqarg(cnt);
//show account of the main split
tmp += "</td><td>";
- tmp += QString(file->account(acc.id()).name());
+ tmp += TQString(file->account(acc.id()).name());
//show amount of the schedule
tmp += "</td><td align=\"right\">";
const MyMoneySecurity& currency = MyMoneyFile::instance()->currency(acc.currencyId());
- QString amount = (sp.value()*cnt).formatMoney(acc, currency);
- amount.replace(" ","&nbsp;");
+ TQString amount = (sp.value()*cnt).formatMoney(acc, currency);
+ amount.tqreplace(" ","&nbsp;");
tmp += showColoredAmount(amount, (sp.value()*cnt).isNegative()) ;
tmp += "</td>";
//show balance after payments
tmp += "<td align=\"right\">";
MyMoneyMoney payment = MyMoneyMoney((sp.value()*cnt));
- QDate paymentDate = QDate(sched.nextDueDate());
+ TQDate paymentDate = TQDate(sched.nextDueDate());
MyMoneyMoney balanceAfter = forecastPaymentBalance(acc, payment, paymentDate);
- QString balance = balanceAfter.formatMoney(acc, currency);
- balance.replace(" ","&nbsp;");
+ TQString balance = balanceAfter.formatMoney(acc, currency);
+ balance.tqreplace(" ","&nbsp;");
tmp += showColoredAmount(balance, balanceAfter.isNegative());
tmp += "</td>";
@@ -685,13 +685,13 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt)
}
}
-void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header)
+void KHomeView::showAccounts(KHomeView::paymentTypeE type, const TQString& header)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyAccount> accounts;
- QValueList<MyMoneyAccount>::Iterator it;
- QValueList<MyMoneyAccount>::Iterator prevIt;
- QMap<QString, MyMoneyAccount> nameIdx;
+ TQValueList<MyMoneyAccount> accounts;
+ TQValueList<MyMoneyAccount>::Iterator it;
+ TQValueList<MyMoneyAccount>::Iterator prevIt;
+ TQMap<TQString, MyMoneyAccount> nameIdx;
bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked();
@@ -767,7 +767,7 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header
}
if(accounts.count() > 0) {
- QString tmp;
+ TQString tmp;
int i = 0;
tmp = "<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">" + header + "</div>\n<div class=\"gap\">&nbsp;</div>\n";
m_part->write(tmp);
@@ -786,9 +786,9 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header
m_part->write("</tr>");
- QMap<QString, MyMoneyAccount>::const_iterator it_m;
+ TQMap<TQString, MyMoneyAccount>::const_iterator it_m;
for(it_m = nameIdx.begin(); it_m != nameIdx.end(); ++it_m) {
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
showAccountEntry(*it_m);
m_part->write("</tr>");
}
@@ -812,17 +812,17 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc)
showAccountEntry(acc, value, MyMoneyMoney(), showLimit);
} else {
//get balance for normal accounts
- value = file->balance(acc.id(), QDate::currentDate());
+ value = file->balance(acc.id(), TQDate::tqcurrentDate());
//if credit card or checkings account, show maximum credit
if( acc.accountType() == MyMoneyAccount::CreditCard ||
acc.accountType() == MyMoneyAccount::Checkings ) {
- QString maximumCredit = acc.value("maxCreditAbsolute");
+ TQString maximumCredit = acc.value("maxCreditAbsolute");
MyMoneyMoney maxCredit = MyMoneyMoney(maximumCredit);
showAccountEntry(acc, value, value - maxCredit, showLimit);
} else {
//otherwise use minimum balance
- QString minimumBalance = acc.value("minBalanceAbsolute");
+ TQString minimumBalance = acc.value("minBalanceAbsolute");
MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance);
showAccountEntry(acc, value, value - minBalance, showLimit);
}
@@ -832,33 +832,33 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc)
void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney& value, const MyMoneyMoney& valueToMinBal, const bool showMinBal)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QString tmp;
+ TQString tmp;
MyMoneySecurity currency = file->currency(acc.currencyId());
- QString amount;
- QString amountToMinBal;
+ TQString amount;
+ TQString amountToMinBal;
//format amounts
amount = value.formatMoney(acc, currency);
- amount.replace(" ","&nbsp;");
+ amount.tqreplace(" ","&nbsp;");
if(showMinBal) {
amountToMinBal = valueToMinBal.formatMoney(acc, currency);
- amountToMinBal.replace(" ","&nbsp;");
+ amountToMinBal.tqreplace(" ","&nbsp;");
}
- tmp = QString("<td>") +
- link(VIEW_LEDGER, QString("?id=%1").arg(acc.id())) + acc.name() + linkend() + "</td>";
+ tmp = TQString("<td>") +
+ link(VIEW_LEDGER, TQString("?id=%1").tqarg(acc.id())) + acc.name() + linkend() + "</td>";
//show account balance
- tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amount, value.isNegative()));
+ tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amount, value.isNegative()));
//show minimum balance column if requested
if(showMinBal) {
//if it is an investment, show minimum balance empty
if(acc.accountType() == MyMoneyAccount::Investment) {
- tmp += QString("<td class=\"right\">&nbsp;</td>");
+ tmp += TQString("<td class=\"right\">&nbsp;</td>");
} else {
//show minimum balance entry
- tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
+ tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
}
}
// qDebug("accountEntry = '%s'", tmp.latin1());
@@ -871,7 +871,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc)
MyMoneyMoney value;
value = file->balance(acc.id());
- QValueList<QString>::const_iterator it_a;
+ TQValueList<TQString>::const_iterator it_a;
for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) {
MyMoneyAccount stock = file->account(*it_a);
try {
@@ -886,7 +886,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc)
val = val.convert(acc.fraction());
value += val;
} catch(MyMoneyException* e) {
- qWarning("%s", (QString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data());
+ qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data());
delete e;
}
}
@@ -895,18 +895,18 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc)
void KHomeView::showFavoriteReports(void)
{
- QValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList();
+ TQValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList();
if ( reports.count() > 0 )
{
bool firstTime = 1;
int row = 0;
- QValueList<MyMoneyReport>::const_iterator it_report = reports.begin();
+ TQValueList<MyMoneyReport>::const_iterator it_report = reports.begin();
while( it_report != reports.end() )
{
if ( (*it_report).isFavorite() ) {
if(firstTime) {
- m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("Favorite Reports")));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("Favorite Reports")));
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">");
m_part->write(i18n("Report"));
@@ -916,12 +916,12 @@ void KHomeView::showFavoriteReports(void)
firstTime = false;
}
- m_part->write(QString("<tr class=\"row-%1\"><td>%2%3%4</td><td align=\"left\">%5</td></tr>")
- .arg(row++ & 0x01 ? "even" : "odd")
- .arg(link(VIEW_REPORTS, QString("?id=%1").arg((*it_report).id())))
- .arg((*it_report).name())
- .arg(linkend())
- .arg((*it_report).comment())
+ m_part->write(TQString("<tr class=\"row-%1\"><td>%2%3%4</td><td align=\"left\">%5</td></tr>")
+ .tqarg(row++ & 0x01 ? "even" : "odd")
+ .tqarg(link(VIEW_REPORTS, TQString("?id=%1").tqarg((*it_report).id())))
+ .tqarg((*it_report).name())
+ .tqarg(linkend())
+ .tqarg((*it_report).comment())
);
}
@@ -934,9 +934,9 @@ void KHomeView::showFavoriteReports(void)
void KHomeView::showForecast(void)
{
- QMap<QString, MyMoneyAccount> nameIdx;
+ TQMap<TQString, MyMoneyAccount> nameIdx;
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
// if forecast has not been executed yet, do it.
if(!m_forecast.isForecastDone())
@@ -945,7 +945,7 @@ void KHomeView::showForecast(void)
accList = m_forecast.accountList();
// add it to a map to have it ordered by name
- QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
+ TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin();
for ( ; accList_t != accList.end(); ++accList_t ) {
d->addNameIndex(nameIdx, *accList_t);
}
@@ -955,22 +955,22 @@ void KHomeView::showForecast(void)
int colspan = 1;
// get begin day
- int beginDay = QDate::currentDate().daysTo(m_forecast.beginForecastDate());
+ int beginDay = TQDate::tqcurrentDate().daysTo(m_forecast.beginForecastDate());
// if begin day is today skip to next cycle
if(beginDay == 0)
beginDay = m_forecast.accountsCycle();
// Now output header
- m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("%1 Day Forecast").arg(m_forecast.forecastDays())));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("%1 Day Forecast").tqarg(m_forecast.forecastDays())));
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">");
m_part->write(i18n("Account"));
m_part->write("</td>");
int colWidth = 55/ (m_forecast.forecastDays() / m_forecast.accountsCycle());
for(i = 0; (i*m_forecast.accountsCycle() + beginDay) <= m_forecast.forecastDays(); ++i) {
- m_part->write(QString("<td width=\"%1%\" class=\"right\">").arg(colWidth));
+ m_part->write(TQString("<td width=\"%1%\" class=\"right\">").tqarg(colWidth));
- m_part->write(i18n("%1 days").arg(i*m_forecast.accountsCycle() + beginDay));
+ m_part->write(i18n("%1 days").tqarg(i*m_forecast.accountsCycle() + beginDay));
m_part->write("</td>");
colspan++;
}
@@ -979,17 +979,17 @@ void KHomeView::showForecast(void)
// Now output entries
i = 0;
- QMap<QString, MyMoneyAccount>::ConstIterator it_account;
+ TQMap<TQString, MyMoneyAccount>::ConstIterator it_account;
for(it_account = nameIdx.begin(); it_account != nameIdx.end(); ++it_account) {
//MyMoneyAccount acc = (*it_n);
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
- m_part->write(QString("<td width=\"40%\">") +
- link(VIEW_LEDGER, QString("?id=%1").arg((*it_account).id())) + (*it_account).name() + linkend() + "</td>");
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<td width=\"40%\">") +
+ link(VIEW_LEDGER, TQString("?id=%1").tqarg((*it_account).id())) + (*it_account).name() + linkend() + "</td>");
int dropZero = -1; //account dropped below zero
int dropMinimum = -1; //account dropped below minimum balance
- QString minimumBalance = (*it_account).value("minimumBalance");
+ TQString minimumBalance = (*it_account).value("minimumBalance");
MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance);
MyMoneySecurity currency;
MyMoneyMoney forecastBalance;
@@ -1003,12 +1003,12 @@ void KHomeView::showForecast(void)
}
for (int f = beginDay; f <= m_forecast.forecastDays(); f += m_forecast.accountsCycle()) {
- forecastBalance = m_forecast.forecastBalance(*it_account, QDate::currentDate().addDays(f));
- QString amount;
+ forecastBalance = m_forecast.forecastBalance(*it_account, TQDate::tqcurrentDate().addDays(f));
+ TQString amount;
amount = forecastBalance.formatMoney( *it_account, currency);
- amount.replace(" ","&nbsp;");
- m_part->write(QString("<td width=\"%1%\" align=\"right\">").arg(colWidth));
- m_part->write(QString("%1</td>").arg(showColoredAmount(amount, forecastBalance.isNegative())));
+ amount.tqreplace(" ","&nbsp;");
+ m_part->write(TQString("<td width=\"%1%\" align=\"right\">").tqarg(colWidth));
+ m_part->write(TQString("%1</td>").tqarg(showColoredAmount(amount, forecastBalance.isNegative())));
}
m_part->write("</tr>");
@@ -1023,7 +1023,7 @@ void KHomeView::showForecast(void)
// spit out possible warnings
- QString msg;
+ TQString msg;
// if a minimum balance has been specified, an appropriate warning will
// only be shown, if the drop below 0 is on a different day or not present
@@ -1036,48 +1036,48 @@ void KHomeView::showForecast(void)
case -1:
break;
case 0:
- msg = i18n("The balance of %1 is below the minimum balance %2 today.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is below the minimum balance %2 today.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency));
msg = showColoredAmount(msg, true);
break;
default:
- msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)).arg(dropMinimum-1);
+ msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)).tqarg(dropMinimum-1);
msg = showColoredAmount(msg, true);
break;
}
if(!msg.isEmpty()) {
- m_part->write(QString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").arg(msg).arg(colspan));
+ m_part->write(TQString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").tqarg(msg).tqarg(colspan));
}
}
// a drop below zero is always shown
- msg = QString();
+ msg = TQString();
switch(dropZero) {
case -1:
break;
case 0:
if((*it_account).accountGroup() == MyMoneyAccount::Asset) {
- msg = i18n("The balance of %1 is below %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is below %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency));
msg = showColoredAmount(msg, true);
break;
}
if((*it_account).accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 is above %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is above %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency));
break;
}
break;
default:
if((*it_account).accountGroup() == MyMoneyAccount::Asset) {
- msg = i18n("The balance of %1 will drop below %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero);
+ msg = i18n("The balance of %1 will drop below %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero);
msg = showColoredAmount(msg, true);
break;
}
if((*it_account).accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero);
+ msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero);
break;
}
}
if(!msg.isEmpty()) {
- m_part->write(QString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").arg(msg).arg(colspan));
+ m_part->write(TQString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").tqarg(msg).tqarg(colspan));
}
}
m_part->write("</table></div></div>");
@@ -1085,27 +1085,27 @@ void KHomeView::showForecast(void)
}
}
-const QString KHomeView::link(const QString& view, const QString& query, const QString& _title) const
+const TQString KHomeView::link(const TQString& view, const TQString& query, const TQString& _title) const
{
- QString titlePart;
- QString title(_title);
+ TQString titlePart;
+ TQString title(_title);
if(!title.isEmpty())
- titlePart = QString(" title=\"%1\"").arg(title.replace(" ", "&nbsp;"));
+ titlePart = TQString(" title=\"%1\"").tqarg(title.tqreplace(" ", "&nbsp;"));
- return QString("<a href=\"/%1%2\"%3>").arg(view, query, titlePart);
+ return TQString("<a href=\"/%1%2\"%3>").tqarg(view, query, titlePart);
}
-const QString KHomeView::linkend(void) const
+const TQString KHomeView::linkend(void) const
{
return "</a>";
}
void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
{
- QString protocol = url.protocol();
- QString view = url.fileName(false);
- QString id = url.queryItem("id").data();
- QString mode = url.queryItem("mode").data();
+ TQString protocol = url.protocol();
+ TQString view = url.fileName(false);
+ TQString id = url.queryItem("id");
+ TQString mode = url.queryItem("mode");
if ( protocol == "http" )
{
@@ -1118,26 +1118,26 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
else
{
if(view == VIEW_LEDGER) {
- emit ledgerSelected(id, QString());
+ emit ledgerSelected(id, TQString());
} else if(view == VIEW_SCHEDULE) {
if(mode == "enter") {
emit scheduleSelected(id);
- KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget());
+ KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget());
Q_CHECK_PTR(mw);
- QTimer::singleShot(0, mw->actionCollection()->action("schedule_enter"), SLOT(activate()));
+ TQTimer::singleShot(0, mw->actionCollection()->action("schedule_enter"), TQT_SLOT(activate()));
} else if(mode == "edit") {
emit scheduleSelected(id);
- KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget());
+ KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget());
Q_CHECK_PTR(mw);
- QTimer::singleShot(0, mw->actionCollection()->action("schedule_edit"), SLOT(activate()));
+ TQTimer::singleShot(0, mw->actionCollection()->action("schedule_edit"), TQT_SLOT(activate()));
} else if(mode == "skip") {
emit scheduleSelected(id);
- KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget());
+ KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget());
Q_CHECK_PTR(mw);
- QTimer::singleShot(0, mw->actionCollection()->action("schedule_skip"), SLOT(activate()));
+ TQTimer::singleShot(0, mw->actionCollection()->action("schedule_skip"), TQT_SLOT(activate()));
} else if(mode == "full") {
m_showAllSchedules = true;
@@ -1152,11 +1152,11 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
emit reportSelected(id);
} else if(view == VIEW_WELCOME) {
- KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget());
+ KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget());
Q_CHECK_PTR(mw);
if ( mode == "whatsnew" )
{
- QString fname = KMyMoneyUtils::findResource("appdata",QString("html/whats_new%1.html"));
+ TQString fname = KMyMoneyUtils::findResource("appdata",TQString("html/whats_new%1.html"));
if(!fname.isEmpty())
m_part->openURL(fname);
}
@@ -1164,12 +1164,12 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
m_part->openURL(m_filename);
} else if(view == "action") {
- KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget());
+ KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget());
Q_CHECK_PTR(mw);
- QTimer::singleShot(0, mw->actionCollection()->action( id ), SLOT(activate()));
+ TQTimer::singleShot(0, mw->actionCollection()->action( id ), TQT_SLOT(activate()));
} else if(view == VIEW_HOME) {
- QValueList<MyMoneyAccount> list;
+ TQValueList<MyMoneyAccount> list;
MyMoneyFile::instance()->accountList(list);
if(list.count() == 0) {
KMessageBox::information(this, i18n("Before KMyMoney can give you detailed information about your financial status, you need to create at least one account. Until then, KMyMoney shows the welcome page instead."));
@@ -1184,13 +1184,13 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
void KHomeView::showAssetsLiabilities(void)
{
- QValueList<MyMoneyAccount> accounts;
- QValueList<MyMoneyAccount>::Iterator it;
- QMap<QString, MyMoneyAccount> nameAssetsIdx;
- QMap<QString, MyMoneyAccount> nameLiabilitiesIdx;
+ TQValueList<MyMoneyAccount> accounts;
+ TQValueList<MyMoneyAccount>::Iterator it;
+ TQMap<TQString, MyMoneyAccount> nameAssetsIdx;
+ TQMap<TQString, MyMoneyAccount> nameLiabilitiesIdx;
MyMoneyMoney netAssets;
MyMoneyMoney netLiabilities;
- QString fontStart, fontEnd;
+ TQString fontStart, fontEnd;
MyMoneyFile* file = MyMoneyFile::instance();
int prec = MyMoneyMoney::denomToPrec(file->baseCurrency().smallestAccountFraction());
@@ -1257,10 +1257,10 @@ void KHomeView::showAssetsLiabilities(void)
m_part->write("</td></tr>");
//get asset and liability accounts
- QMap<QString, MyMoneyAccount>::const_iterator asset_it = nameAssetsIdx.begin();
- QMap<QString,MyMoneyAccount>::const_iterator liabilities_it = nameLiabilitiesIdx.begin();
+ TQMap<TQString, MyMoneyAccount>::const_iterator asset_it = nameAssetsIdx.begin();
+ TQMap<TQString,MyMoneyAccount>::const_iterator liabilities_it = nameLiabilitiesIdx.begin();
for(; asset_it != nameAssetsIdx.end() || liabilities_it != nameLiabilitiesIdx.end();) {
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
//write an asset account if we still have any
if(asset_it != nameAssetsIdx.end()) {
MyMoneyMoney value;
@@ -1268,12 +1268,12 @@ void KHomeView::showAssetsLiabilities(void)
if( (*asset_it).accountType() == MyMoneyAccount::Investment) {
value = investmentBalance(*asset_it);
} else {
- value = MyMoneyFile::instance()->balance((*asset_it).id(), QDate::currentDate());
+ value = MyMoneyFile::instance()->balance((*asset_it).id(), TQDate::tqcurrentDate());
}
//calculate balance for foreign currency accounts
if((*asset_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*asset_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
MyMoneyMoney baseValue = value * curPrice;
baseValue = baseValue.convert(10000);
netAssets += baseValue;
@@ -1294,11 +1294,11 @@ void KHomeView::showAssetsLiabilities(void)
//write a liability account
if(liabilities_it != nameLiabilitiesIdx.end()) {
MyMoneyMoney value;
- value = MyMoneyFile::instance()->balance((*liabilities_it).id(), QDate::currentDate());
+ value = MyMoneyFile::instance()->balance((*liabilities_it).id(), TQDate::tqcurrentDate());
//calculate balance if foreign currency
if((*liabilities_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*liabilities_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
MyMoneyMoney baseValue = value * curPrice;
baseValue = baseValue.convert(10000);
netLiabilities += baseValue;
@@ -1318,30 +1318,30 @@ void KHomeView::showAssetsLiabilities(void)
MyMoneyMoney netWorth = netAssets+netLiabilities;
//format assets, liabilities and net worth
- QString amountAssets = netAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountLiabilities = netLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountNetWorth = netWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- amountAssets.replace(" ","&nbsp;");
- amountLiabilities.replace(" ","&nbsp;");
- amountNetWorth.replace(" ","&nbsp;");
+ TQString amountAssets = netAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountLiabilities = netLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountNetWorth = netWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ amountAssets.tqreplace(" ","&nbsp;");
+ amountLiabilities.tqreplace(" ","&nbsp;");
+ amountNetWorth.tqreplace(" ","&nbsp;");
- m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
//print total for assets
- m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative())));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Assets")).tqarg(showColoredAmount(amountAssets, netAssets.isNegative())));
//leave the intermediate column empty
m_part->write("<td class=\"setcolor\"></td>");
//print total liabilities
- m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative())));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Liabilities")).tqarg(showColoredAmount(amountLiabilities, netLiabilities.isNegative())));
m_part->write("</tr>");
//print net worth
- m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
m_part->write("<td></td><td></td><td class=\"setcolor\"></td>");
- m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative() )));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Net Worth")).tqarg(showColoredAmount(amountNetWorth, netWorth.isNegative() )));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1392,19 +1392,19 @@ void KHomeView::showBudget(void)
m_part->write(i18n("Difference"));
m_part->write("</td></tr>");
- m_part->write(QString("<tr class=\"row-odd\">"));
+ m_part->write(TQString("<tr class=\"row-odd\">"));
MyMoneyMoney totalBudgetValue = grid.m_total[eBudget].m_total;
MyMoneyMoney totalActualValue = grid.m_total[eActual].m_total;
MyMoneyMoney totalBudgetDiffValue = grid.m_total[eBudgetDiff].m_total;
- QString totalBudgetAmount = totalBudgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString totalBudgetAmount = totalBudgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative())));
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalActualAmount, totalActualValue.isNegative())));
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalActualAmount, totalActualValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative())));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1448,10 +1448,10 @@ void KHomeView::showBudget(void)
//write the outergroup if it is the first row of outergroup being shown
if(i == 0) {
m_part->write("<tr style=\"font-weight:bold;\">");
- m_part->write(QString("<td class=\"left\" colspan=\"4\">%1</td>").arg(KMyMoneyUtils::accountTypeToString( rowname.accountType())));
+ m_part->write(TQString("<td class=\"left\" colspan=\"4\">%1</td>").tqarg(KMyMoneyUtils::accountTypeToString( rowname.accountType())));
m_part->write("</tr>");
}
- m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
//get values from grid
MyMoneyMoney actualValue = it_row.data()[eActual][1];
@@ -1459,17 +1459,17 @@ void KHomeView::showBudget(void)
MyMoneyMoney budgetDiffValue = it_row.data()[eBudgetDiff][1];
//format amounts
- QString actualAmount = actualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString budgetAmount = budgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString actualAmount = actualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString budgetAmount = budgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
//account name
- m_part->write(QString("<td>") + link(VIEW_LEDGER, QString("?id=%1").arg(rowname.id())) + rowname.name() + linkend() + "</td>");
+ m_part->write(TQString("<td>") + link(VIEW_LEDGER, TQString("?id=%1").tqarg(rowname.id())) + rowname.name() + linkend() + "</td>");
//show amounts
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetAmount, budgetValue.isNegative())));
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(actualAmount, actualValue.isNegative())));
- m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetAmount, budgetValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(actualAmount, actualValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative())));
m_part->write("</tr>");
}
++it_row;
@@ -1481,19 +1481,19 @@ void KHomeView::showBudget(void)
//if no negative differences are found, then inform that
if(i == 0) {
- m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
- m_part->write(QString("<td class=\"center\" colspan=\"4\">%1</td>").arg(i18n("No Budget Categories have been overrun")));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<td class=\"center\" colspan=\"4\">%1</td>").tqarg(i18n("No Budget Categories have been overrun")));
m_part->write("</tr>");
}
m_part->write("</table></div></div>");
}
}
-QString KHomeView::showColoredAmount(const QString& amount, bool isNegative)
+TQString KHomeView::showColoredAmount(const TQString& amount, bool isNegative)
{
if(isNegative) {
//if negative, get the settings for negative numbers
- return QString("<font color=\"%1\">%2</font>").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount);
+ return TQString("<font color=\"%1\">%2</font>").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount);
}
//if positive, return the same string
@@ -1516,18 +1516,18 @@ void KHomeView::doForecast(void)
m_forecast.doForecast();
}
-MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, QDate& paymentDate)
+MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, TQDate& paymentDate)
{
- //if paymentDate before or equal to currentDate set it to current date plus 1
+ //if paymentDate before or equal to tqcurrentDate set it to current date plus 1
//so we get to accumulate forecast balance correctly
- if(paymentDate <= QDate::currentDate())
- paymentDate = QDate::currentDate().addDays(1);
+ if(paymentDate <= TQDate::tqcurrentDate())
+ paymentDate = TQDate::tqcurrentDate().addDays(1);
//check if the account is already there
- if(m_accountList.find(acc.id()) == m_accountList.end()
- || m_accountList[acc.id()].find(paymentDate) == m_accountList[acc.id()].end())
+ if(m_accountList.tqfind(acc.id()) == m_accountList.end()
+ || m_accountList[acc.id()].tqfind(paymentDate) == m_accountList[acc.id()].end())
{
- if(paymentDate == QDate::currentDate()) {
+ if(paymentDate == TQDate::tqcurrentDate()) {
m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate);
} else {
m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate.addDays(-1));
@@ -1547,25 +1547,25 @@ void KHomeView::showCashFlowSummary()
int prec = MyMoneyMoney::denomToPrec(file->baseCurrency().smallestAccountFraction());
//set start and end of month dates
- QDate startOfMonth = QDate(QDate::currentDate().year(), QDate::currentDate().month(), 1);
- QDate endOfMonth = QDate(QDate::currentDate().year(), QDate::currentDate().month(), QDate::currentDate().daysInMonth());
+ TQDate startOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), 1);
+ TQDate endOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), TQDate::tqcurrentDate().daysInMonth());
//Add total income and expenses for this month
//get transactions for current month
filter.setDateFilter(startOfMonth, endOfMonth);
filter.setReportAllSplits(false);
- QValueList<MyMoneyTransaction> transactions = file->transactionList(filter);
+ TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter);
//if no transaction then skip and print total in zero
if(transactions.size() > 0) {
- QValueList<MyMoneyTransaction>::const_iterator it_transaction;
+ TQValueList<MyMoneyTransaction>::const_iterator it_transaction;
//get all transactions for this month
for(it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction ) {
//get the splits for each transaction
- const QValueList<MyMoneySplit>& splits = (*it_transaction).splits();
- QValueList<MyMoneySplit>::const_iterator it_split;
+ const TQValueList<MyMoneySplit>& splits = (*it_transaction).splits();
+ TQValueList<MyMoneySplit>::const_iterator it_split;
for(it_split = splits.begin(); it_split != splits.end(); ++it_split) {
if(!(*it_split).shares().isZero()) {
ReportAccount repSplitAcc = ReportAccount((*it_split).accountId());
@@ -1596,10 +1596,10 @@ void KHomeView::showCashFlowSummary()
}
//format income and expenses
- QString amountIncome = incomeValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountExpense = expenseValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- amountIncome.replace(" ","&nbsp;");
- amountExpense.replace(" ","&nbsp;");
+ TQString amountIncome = incomeValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountExpense = expenseValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ amountIncome.tqreplace(" ","&nbsp;");
+ amountExpense.tqreplace(" ","&nbsp;");
//calculate schedules
@@ -1610,14 +1610,14 @@ void KHomeView::showCashFlowSummary()
MyMoneyMoney scheduledOtherTransfer;
//get overdues and schedules until the end of this month
- QValueList<MyMoneySchedule> schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
+ TQValueList<MyMoneySchedule> schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- QDate(),
+ TQDate(),
endOfMonth);
//Remove the finished schedules
- QValueList<MyMoneySchedule>::Iterator finished_it;
+ TQValueList<MyMoneySchedule>::Iterator finished_it;
for (finished_it=schedule.begin(); finished_it!=schedule.end();) {
if ((*finished_it).isFinished()) {
finished_it = schedule.remove(finished_it);
@@ -1627,9 +1627,9 @@ void KHomeView::showCashFlowSummary()
}
//add income and expenses
- QValueList<MyMoneySchedule>::Iterator sched_it;
+ TQValueList<MyMoneySchedule>::Iterator sched_it;
for (sched_it=schedule.begin(); sched_it!=schedule.end();) {
- QDate nextDate = (*sched_it).nextDueDate();
+ TQDate nextDate = (*sched_it).nextDueDate();
int cnt = 0;
while(nextDate.isValid() && nextDate <= endOfMonth) {
@@ -1650,18 +1650,18 @@ void KHomeView::showCashFlowSummary()
// take care of the autoCalc stuff
if((*sched_it).type() == MyMoneySchedule::TYPE_LOANPAYMENT) {
- QDate nextDate = (*sched_it).nextPayment((*sched_it).lastPayment());
+ TQDate nextDate = (*sched_it).nextPayment((*sched_it).lastPayment());
//make sure we have all 'starting balances' so that the autocalc works
- QValueList<MyMoneySplit>::const_iterator it_s;
- QMap<QString, MyMoneyMoney> balanceMap;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
+ TQMap<TQString, MyMoneyMoney> balanceMap;
for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s ) {
MyMoneyAccount acc = file->account((*it_s).accountId());
// collect all overdues on the first day
- QDate schedDate = nextDate;
- if(QDate::currentDate() >= nextDate)
- schedDate = QDate::currentDate().addDays(1);
+ TQDate schedDate = nextDate;
+ if(TQDate::tqcurrentDate() >= nextDate)
+ schedDate = TQDate::tqcurrentDate().addDays(1);
balanceMap[acc.id()] += file->balance(acc.id());
}
@@ -1669,8 +1669,8 @@ void KHomeView::showCashFlowSummary()
}
//go through the splits and assign to liquid or other transfers
- const QValueList<MyMoneySplit> splits = transaction.splits();
- QValueList<MyMoneySplit>::const_iterator split_it;
+ const TQValueList<MyMoneySplit> splits = transaction.splits();
+ TQValueList<MyMoneySplit>::const_iterator split_it;
for (split_it = splits.begin(); split_it != splits.end(); ++split_it) {
if( (*split_it).accountId() != acc.id() ) {
ReportAccount repSplitAcc = ReportAccount((*split_it).accountId());
@@ -1680,7 +1680,7 @@ void KHomeView::showCashFlowSummary()
//convert to foreign currency if needed
if(repSplitAcc.currencyId() != file->baseCurrency().id()) {
- MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(QDate::currentDate());
+ MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
value = value * curPrice;
value = value.convert(10000);
}
@@ -1707,19 +1707,19 @@ void KHomeView::showCashFlowSummary()
}
//format the currency strings
- QString amountScheduledIncome = scheduledIncome.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountScheduledExpense = scheduledExpense.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountScheduledLiquidTransfer = scheduledLiquidTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountScheduledOtherTransfer = scheduledOtherTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountScheduledIncome = scheduledIncome.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountScheduledExpense = scheduledExpense.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountScheduledLiquidTransfer = scheduledLiquidTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountScheduledOtherTransfer = scheduledOtherTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- amountScheduledIncome.replace(" ","&nbsp;");
- amountScheduledExpense.replace(" ","&nbsp;");
- amountScheduledLiquidTransfer.replace(" ","&nbsp;");
- amountScheduledOtherTransfer.replace(" ","&nbsp;");
+ amountScheduledIncome.tqreplace(" ","&nbsp;");
+ amountScheduledExpense.tqreplace(" ","&nbsp;");
+ amountScheduledLiquidTransfer.tqreplace(" ","&nbsp;");
+ amountScheduledOtherTransfer.tqreplace(" ","&nbsp;");
//get liquid assets and liabilities
- QValueList<MyMoneyAccount> accounts;
- QValueList<MyMoneyAccount>::const_iterator account_it;
+ TQValueList<MyMoneyAccount> accounts;
+ TQValueList<MyMoneyAccount>::const_iterator account_it;
MyMoneyMoney liquidAssets;
MyMoneyMoney liquidLiabilities;
@@ -1733,11 +1733,11 @@ void KHomeView::showCashFlowSummary()
case MyMoneyAccount::Savings:
case MyMoneyAccount::Cash:
{
- MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), QDate::currentDate());
+ MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate());
//calculate balance for foreign currency accounts
if((*account_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*account_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
MyMoneyMoney baseValue = value * curPrice;
liquidAssets += baseValue;
liquidAssets = liquidAssets.convert(10000);
@@ -1750,11 +1750,11 @@ void KHomeView::showCashFlowSummary()
case MyMoneyAccount::CreditCard:
{
MyMoneyMoney value;
- value = MyMoneyFile::instance()->balance((*account_it).id(), QDate::currentDate());
+ value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate());
//calculate balance if foreign currency
if((*account_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*account_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
MyMoneyMoney baseValue = value * curPrice;
liquidLiabilities += baseValue;
liquidLiabilities = liquidLiabilities.convert(10000);
@@ -1773,12 +1773,12 @@ void KHomeView::showCashFlowSummary()
MyMoneyMoney liquidWorth = liquidAssets+liquidLiabilities;
//format assets, liabilities and net worth
- QString amountLiquidAssets = liquidAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountLiquidLiabilities = liquidLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountLiquidWorth = liquidWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- amountLiquidAssets.replace(" ","&nbsp;");
- amountLiquidLiabilities.replace(" ","&nbsp;");
- amountLiquidWorth.replace(" ","&nbsp;");
+ TQString amountLiquidAssets = liquidAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountLiquidLiabilities = liquidLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountLiquidWorth = liquidWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ amountLiquidAssets.tqreplace(" ","&nbsp;");
+ amountLiquidLiabilities.tqreplace(" ","&nbsp;");
+ amountLiquidWorth.tqreplace(" ","&nbsp;");
//show the summary
m_part->write("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">" + i18n("Cash Flow Summary") + "</div>\n<div class=\"gap\">&nbsp;</div>\n");
@@ -1807,19 +1807,19 @@ void KHomeView::showCashFlowSummary()
m_part->write("</tr>");
//add row with banding
- m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
+ m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
//print current income
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountIncome, incomeValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountIncome, incomeValue.isNegative())));
//print the scheduled income
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative())));
//print current expenses
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpense, expenseValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpense, expenseValue.isNegative())));
//print the scheduled expenses
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative())));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1849,19 +1849,19 @@ void KHomeView::showCashFlowSummary()
m_part->write("</tr>");
//add row with banding
- m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
+ m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
//print current liquid assets
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative())));
//print the scheduled transfers
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative())));
//print current liabilities
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative())));
//print the scheduled transfers
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative())));
m_part->write("</tr>");
@@ -1873,12 +1873,12 @@ void KHomeView::showCashFlowSummary()
MyMoneyMoney expectedAsset = liquidAssets + scheduledIncome + scheduledExpense + scheduledLiquidTransfer + scheduledOtherTransfer;
MyMoneyMoney expectedLiabilities = liquidLiabilities + scheduledLiquidTransfer;
- QString amountExpectedAsset = expectedAsset.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountExpectedLiabilities = expectedLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- QString amountProfit = profitValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- amountProfit.replace(" ","&nbsp;");
- amountExpectedAsset.replace(" ","&nbsp;");
- amountExpectedLiabilities.replace(" ","&nbsp;");
+ TQString amountExpectedAsset = expectedAsset.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountExpectedLiabilities = expectedLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ TQString amountProfit = profitValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
+ amountProfit.tqreplace(" ","&nbsp;");
+ amountExpectedAsset.tqreplace(" ","&nbsp;");
+ amountExpectedLiabilities.tqreplace(" ","&nbsp;");
@@ -1888,7 +1888,7 @@ void KHomeView::showCashFlowSummary()
//income and expense title
m_part->write("<tr class=\"itemtitle\">");
m_part->write("<td class=\"left\" colspan=\"4\">");
- m_part->write(i18n("Cash Flow Status"));
+ m_part->write(i18n("Cash Flow tqStatus"));
m_part->write("</td></tr>");
//column titles
m_part->write("<tr class=\"item\">");
@@ -1905,17 +1905,17 @@ void KHomeView::showCashFlowSummary()
m_part->write("</tr>");
//add row with banding
- m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
+ m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
m_part->write("<td>&nbsp;</td>");
//print expected assets
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative())));
//print expected liabilities
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative())));
//print expected profit
- m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountProfit, profitValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountProfit, profitValue.isNegative())));
m_part->write("</tr>");
diff --git a/kmymoney2/views/khomeview.h b/kmymoney2/views/khomeview.h
index 213fd91..f580ed4 100644
--- a/kmymoney2/views/khomeview.h
+++ b/kmymoney2/views/khomeview.h
@@ -24,9 +24,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-class QVBoxLayout;
-class QFrame;
+#include <tqwidget.h>
+class TQVBoxLayout;
+class TQFrame;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -51,6 +51,7 @@ class QFrame;
class KHomeView : public KMyMoneyViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Definition of bitmap used as argument for showAccounts().
@@ -60,13 +61,13 @@ public:
Payment = 2 ///< show payment accounts
};
- KHomeView(QWidget *parent=0, const char *name=0);
+ KHomeView(TQWidget *tqparent=0, const char *name=0);
~KHomeView();
protected:
void showPayments(void);
void showPaymentEntry(const MyMoneySchedule&, int cnt = 1);
- void showAccounts(paymentTypeE type, const QString& hdr);
+ void showAccounts(paymentTypeE type, const TQString& hdr);
void showAccountEntry(const MyMoneyAccount&);
void showFavoriteReports(void);
void showForecast(void);
@@ -78,8 +79,8 @@ protected:
void showBudget(void);
void showCashFlowSummary(void);
- const QString link(const QString& view, const QString& query, const QString& title = QString()) const;
- const QString linkend(void) const;
+ const TQString link(const TQString& view, const TQString& query, const TQString& title = TQString()) const;
+ const TQString linkend(void) const;
void loadView(void);
public slots:
@@ -99,9 +100,9 @@ public slots:
void slotPrintView(void);
signals:
- void ledgerSelected(const QString& id, const QString& transaction);
- void scheduleSelected(const QString& id);
- void reportSelected(const QString& id);
+ void ledgerSelected(const TQString& id, const TQString& transaction);
+ void scheduleSelected(const TQString& id);
+ void reportSelected(const TQString& id);
private:
/// \internal d-pointer class.
@@ -112,7 +113,7 @@ private:
/**
* daily balances of an account
*/
- typedef QMap<QDate, MyMoneyMoney> dailyBalances;
+ typedef TQMap<TQDate, MyMoneyMoney> dailyBalances;
/**
* Print an account and its balance and limit
@@ -129,7 +130,7 @@ private:
* Print text in the color set for negative numbers, if @p amount is negative
* abd @p isNegative is true
*/
- QString showColoredAmount(const QString& amount, bool isNegative);
+ TQString showColoredAmount(const TQString& amount, bool isNegative);
/**
* Run the forecast
@@ -139,11 +140,11 @@ private:
/**
* Calculate the forecast balance after a payment has been made
*/
- MyMoneyMoney forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, QDate& paymentDate);
+ MyMoneyMoney forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, TQDate& paymentDate);
KHTMLPart* m_part;
- QVBoxLayout* m_qvboxlayoutPage;
- QString m_filename;
+ TQVBoxLayout* m_qvboxtqlayoutPage;
+ TQString m_filename;
bool m_showAllSchedules;
bool m_needReload;
MyMoneyForecast m_forecast;
@@ -151,7 +152,7 @@ private:
/**
* daily forecast balance of accounts
*/
- QMap<QString, dailyBalances> m_accountList;
+ TQMap<TQString, dailyBalances> m_accountList;
};
diff --git a/kmymoney2/views/kinstitutionsview.cpp b/kmymoney2/views/kinstitutionsview.cpp
index 2c3ac5d..5fd9999 100644
--- a/kmymoney2/views/kinstitutionsview.cpp
+++ b/kmymoney2/views/kinstitutionsview.cpp
@@ -17,9 +17,9 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qheader.h>
-#include <qlabel.h>
-#include <qtabwidget.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,19 +36,19 @@
#include "../kmymoneyglobalsettings.h"
#include "../kmymoney2.h"
-KInstitutionsView::KInstitutionsView(QWidget *parent, const char *name) :
- KInstitutionsViewDecl(parent,name),
+KInstitutionsView::KInstitutionsView(TQWidget *tqparent, const char *name) :
+ KInstitutionsViewDecl(tqparent,name),
m_needReload(false)
{
m_accountTree->header()->setLabel(0, i18n("Institution/Account"));
- connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateNetWorth(void)));
- connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&)));
- connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)));
+ connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateNetWorth(void)));
+ connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&)));
+ connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts()));
}
KInstitutionsView::~KInstitutionsView()
@@ -75,7 +75,7 @@ void KInstitutionsView::show(void)
void KInstitutionsView::polish(void)
{
KInstitutionsViewDecl::polish();
- m_accountTree->setResizeMode(QListView::LastColumn);
+ m_accountTree->setResizeMode(TQListView::LastColumn);
m_accountTree->restoreLayout("Institution View Settings");
}
@@ -90,15 +90,15 @@ void KInstitutionsView::slotLoadAccounts(void)
void KInstitutionsView::loadAccounts(void)
{
- QMap<QString, bool> isOpen;
+ TQMap<TQString, bool> isOpen;
::timetrace("start load institutions view");
// remember the id of the current selected item
KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem();
- QString selectedItemId = (item) ? item->id() : QString();
+ TQString selectedItemId = (item) ? item->id() : TQString();
// keep a map of all 'expanded' accounts
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item && item->isOpen()) {
@@ -108,7 +108,7 @@ void KInstitutionsView::loadAccounts(void)
}
// remember the upper left corner of the viewport
- QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_accountTree->setUpdatesEnabled(false);
@@ -121,25 +121,25 @@ void KInstitutionsView::loadAccounts(void)
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyAccount> alist;
+ TQValueList<MyMoneyAccount> alist;
file->accountList(alist);
- QValueList<MyMoneyAccount>::const_iterator it_a;
+ TQValueList<MyMoneyAccount>::const_iterator it_a;
for(it_a = alist.begin(); it_a != alist.end(); ++it_a) {
m_accountMap[(*it_a).id()] = *it_a;
}
// we need to make sure we show stock accounts
- // under the right institution (the one of the parent account)
- QMap<QString, MyMoneyAccount>::iterator it_am;
+ // under the right institution (the one of the tqparent account)
+ TQMap<TQString, MyMoneyAccount>::iterator it_am;
for(it_am = m_accountMap.begin(); it_am != m_accountMap.end(); ++it_am) {
if((*it_am).isInvest()) {
- (*it_am).setInstitutionId(m_accountMap[(*it_am).parentAccountId()].institutionId());
+ (*it_am).setInstitutionId(m_accountMap[(*it_am).tqparentAccountId()].institutionId());
}
}
- QValueList<MyMoneySecurity> slist = file->currencyList();
+ TQValueList<MyMoneySecurity> slist = file->currencyList();
slist += file->securityList();
- QValueList<MyMoneySecurity>::const_iterator it_s;
+ TQValueList<MyMoneySecurity>::const_iterator it_s;
for(it_s = slist.begin(); it_s != slist.end(); ++it_s) {
m_securityMap[(*it_s).id()] = *it_s;
}
@@ -157,13 +157,13 @@ void KInstitutionsView::loadAccounts(void)
none.setName(i18n("Accounts with no institution assigned"));
KMyMoneyAccountTreeItem* noInstitutionItem = new KMyMoneyAccountTreeItem(m_accountTree, none);
noInstitutionItem->setPixmap(0,none.pixmap());
- loadSubAccounts(noInstitutionItem, QString());
+ loadSubAccounts(noInstitutionItem, TQString());
// hide it, if unused
noInstitutionItem->setVisible(noInstitutionItem->childCount() != 0);
- QValueList<MyMoneyInstitution> list = file->institutionList();
- QValueList<MyMoneyInstitution>::const_iterator it_i;
+ TQValueList<MyMoneyInstitution> list = file->institutionList();
+ TQValueList<MyMoneyInstitution>::const_iterator it_i;
for(it_i = list.begin(); it_i != list.end(); ++it_i) {
KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(m_accountTree, *it_i);
item->setPixmap(0, none.pixmap());
@@ -177,13 +177,13 @@ void KInstitutionsView::loadAccounts(void)
// scan through the list of accounts and re-expand those that were
// expanded and re-select the one that was probably selected before
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item) {
if(item->id() == selectedItemId)
m_accountTree->setSelected(item, true);
- if(isOpen.find(item->id()) != isOpen.end())
+ if(isOpen.tqfind(item->id()) != isOpen.end())
item->setOpen(true);
}
++it_lvi;
@@ -194,16 +194,16 @@ void KInstitutionsView::loadAccounts(void)
// turn updates back on
m_accountTree->setUpdatesEnabled(true);
- m_accountTree->repaintContents();
+ m_accountTree->tqrepaintContents();
::timetrace("done load institutions view");
}
-void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent)
+void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent)
{
bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked();
- const MyMoneyAccount& account = dynamic_cast<const MyMoneyAccount&>(parent->itemObject());
- QValueList<QString>::const_iterator it_a;
+ const MyMoneyAccount& account = dynamic_cast<const MyMoneyAccount&>(tqparent->itemObject());
+ TQValueList<TQString>::const_iterator it_a;
MyMoneyFile* file = MyMoneyFile::instance();
for(it_a = account.accountList().begin(); it_a != account.accountList().end(); ++it_a) {
MyMoneyAccount acc = m_accountMap[(*it_a)];
@@ -212,23 +212,23 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent)
if(acc.isClosed() && !showClosedAccounts)
continue;
const MyMoneySecurity& security = m_securityMap[acc.currencyId()];
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
prices += file->price(acc.currencyId(), security.tradingCurrency());
if(security.tradingCurrency() != file->baseCurrency().id()) {
MyMoneySecurity sec = m_securityMap[security.tradingCurrency()];
prices += file->price(sec.id(), file->baseCurrency().id());
}
- KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security);
+ KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security);
if(acc.id() == m_reconciliationAccount.id())
item->setReconciliation(true);
}
}
-void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QString& institutionId)
+void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQString& institutionId)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QMap<QString, MyMoneyAccount>::const_iterator it_a;
+ TQMap<TQString, MyMoneyAccount>::const_iterator it_a;
MyMoneyMoney value;
bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked();
@@ -244,7 +244,7 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q
if(acc.institutionId() == institutionId
&& !acc.isInvest()
&& (!acc.isClosed() || showClosedAccounts)) {
- QValueList<MyMoneyPrice> prices;
+ TQValueList<MyMoneyPrice> prices;
MyMoneySecurity security = file->baseCurrency();
try {
if(acc.currencyId() != file->baseCurrency().id()) {
@@ -257,7 +257,7 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q
delete e;
}
- KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security);
+ KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security);
if(acc.id() == m_reconciliationAccount.id())
item->setReconciliation(true);
@@ -276,8 +276,8 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q
// it does not take the negative sign for liability accounts
// into account. So we correct this here with the value we
// have calculated while filling the list
- parent->adjustTotalValue(-parent->totalValue()); // load a 0
- parent->adjustTotalValue(value); // now store the new value
+ tqparent->adjustTotalValue(-tqparent->totalValue()); // load a 0
+ tqparent->adjustTotalValue(value); // now store the new value
// we need to call slotUpdateNetWorth() here manually, because
// KMyMoneyAccountTreeItem::adjustTotalValue() does not send out
@@ -297,19 +297,19 @@ void KInstitutionsView::slotUpdateNetWorth(void)
item = dynamic_cast<KMyMoneyAccountTreeItem*>(item->nextSibling());
}
- QString s(i18n("Net Worth: "));
+ TQString s(i18n("Net Worth: "));
// FIXME figure out how to deal with the approximate
// if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id())))
// s += "~ ";
- s.replace(QString(" "), QString("&nbsp;"));
+ s.tqreplace(TQString(" "), TQString("&nbsp;"));
if(netWorth.isNegative()) {
s += "<b><font color=\"red\">";
}
const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency();
- QString v(netWorth.formatMoney(sec));
- s += v.replace(QString(" "), QString("&nbsp;"));
+ TQString v(netWorth.formatMoney(sec));
+ s += v.tqreplace(TQString(" "), TQString("&nbsp;"));
if(netWorth.isNegative()) {
s += "</font></b>";
}
@@ -318,14 +318,14 @@ void KInstitutionsView::slotUpdateNetWorth(void)
m_totalProfitsLabel->setText(s);
}
-void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance)
+void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance)
{
Q_UNUSED(reconciliationDate);
Q_UNUSED(endingBalance);
// scan through the list of accounts and mark all non
// expanded and re-select the one that was probably selected before
- QListViewItemIterator it_lvi(m_accountTree);
+ TQListViewItemIterator it_lvi(m_accountTree);
KMyMoneyAccountTreeItem* item;
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
@@ -337,7 +337,7 @@ void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const QD
m_reconciliationAccount = acc;
if(!acc.id().isEmpty()) {
- it_lvi = QListViewItemIterator(m_accountTree);
+ it_lvi = TQListViewItemIterator(m_accountTree);
while(it_lvi.current()) {
item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current());
if(item && item->itemObject().id() == acc.id()) {
diff --git a/kmymoney2/views/kinstitutionsview.h b/kmymoney2/views/kinstitutionsview.h
index 3a35713..9c1ab96 100644
--- a/kmymoney2/views/kinstitutionsview.h
+++ b/kmymoney2/views/kinstitutionsview.h
@@ -42,10 +42,11 @@
class KInstitutionsView : public KInstitutionsViewDecl
{
Q_OBJECT
+ TQ_OBJECT
private:
public:
- KInstitutionsView(QWidget *parent=0, const char *name=0);
+ KInstitutionsView(TQWidget *tqparent=0, const char *name=0);
virtual ~KInstitutionsView();
public slots:
@@ -58,22 +59,22 @@ public slots:
void show(void);
/**
- * Override the base class behaviour to restore the layout. Do not
- * do this in show() because show() itself may change the layout
+ * Override the base class behaviour to restore the tqlayout. Do not
+ * do this in show() because show() itself may change the tqlayout
* in undesired ways.
*/
void polish(void);
- void slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance);
+ void slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance);
protected:
void loadAccounts(void);
// load accounts that are kept at a specific institution
- void loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QString& institutionId);
+ void loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQString& institutionId);
- // load stock accounts under the investment account (parent)
- void loadSubAccounts(KMyMoneyAccountTreeItem* parent);
+ // load stock accounts under the investment account (tqparent)
+ void loadSubAccounts(KMyMoneyAccountTreeItem* tqparent);
protected slots:
void slotUpdateNetWorth(void);
@@ -85,7 +86,7 @@ private:
*
* @param type account type as defined in MyMoneyAccount::accountTypeE
*/
- const QPixmap accountImage(const MyMoneyAccount::accountTypeE type) const;
+ const TQPixmap accountImage(const MyMoneyAccount::accountTypeE type) const;
signals:
/**
@@ -117,9 +118,9 @@ signals:
private:
MyMoneyAccount m_reconciliationAccount;
- QMap<QString, MyMoneyAccount> m_accountMap;
- QMap<QString, MyMoneySecurity> m_securityMap;
- QMap<QString, unsigned long> m_transactionCountMap;
+ TQMap<TQString, MyMoneyAccount> m_accountMap;
+ TQMap<TQString, MyMoneySecurity> m_securityMap;
+ TQMap<TQString, unsigned long> m_transactionCountMap;
/// set if a view needs to be reloaded during show()
bool m_needReload;
diff --git a/kmymoney2/views/kinstitutionsviewdecl.ui b/kmymoney2/views/kinstitutionsviewdecl.ui
index 3a0a740..678ec08 100644
--- a/kmymoney2/views/kinstitutionsviewdecl.ui
+++ b/kmymoney2/views/kinstitutionsviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KInstitutionsViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KInstitutionsViewDecl</cstring>
</property>
@@ -27,9 +27,9 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -45,18 +45,18 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_totalProfitsLabel</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@@ -68,7 +68,7 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter|AlignRight</set>
</property>
<property name="hAlign" stdset="0">
@@ -78,5 +78,8 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include>
+</includes>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kinvestmentlistitem.cpp b/kmymoney2/views/kinvestmentlistitem.cpp
index c2c41d9..f3cf29b 100644
--- a/kmymoney2/views/kinvestmentlistitem.cpp
+++ b/kmymoney2/views/kinvestmentlistitem.cpp
@@ -23,7 +23,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpainter.h>
+#include <tqpainter.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -40,8 +40,8 @@
#include <kmymoney/mymoneysecurity.h>
#include <kmymoney/mymoneyfile.h>
-KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount& account)
- : KListViewItem(parent)
+KInvestmentListItem::KInvestmentListItem(KListView* tqparent, const MyMoneyAccount& account)
+ : KListViewItem(tqparent)
{
bColumn5Negative = false;
bColumn6Negative = false;
@@ -50,7 +50,7 @@ KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount
bColumn9Negative = false;
m_account = account;
- m_listView = parent;
+ m_listView = tqparent;
MyMoneySecurity security;
MyMoneyFile* file = MyMoneyFile::instance();
@@ -60,7 +60,7 @@ KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount
int prec = MyMoneyMoney::denomToPrec(m_tradingCurrency.smallestAccountFraction());
- QValueList<MyMoneyTransaction> transactionList;
+ TQValueList<MyMoneyTransaction> transactionList;
// FIXME PRICE
// equity_price_history history = equity.priceHistory();
@@ -100,37 +100,37 @@ KInvestmentListItem::~KInvestmentListItem()
// FIXME PRICE
#if 0
-const QString KInvestmentListItem::calculate1WeekGain(const equity_price_history& history)
+const TQString KInvestmentListItem::calculate1WeekGain(const equity_price_history& history)
{
return calculateGain(history, -7, 0, false, bColumn6Negative);
}
-const QString KInvestmentListItem::calculate4WeekGain(const equity_price_history& history)
+const TQString KInvestmentListItem::calculate4WeekGain(const equity_price_history& history)
{
return calculateGain(history, -28, 0, false, bColumn7Negative);
}
-const QString KInvestmentListItem::calculate3MonthGain(const equity_price_history& history)
+const TQString KInvestmentListItem::calculate3MonthGain(const equity_price_history& history)
{
return calculateGain(history, 0, -3, false, bColumn8Negative);
}
-const QString KInvestmentListItem::calculateYTDGain(const equity_price_history& history)
+const TQString KInvestmentListItem::calculateYTDGain(const equity_price_history& history)
{
return calculateGain(history, 0, 0, true, bColumn9Negative);
}
-const QString KInvestmentListItem::calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative)
+const TQString KInvestmentListItem::calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative)
{
bNegative = false;
if(history.isEmpty())
{
- return QString("0.0%");
+ return TQString("0.0%");
}
else
{
bool bFoundCurrent = false, bFoundComparison = false;
- QDate tempDate, comparisonDate = QDate::currentDate();
+ TQDate tempDate, comparisonDate = TQDate::tqcurrentDate();
if(YTD)
{
@@ -147,9 +147,9 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his
//find the current value, or closest to the current value.
equity_price_history::ConstIterator itToday = history.end();
- for(tempDate = QDate::currentDate(); tempDate >= comparisonDate; )
+ for(tempDate = TQDate::tqcurrentDate(); tempDate >= comparisonDate; )
{
- itToday = history.find(tempDate);
+ itToday = history.tqfind(tempDate);
if(itToday != history.end())
{
currentValue = itToday.data();
@@ -162,14 +162,14 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his
if(!bFoundCurrent)
{
- return QString("0.0%");
+ return TQString("0.0%");
}
- //find a date that is closest to a week old, not older, and not today's date. Because its a QMap, this map
+ //find a date that is closest to a week old, not older, and not today's date. Because its a TQMap, this map
//should already be sorted earliest to latest.
for(equity_price_history::ConstIterator it = history.begin(); it != history.end(); ++it)
{
- if(it.key() >= comparisonDate && it.key() < QDate::currentDate())
+ if(it.key() >= comparisonDate && it.key() < TQDate::tqcurrentDate())
{
comparisonDate = it.key();
comparisonValue = it.data();
@@ -180,7 +180,7 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his
if(!bFoundComparison)
{
- return QString("0.0%");
+ return TQString("0.0%");
}
//qDebug("Current date/value to use is %s/%s, Previous is %s/%s", tempDate.toString().data(), currentValue.toString().data(), comparisonDate.toString().data(), comparisonValue.toString().data());
@@ -195,21 +195,21 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his
bNegative = true;
}
- QString ds = QString("%1%").arg(result, 0, 'f', 3);
+ TQString ds = TQString("%1%").tqarg(result, 0, 'f', 3);
return ds;
/*MyMoneyMoney result = (currentValue / comparisonValue);
result = result * 100;
result = result - 100;
qDebug("final result = %s", result.toString().data());
- return QString(result.formatMoney("", 3) + "%");*/
+ return TQString(result.formatMoney("", 3) + "%");*/
}
}
- return QString("");
+ return TQString("");
}
#endif
-int KInvestmentListItem::compare(QListViewItem* i, int col, bool ascending) const
+int KInvestmentListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
KInvestmentListItem* item = dynamic_cast<KInvestmentListItem*>(i);
// do special sorting only for numeric columns
@@ -247,7 +247,7 @@ int KInvestmentListItem::compare(QListViewItem* i, int col, bool ascending) cons
return KListViewItem::compare(i, col, ascending);
}
-void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align)
+void KInvestmentListItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align)
{
bool bPaintRed = false;
if((column == COLUMN_RAWGAIN_INDEX && bColumn5Negative) ||
@@ -261,15 +261,15 @@ void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int co
p->save();
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
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
- QFont font = KMyMoneyGlobalSettings::listCellFont();
+ TQFont font = KMyMoneyGlobalSettings::listCellFont();
// strike out closed accounts
if(m_account.isClosed())
font.setStrikeOut(true);
@@ -279,15 +279,15 @@ void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int co
if(bPaintRed)
{
- QColorGroup _cg( cg2);
- QColor c = _cg.text();
- _cg.setColor(QColorGroup::Text, Qt::red);
- QListViewItem::paintCell(p, _cg, column, width, align);
- _cg.setColor(QColorGroup::Text, c);
+ TQColorGroup _cg( cg2);
+ TQColor c = _cg.text();
+ _cg.setColor(TQColorGroup::Text, TQt::red);
+ TQListViewItem::paintCell(p, _cg, column, width, align);
+ _cg.setColor(TQColorGroup::Text, c);
}
else
{
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
p->restore();
diff --git a/kmymoney2/views/kinvestmentlistitem.h b/kmymoney2/views/kinvestmentlistitem.h
index d0ad62b..cb0d944 100644
--- a/kmymoney2/views/kinvestmentlistitem.h
+++ b/kmymoney2/views/kinvestmentlistitem.h
@@ -59,30 +59,30 @@
class KInvestmentListItem : public KListViewItem
{
public:
- KInvestmentListItem(KListView* parent, const MyMoneyAccount& security);
+ KInvestmentListItem(KListView* tqparent, const MyMoneyAccount& security);
~KInvestmentListItem();
- QString securityId() const { return m_account.currencyId(); };
+ TQString securityId() const { return m_account.currencyId(); };
const MyMoneyAccount& account(void) const { return m_account; };
const MyMoneySecurity tradingCurrency(void) const { return m_tradingCurrency; };
/**
* 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;
protected:
- 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);
private:
// FIXME PRICE
#if 0
- const QString calculate1WeekGain(const equity_price_history& history);
- const QString calculate4WeekGain(const equity_price_history& history);
- const QString calculate3MonthGain(const equity_price_history& history);
- const QString calculateYTDGain(const equity_price_history& history);
- const QString calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative);
+ const TQString calculate1WeekGain(const equity_price_history& history);
+ const TQString calculate4WeekGain(const equity_price_history& history);
+ const TQString calculate3MonthGain(const equity_price_history& history);
+ const TQString calculateYTDGain(const equity_price_history& history);
+ const TQString calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative);
#endif
private:
diff --git a/kmymoney2/views/kinvestmentview.cpp b/kmymoney2/views/kinvestmentview.cpp
index ae8cc11..d6ebb1a 100644
--- a/kmymoney2/views/kinvestmentview.cpp
+++ b/kmymoney2/views/kinvestmentview.cpp
@@ -62,8 +62,8 @@ public:
-KInvestmentView::KInvestmentView(QWidget *parent, const char *name) :
- KInvestmentViewDecl(parent,name),
+KInvestmentView::KInvestmentView(TQWidget *tqparent, const char *name) :
+ KInvestmentViewDecl(tqparent,name),
d(new Private)
{
m_table->setRootIsDecorated(false);
@@ -72,31 +72,31 @@ KInvestmentView::KInvestmentView(QWidget *parent, const char *name) :
m_table->addColumn(i18n("Symbol"));
int col = m_table->addColumn(i18n("Value"));
- m_table->setColumnAlignment(col, Qt::AlignRight);
+ m_table->setColumnAlignment(col, TQt::AlignRight);
col = m_table->addColumn(i18n("Quantity"));
- m_table->setColumnAlignment(col, Qt::AlignRight);
+ m_table->setColumnAlignment(col, TQt::AlignRight);
col = m_table->addColumn(i18n("Price"));
- m_table->setColumnAlignment(col, Qt::AlignRight);
+ m_table->setColumnAlignment(col, TQt::AlignRight);
m_table->setMultiSelection(false);
- m_table->setColumnWidthMode(0, QListView::Maximum);
+ m_table->setColumnWidthMode(0, TQListView::Maximum);
m_table->header()->setResizeEnabled(true);
m_table->setAllColumnsShowFocus(true);
m_table->setShowSortIndicator(true);
m_table->restoreLayout(KGlobal::config(), "Investment Settings");
- connect(m_table, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)),
- this, SLOT(slotListContextMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(m_table, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotSelectionChanged(QListViewItem *)));
+ connect(m_table, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)),
+ this, TQT_SLOT(slotListContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(m_table, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem *)));
- connect(m_accountComboBox, SIGNAL(accountSelected(const QString&)),
- this, SLOT(slotSelectAccount(const QString&)));
+ connect(m_accountComboBox, TQT_SIGNAL(accountSelected(const TQString&)),
+ this, TQT_SLOT(slotSelectAccount(const TQString&)));
- connect(m_table, SIGNAL(doubleClicked(QListViewItem*,const QPoint&, int)), kmymoney2->action("investment_edit"), SLOT(activate()));
+ connect(m_table, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&, int)), kmymoney2->action("investment_edit"), TQT_SLOT(activate()));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView()));
}
KInvestmentView::~KInvestmentView()
@@ -105,7 +105,7 @@ KInvestmentView::~KInvestmentView()
delete d;
}
-void KInvestmentView::slotSelectionChanged(QListViewItem *item)
+void KInvestmentView::slotSelectionChanged(TQListViewItem *item)
{
kmymoney2->slotSelectInvestment();
@@ -121,7 +121,7 @@ void KInvestmentView::slotSelectionChanged(QListViewItem *item)
}
}
-void KInvestmentView::slotListContextMenu(KListView* /* lv */, QListViewItem* /*item*/, const QPoint& /*point*/)
+void KInvestmentView::slotListContextMenu(KListView* /* lv */, TQListViewItem* /*item*/, const TQPoint& /*point*/)
{
kmymoney2->slotSelectInvestment();
KInvestmentListItem *pItem = dynamic_cast<KInvestmentListItem*>(m_table->selectedItem());
@@ -160,9 +160,9 @@ void KInvestmentView::loadAccounts(void)
m_accountComboBox->loadList(MyMoneyAccount::Investment);
if(d->m_account.id().isEmpty()) {
- QStringList list = m_accountComboBox->accountList();
+ TQStringList list = m_accountComboBox->accountList();
if(list.count()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = list.begin(); it != list.end(); ++it) {
MyMoneyAccount a = file->account(*it);
if(a.accountType() == MyMoneyAccount::Investment) {
@@ -205,7 +205,7 @@ bool KInvestmentView::slotSelectAccount(const MyMoneyObject& obj)
return rc;
}
-bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transactionId, const bool /* reconciliation*/)
+bool KInvestmentView::slotSelectAccount(const TQString& id, const TQString& transactionId, const bool /* reconciliation*/)
{
bool rc = true;
@@ -215,9 +215,9 @@ bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transa
try {
d->m_account = MyMoneyFile::instance()->account(id);
// if a stock account is selected, we show the
- // the corresponding parent (investment) account
+ // the corresponding tqparent (investment) account
if(d->m_account.isInvest()) {
- d->m_account = MyMoneyFile::instance()->account(d->m_account.parentAccountId());
+ d->m_account = MyMoneyFile::instance()->account(d->m_account.tqparentAccountId());
}
// TODO if we don't have an investment account, then we should switch to the ledger view
d->m_newAccountLoaded = true;
@@ -246,8 +246,8 @@ bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transa
void KInvestmentView::clear(void)
{
// setup header font
- QFont font = KMyMoneyGlobalSettings::listHeaderFont();
- QFontMetrics fm( font );
+ TQFont font = KMyMoneyGlobalSettings::listHeaderFont();
+ TQFontMetrics fm( font );
int height = fm.lineSpacing()+6;
m_table->header()->setMinimumHeight(height);
m_table->header()->setMaximumHeight(height);
@@ -261,7 +261,7 @@ void KInvestmentView::clear(void)
m_table->clear();
// and the selected account in the combo box
- m_accountComboBox->setSelected(QString());
+ m_accountComboBox->setSelected(TQString());
}
void KInvestmentView::loadView(void)
@@ -287,9 +287,9 @@ void KInvestmentView::loadView(void)
|| !KMyMoneyGlobalSettings::hideClosedAccounts();
try {
d->m_account = file->account(d->m_account.id());
- QStringList securities = d->m_account.accountList();
+ TQStringList securities = d->m_account.accountList();
- for(QStringList::ConstIterator it = securities.begin(); it != securities.end(); ++it) {
+ for(TQStringList::ConstIterator it = securities.begin(); it != securities.end(); ++it) {
MyMoneyAccount acc = file->account(*it);
if(!acc.isClosed() || showClosedAccounts)
new KInvestmentListItem(m_table, acc);
diff --git a/kmymoney2/views/kinvestmentview.h b/kmymoney2/views/kinvestmentview.h
index ba0aecc..98e2b9a 100644
--- a/kmymoney2/views/kinvestmentview.h
+++ b/kmymoney2/views/kinvestmentview.h
@@ -47,9 +47,10 @@ class MyMoneyInvestTransaction;
class KInvestmentView : public KInvestmentViewDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KInvestmentView(QWidget *parent=0, const char *name=0);
+ KInvestmentView(TQWidget *tqparent=0, const char *name=0);
~KInvestmentView();
/**
@@ -79,7 +80,7 @@ public slots:
* @retval true selection of account referenced by @p id succeeded
* @retval false selection of account failed
*/
- bool slotSelectAccount(const QString& accountId, const QString& transactionId = QString(), const bool reconciliation = false);
+ bool slotSelectAccount(const TQString& accountId, const TQString& transactionId = TQString(), const bool reconciliation = false);
/**
* This method is provided for convenience and acts as the method above.
@@ -110,9 +111,9 @@ protected slots:
* This slot receives the signal from the listview @c lv control that the context menu
* was requested for @c item at @c point.
*/
- void slotListContextMenu(KListView* lv, QListViewItem* item, const QPoint& point);
+ void slotListContextMenu(KListView* lv, TQListViewItem* item, const TQPoint& point);
- void slotSelectionChanged(QListViewItem *item);
+ void slotSelectionChanged(TQListViewItem *item);
signals:
@@ -120,7 +121,7 @@ signals:
* This signal is emitted, if an account has been selected
* which cannot handled by this view.
*/
- void accountSelected(const QString& accountId, const QString& transactionId);
+ void accountSelected(const TQString& accountId, const TQString& transactionId);
void accountSelected(const MyMoneyObject&);
diff --git a/kmymoney2/views/kinvestmentviewdecl.ui b/kmymoney2/views/kinvestmentviewdecl.ui
index 1c74d50..d339bbf 100644
--- a/kmymoney2/views/kinvestmentviewdecl.ui
+++ b/kmymoney2/views/kinvestmentviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KInvestmentViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KInvestmentViewDecl</cstring>
</property>
@@ -22,15 +22,15 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -53,7 +53,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>280</width>
<height>20</height>
@@ -79,5 +79,8 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccountcombo.h</include>
+</includes>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kmymoneyfile.cpp b/kmymoney2/views/kmymoneyfile.cpp
index 4046cc0..76d3ea1 100644
--- a/kmymoney2/views/kmymoneyfile.cpp
+++ b/kmymoney2/views/kmymoneyfile.cpp
@@ -39,7 +39,7 @@ KMyMoneyFile::KMyMoneyFile()
}
/*
-KMyMoneyFile::KMyMoneyFile(const QString&)
+KMyMoneyFile::KMyMoneyFile(const TQString&)
{
}
*/
diff --git a/kmymoney2/views/kmymoneyfile.h b/kmymoney2/views/kmymoneyfile.h
index ccda128..d7675c0 100644
--- a/kmymoney2/views/kmymoneyfile.h
+++ b/kmymoney2/views/kmymoneyfile.h
@@ -42,7 +42,7 @@ private:
bool m_open;
protected:
- // KMyMoneyFile(const QString&);
+ // KMyMoneyFile(const TQString&);
public:
KMyMoneyFile();
diff --git a/kmymoney2/views/kmymoneytransaction.cpp b/kmymoney2/views/kmymoneytransaction.cpp
index ee16a6a..373c55e 100644
--- a/kmymoney2/views/kmymoneytransaction.cpp
+++ b/kmymoney2/views/kmymoneytransaction.cpp
@@ -45,7 +45,7 @@ KMyMoneyTransaction::~KMyMoneyTransaction()
{
}
-void KMyMoneyTransaction::setSplitId(const QString& id)
+void KMyMoneyTransaction::setSplitId(const TQString& id)
{
m_splitId = id;
}
diff --git a/kmymoney2/views/kmymoneytransaction.h b/kmymoney2/views/kmymoneytransaction.h
index 4deb184..f15f204 100644
--- a/kmymoney2/views/kmymoneytransaction.h
+++ b/kmymoney2/views/kmymoneytransaction.h
@@ -50,11 +50,11 @@ public:
KMyMoneyTransaction(const MyMoneyTransaction& t);
~KMyMoneyTransaction();
- void setSplitId(const QString& id);
- const QString& splitId(void) const { return m_splitId; };
+ void setSplitId(const TQString& id);
+ const TQString& splitId(void) const { return m_splitId; };
private:
- QString m_splitId;
+ TQString m_splitId;
};
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp
index 8719d79..bf1b5cc 100644
--- a/kmymoney2/views/kmymoneyview.cpp
+++ b/kmymoney2/views/kmymoneyview.cpp
@@ -25,17 +25,17 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlabel.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qprogressdialog.h>
-#include <qtextcodec.h>
-#include <qstatusbar.h>
-
-#include <qcursor.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqprogressdialog.h>
+#include <tqtextcodec.h>
+#include <tqstatusbar.h>
+
+#include <tqcursor.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -120,15 +120,15 @@
#define RECOVER_KEY_ID "0xD2B08440"
-KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name)
- : KJanusWidget(parent, name, KJanusWidget::IconList),
+KMyMoneyView::KMyMoneyView(TQWidget *tqparent, const char *name)
+ : KJanusWidget(tqparent, name, KJanusWidget::IconList),
// m_bankRightClick(false),
m_inConstructor(true),
m_fileOpen(false),
m_fmode(0600)
{
// the global variable kmymoney2 is not yet assigned. So we construct it here
- QObject* kmymoney2 = parent->parent();
+ TQObject* kmymoney2 = tqparent->tqparent();
const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16;
newStorage();
@@ -137,100 +137,100 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name)
DesktopIcon("home", iconSize));
m_homeView = new KHomeView(m_homeViewFrame, "HomeView");
- connect(m_homeView, SIGNAL(ledgerSelected(const QString&, const QString&)),
- this, SLOT(slotLedgerSelected(const QString&, const QString&)));
- connect(m_homeView, SIGNAL(scheduleSelected(const QString&)),
- this, SLOT(slotScheduleSelected(const QString&)));
- connect(m_homeView, SIGNAL(reportSelected(const QString&)),
- this, SLOT(slotShowReport(const QString&)));
+ connect(m_homeView, TQT_SIGNAL(ledgerSelected(const TQString&, const TQString&)),
+ this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&)));
+ connect(m_homeView, TQT_SIGNAL(scheduleSelected(const TQString&)),
+ this, TQT_SLOT(slotScheduleSelected(const TQString&)));
+ connect(m_homeView, TQT_SIGNAL(reportSelected(const TQString&)),
+ this, TQT_SLOT(slotShowReport(const TQString&)));
// Page 1
m_institutionsViewFrame = addVBoxPage( i18n("Institutions"), i18n("Institutions"),
DesktopIcon("institutions", iconSize));
addTitleBar(m_institutionsViewFrame, i18n("Institutions"));
m_institutionsView = new KInstitutionsView(m_institutionsViewFrame, "InstitutionsView");
- connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotInstitutionEdit(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&)));
- connect(m_institutionsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&)));
- connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_institutionsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)));
+ connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotInstitutionEdit(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&)));
+ connect(m_institutionsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&)));
+ connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_institutionsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)));
// Page 2
m_accountsViewFrame = addVBoxPage( i18n("Accounts"), i18n("Accounts"),
DesktopIcon("accounts", iconSize));
addTitleBar(m_accountsViewFrame, i18n("Accounts"));
m_accountsView = new KAccountsView(m_accountsViewFrame, "AccountsView");
- connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&)));
- connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInvestment(const MyMoneyObject&)));
- connect(m_accountsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
- connect(m_accountsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&)));
- connect(m_accountsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&)));
- connect(this, SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, SLOT(slotUpdateIconPos(unsigned int)));
- connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_accountsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)));
+ connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&)));
+ connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInvestment(const MyMoneyObject&)));
+ connect(m_accountsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
+ connect(m_accountsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&)));
+ connect(m_accountsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(this, TQT_SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, TQT_SLOT(slotUpdateIconPos(unsigned int)));
+ connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_accountsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)));
// Page 3
m_scheduleViewFrame = addVBoxPage( i18n("Scheduled\ntransactions"), i18n("Bills & Reminders"),
DesktopIcon("schedule", iconSize));
addTitleBar(m_scheduleViewFrame, i18n("Scheduled transactions"));
m_scheduledView = new KScheduledView(m_scheduleViewFrame, "ScheduledView");
- connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_scheduledView, SLOT(slotReloadView()));
- connect(m_scheduledView, SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, SLOT(slotSelectSchedule(const MyMoneySchedule&)));
- connect(m_scheduledView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowScheduleContextMenu()));
- connect(m_scheduledView, SIGNAL(enterSchedule()), kmymoney2, SLOT(slotScheduleEnter()));
- connect(m_scheduledView, SIGNAL(skipSchedule()), kmymoney2, SLOT(slotScheduleSkip()));
- connect(m_scheduledView, SIGNAL(editSchedule()), kmymoney2, SLOT(slotScheduleEdit()));
+ connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_scheduledView, TQT_SLOT(slotReloadView()));
+ connect(m_scheduledView, TQT_SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, TQT_SLOT(slotSelectSchedule(const MyMoneySchedule&)));
+ connect(m_scheduledView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowScheduleContextMenu()));
+ connect(m_scheduledView, TQT_SIGNAL(enterSchedule()), kmymoney2, TQT_SLOT(slotScheduleEnter()));
+ connect(m_scheduledView, TQT_SIGNAL(skipSchedule()), kmymoney2, TQT_SLOT(slotScheduleSkip()));
+ connect(m_scheduledView, TQT_SIGNAL(editSchedule()), kmymoney2, TQT_SLOT(slotScheduleEdit()));
// Page 4
m_categoriesViewFrame = addVBoxPage( i18n("Categories"), i18n("Categories"),
DesktopIcon("categories", iconSize));
addTitleBar(m_categoriesViewFrame, i18n("Categories"));
m_categoriesView = new KCategoriesView(m_categoriesViewFrame, "CategoriesView");
- connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&)));
- connect(m_categoriesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
- connect(m_categoriesView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&)));
- connect(m_categoriesView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&)));
+ connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&)));
+ connect(m_categoriesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&)));
+ connect(m_categoriesView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&)));
+ connect(m_categoriesView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&)));
// Page 5
m_payeesViewFrame = addVBoxPage( i18n("Payees"), i18n("Payees"),
DesktopIcon("payee", iconSize));
addTitleBar(m_payeesViewFrame, i18n("Payees"));
m_payeesView = new KPayeesView(m_payeesViewFrame, "PayeesView");
- connect(kmymoney2, SIGNAL(payeeCreated(const QString&)), m_payeesView, SLOT(slotSelectPayeeAndTransaction(const QString&)));
- connect(kmymoney2, SIGNAL(payeeRename()), m_payeesView, SLOT(slotStartRename()));
- connect(m_payeesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowPayeeContextMenu()));
- connect(m_payeesView, SIGNAL(selectObjects(const QValueList<MyMoneyPayee>&)), kmymoney2, SLOT(slotSelectPayees(const QValueList<MyMoneyPayee>&)));
- connect(m_payeesView, SIGNAL(transactionSelected(const QString&, const QString&)),
- this, SLOT(slotLedgerSelected(const QString&, const QString&)));
+ connect(kmymoney2, TQT_SIGNAL(payeeCreated(const TQString&)), m_payeesView, TQT_SLOT(slotSelectPayeeAndTransaction(const TQString&)));
+ connect(kmymoney2, TQT_SIGNAL(payeeRename()), m_payeesView, TQT_SLOT(slotStartRename()));
+ connect(m_payeesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowPayeeContextMenu()));
+ connect(m_payeesView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyPayee>&)), kmymoney2, TQT_SLOT(slotSelectPayees(const TQValueList<MyMoneyPayee>&)));
+ connect(m_payeesView, TQT_SIGNAL(transactionSelected(const TQString&, const TQString&)),
+ this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&)));
// Page 6
m_ledgerViewFrame = addVBoxPage( i18n("Ledgers"), i18n("Ledgers"),
DesktopIcon("ledger", iconSize));
m_ledgerView = new KGlobalLedgerView(m_ledgerViewFrame, "GlobalLedgerView");
- connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_ledgerView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowTransactionContextMenu()));
- connect(m_ledgerView, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&)));
- connect(m_ledgerView, SIGNAL(newTransaction()), kmymoney2, SLOT(slotTransactionsNew()));
- connect(m_ledgerView, SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, SLOT(slotTransactionsCancelOrEnter(bool&)));
- connect(m_ledgerView, SIGNAL(startEdit()), kmymoney2, SLOT(slotTransactionsEdit()));
- connect(m_ledgerView, SIGNAL(endEdit()), kmymoney2, SLOT(slotTransactionsEnter()));
- connect(m_ledgerView, SIGNAL(toggleReconciliationFlag()), kmymoney2, SLOT(slotToggleReconciliationFlag()));
- connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_ledgerView, SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)));
- connect(kmymoney2, SIGNAL(selectAllTransactions()), m_ledgerView, SLOT(slotSelectAllTransactions()));
+ connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_ledgerView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowTransactionContextMenu()));
+ connect(m_ledgerView, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, TQT_SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&)));
+ connect(m_ledgerView, TQT_SIGNAL(newTransaction()), kmymoney2, TQT_SLOT(slotTransactionsNew()));
+ connect(m_ledgerView, TQT_SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, TQT_SLOT(slotTransactionsCancelOrEnter(bool&)));
+ connect(m_ledgerView, TQT_SIGNAL(startEdit()), kmymoney2, TQT_SLOT(slotTransactionsEdit()));
+ connect(m_ledgerView, TQT_SIGNAL(endEdit()), kmymoney2, TQT_SLOT(slotTransactionsEnter()));
+ connect(m_ledgerView, TQT_SIGNAL(toggleReconciliationFlag()), kmymoney2, TQT_SLOT(slotToggleReconciliationFlag()));
+ connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_ledgerView, TQT_SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)));
+ connect(kmymoney2, TQT_SIGNAL(selectAllTransactions()), m_ledgerView, TQT_SLOT(slotSelectAllTransactions()));
// Page 7
m_investmentViewFrame = addVBoxPage( i18n("Investments"), i18n("Investments"),
DesktopIcon("investments", iconSize));
addTitleBar(m_investmentViewFrame, i18n("Investments"));
m_investmentView = new KInvestmentView(m_investmentViewFrame, "InvestmentView");
- connect(m_investmentView, SIGNAL(accountSelected(const QString&, const QString&)),
- this, SLOT(slotLedgerSelected(const QString&, const QString&)));
- connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_investmentView, SIGNAL(investmentRightMouseClick()), kmymoney2, SLOT(slotShowInvestmentContextMenu()));
+ connect(m_investmentView, TQT_SIGNAL(accountSelected(const TQString&, const TQString&)),
+ this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&)));
+ connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_investmentView, TQT_SIGNAL(investmentRightMouseClick()), kmymoney2, TQT_SLOT(slotShowInvestmentContextMenu()));
// Page 8
m_reportsViewFrame = addVBoxPage(i18n("Reports"), i18n("Reports"),
@@ -242,10 +242,10 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name)
DesktopIcon("budget", iconSize));
addTitleBar(m_budgetViewFrame, i18n("Budgets"));
m_budgetView = new KBudgetView(m_budgetViewFrame, "BudgetView");
- connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_budgetView, SLOT(slotRefreshView()));
- connect(m_budgetView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowBudgetContextMenu()));
- connect(m_budgetView, SIGNAL(selectObjects(const QValueList<MyMoneyBudget>&)), kmymoney2, SLOT(slotSelectBudget(const QValueList<MyMoneyBudget>&)));
- connect(kmymoney2, SIGNAL(budgetRename()), m_budgetView, SLOT(slotStartRename()));
+ connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_budgetView, TQT_SLOT(slotRefreshView()));
+ connect(m_budgetView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowBudgetContextMenu()));
+ connect(m_budgetView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyBudget>&)), kmymoney2, TQT_SLOT(slotSelectBudget(const TQValueList<MyMoneyBudget>&)));
+ connect(kmymoney2, TQT_SIGNAL(budgetRename()), m_budgetView, TQT_SLOT(slotStartRename()));
// Page 10
m_forecastViewFrame = addVBoxPage( i18n("Forecast"), i18n("Forecast"),
@@ -254,19 +254,19 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name)
m_forecastView = new KForecastView(m_forecastViewFrame, "ForecastView");
// get rid of the title text
- QWidget* widget = dynamic_cast<QWidget*>(child("KJanusWidgetTitleLabel", "QLabel"));
+ TQWidget* widget = dynamic_cast<TQWidget*>(child("KJanusWidgetTitleLabel", TQLABEL_OBJECT_NAME_STRING));
if(widget)
widget->hide();
// and the separator below it
- widget = dynamic_cast<QWidget*>(child(0, "KSeparator"));
+ widget = dynamic_cast<TQWidget*>(child(0, "KSeparator"));
if(widget)
widget->hide();
// select the page first, before connecting the aboutToShow signal
// because we don't want to override the information stored in the config file
showPage(0);
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotRememberPage(QWidget*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotRememberPage(TQWidget*)));
m_inConstructor = false;
}
@@ -276,24 +276,24 @@ KMyMoneyView::~KMyMoneyView()
removeStorage();
}
-void KMyMoneyView::addTitleBar(QWidget* parent, const QString& title)
+void KMyMoneyView::addTitleBar(TQWidget* tqparent, const TQString& title)
{
- KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( parent, "titleLabel" );
- label->setMinimumSize( QSize( 100, 30 ) );
+ KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( tqparent, "titleLabel" );
+ label->setMinimumSize( TQSize( 100, 30 ) );
label->setRightImageFile("pics/titlelabel_background.png" );
label->setText(title);
}
void KMyMoneyView::showTitleBar(bool show)
{
- QObjectList *l = queryList( 0, "titleLabel" );
- QObjectListIterator it( *l ); // iterate over the labels
- QObject *obj;
+ TQObjectList *l = queryList( 0, "titleLabel" );
+ TQObjectListIterator it( *l ); // iterate over the labels
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((QWidget*)obj)->setShown( show );
+ ((TQWidget*)obj)->setShown( show );
}
delete l; // delete the list, not the objects
}
@@ -337,7 +337,7 @@ bool KMyMoneyView::canPrint(void)
return rc;
}
-bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, QString& tooltip) const
+bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, TQString& tooltip) const
{
// we can only create transactions in the ledger view so
// we check that this is the active page
@@ -350,7 +350,7 @@ bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransac
return rc;
}
-bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
// we can only modify transactions in the ledger view so
// we check that this is the active page
@@ -365,7 +365,7 @@ bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransac
return rc;
}
-bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
// we can only duplicate transactions in the ledger view so
// we check that this is the active page
@@ -380,7 +380,7 @@ bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTran
return rc;
}
-bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const
+bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const
{
bool rc;
// we can only edit transactions in the ledger view so
@@ -397,7 +397,7 @@ bool KMyMoneyView::createNewTransaction(void)
{
bool rc = false;
KMyMoneyRegister::SelectedTransactions list;
- QString txt;
+ TQString txt;
if(canCreateTransactions(list, txt)) {
rc = m_ledgerView->selectEmptyTransaction();
}
@@ -407,7 +407,7 @@ bool KMyMoneyView::createNewTransaction(void)
TransactionEditor* KMyMoneyView::startEdit(const KMyMoneyRegister::SelectedTransactions& list)
{
TransactionEditor* editor = 0;
- QString txt;
+ TQString txt;
if(canEditTransactions(list, txt) || canCreateTransactions(list, txt)) {
editor = m_ledgerView->startEdit(list);
}
@@ -451,16 +451,16 @@ void KMyMoneyView::enableViews(int state)
emit viewStateChanged(state != 0);
}
-void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& transaction)
+void KMyMoneyView::slotLedgerSelected(const TQString& _accId, const TQString& transaction)
{
MyMoneyAccount acc = MyMoneyFile::instance()->account(_accId);
- QString accId(_accId);
+ TQString accId(_accId);
switch(acc.accountType()) {
case MyMoneyAccount::Stock:
// if a stock account is selected, we show the
- // the corresponding parent (investment) account
- acc = MyMoneyFile::instance()->account(acc.parentAccountId());
+ // the corresponding tqparent (investment) account
+ acc = MyMoneyFile::instance()->account(acc.tqparentAccountId());
accId = acc.id();
// tricky fall through here
@@ -492,19 +492,19 @@ void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& tran
}
}
-void KMyMoneyView::slotPayeeSelected(const QString& payee, const QString& account, const QString& transaction)
+void KMyMoneyView::slotPayeeSelected(const TQString& payee, const TQString& account, const TQString& transaction)
{
showPage(pageIndex(m_payeesViewFrame));
m_payeesView->slotSelectPayeeAndTransaction(payee, account, transaction);
}
-void KMyMoneyView::slotScheduleSelected(const QString& scheduleId)
+void KMyMoneyView::slotScheduleSelected(const TQString& scheduleId)
{
MyMoneySchedule sched = MyMoneyFile::instance()->schedule(scheduleId);
kmymoney2->slotSelectSchedule(sched);
}
-void KMyMoneyView::slotShowReport(const QString& reportid)
+void KMyMoneyView::slotShowReport(const TQString& reportid)
{
showPage(pageIndex(m_reportsViewFrame));
m_reportsView->slotOpenReport(reportid);
@@ -536,7 +536,7 @@ void KMyMoneyView::closeFile(void)
m_fileOpen = false;
}
-void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len)
+void KMyMoneyView::ungetString(TQIODevice *qfile, char *buf, int len)
{
buf = &buf[len-1];
while(len--) {
@@ -546,7 +546,7 @@ void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len)
bool KMyMoneyView::readFile(const KURL& url)
{
- QString filename;
+ TQString filename;
// newStorage();
m_fileOpen = false;
@@ -583,7 +583,7 @@ bool KMyMoneyView::readFile(const KURL& url)
} else {
if(!KIO::NetAccess::download(url, filename, NULL)) {
KMessageBox::detailedError(this,
- i18n("Error while loading file '%1'!").arg(url.url()),
+ i18n("Error while loading file '%1'!").tqarg(url.url()),
KIO::NetAccess::lastErrorString(),
i18n("File access error"));
return false;
@@ -592,26 +592,26 @@ bool KMyMoneyView::readFile(const KURL& url)
// let's glimps into the file to figure out, if it's one
// of the old (uncompressed) or new (compressed) files.
- QFile file(filename);
- QFileInfo info(file);
+ TQFile file(filename);
+ TQFileInfo info(file);
if(!info.isFile()) {
- QString msg=i18n("<b>%1</b> is not a KMyMoney file.").arg(filename);
- KMessageBox::error(this, QString("<p>")+msg, i18n("Filetype Error"));
+ TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").tqarg(filename);
+ KMessageBox::error(this, TQString("<p>")+msg, i18n("Filetype Error"));
return false;
}
m_fmode = 0600;
- m_fmode |= info.permission(QFileInfo::ReadGroup) ? 040 : 0;
- m_fmode |= info.permission(QFileInfo::WriteGroup) ? 020 : 0;
- m_fmode |= info.permission(QFileInfo::ReadOther) ? 004 : 0;
- m_fmode |= info.permission(QFileInfo::WriteOther) ? 002 : 0;
+ m_fmode |= info.permission(TQFileInfo::ReadGroup) ? 040 : 0;
+ m_fmode |= info.permission(TQFileInfo::WriteGroup) ? 020 : 0;
+ m_fmode |= info.permission(TQFileInfo::ReadOther) ? 004 : 0;
+ m_fmode |= info.permission(TQFileInfo::WriteOther) ? 002 : 0;
- QIODevice *qfile = 0;
+ TQIODevice *qfile = 0;
bool rc = true;
// There's a problem with the KFilterDev and KGPGFile classes:
// One supports the at(n) member but not ungetch() together with
// readBlock() and the other does not provide an at(n) method but
- // supports readBlock() that considers the ungetch() buffer. QFile
+ // supports readBlock() that considers the ungetch() buffer. TQFile
// supports everything so this is not a problem. We solve the problem
// for now by keeping track of which method can be used.
bool haveAt = true;
@@ -619,29 +619,29 @@ bool KMyMoneyView::readFile(const KURL& url)
emit kmmFilePlugin (preOpen);
::timetrace("start reading file");
if(file.open(IO_ReadOnly)) {
- QByteArray hdr(2);
+ TQByteArray hdr(2);
int cnt;
cnt = file.readBlock(hdr.data(), 2);
file.close();
if(cnt == 2) {
- if(QString(hdr) == QString("\037\213")) { // gzipped?
+ if(TQString(hdr) == TQString("\037\213")) { // gzipped?
::timetrace("detected GZIP");
qfile = KFilterDev::deviceForFile(filename, COMPRESSION_MIME_TYPE);
- } else if(QString(hdr) == QString("--")){ // PGP ASCII armored?
+ } else if(TQString(hdr) == TQString("--")){ // PGP ASCII armored?
::timetrace("detected GPG");
if(KGPGFile::GPGAvailable()) {
::timetrace("have GPG");
- qfile = new KGPGFile(filename);
+ qfile = TQT_TQIODEVICE(new KGPGFile(filename));
haveAt = false;
isEncrypted = true;
} else {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").arg(filename)));
- qfile = new QFile(file.name());
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").tqarg(filename)));
+ qfile = TQT_TQIODEVICE(new TQFile(file.name()));
}
} else {
// we can't use file directly, as we delete qfile later on
- qfile = new QFile(file.name());
+ qfile = TQT_TQIODEVICE(new TQFile(file.name()));
}
::timetrace("open file");
@@ -656,9 +656,9 @@ bool KMyMoneyView::readFile(const KURL& url)
// Ok, we got the first block of 8 bytes. Read in the two
// unsigned long int's by preserving endianess. This is
- // achieved by reading them through a QDataStream object
- Q_INT32 magic0, magic1;
- QDataStream s(hdr, IO_ReadOnly);
+ // achieved by reading them through a TQDataStream object
+ TQ_INT32 magic0, magic1;
+ TQDataStream s(hdr, IO_ReadOnly);
s >> magic0;
s >> magic1;
@@ -689,9 +689,9 @@ bool KMyMoneyView::readFile(const KURL& url)
qfile->at(0);
else
ungetString(qfile, hdr.data(), 70);
- QRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>");
- QRegExp gncexp("<gnc-v(\\d+)");
- QCString txt(hdr, 70);
+ TQRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>");
+ TQRegExp gncexp("<gnc-v(\\d+)");
+ TQCString txt(hdr, 70);
if(kmyexp.search(txt) != -1) {
::timetrace("is XML format");
pReader = new MyMoneyStorageXML;
@@ -714,18 +714,18 @@ bool KMyMoneyView::readFile(const KURL& url)
::timetrace("done reading to memory");
} else {
if(m_fileType == KmmBinary) {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").tqarg(filename)));
} else {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").tqarg(filename)));
}
rc = false;
}
} else {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").tqarg(filename)));
rc = false;
}
} catch (MyMoneyException *e) {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").arg(filename, e->what())));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").tqarg(filename, e->what())));
delete e;
rc = false;
}
@@ -735,13 +735,13 @@ bool KMyMoneyView::readFile(const KURL& url)
}
qfile->close();
} else {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename)));
rc = false;
}
delete qfile;
}
} else {
- KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename)));
rc = false;
}
@@ -775,7 +775,7 @@ bool KMyMoneyView::readFile(const KURL& url)
return initializeStorage();
}
-void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const QString& name) const
+void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const TQString& name) const
{
MyMoneyFile* file = MyMoneyFile::instance();
if(_acc.name() != name) {
@@ -805,7 +805,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) {
retry = false;
break;
case 1: // permanent error
- KMessageBox::detailedError (this, i18n("Can't open database %1\n").arg(dbURL.prettyURL()), reader->lastError());
+ KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(dbURL.prettyURL()), reader->lastError());
if (pDBMgr) {
removeStorage();
delete pDBMgr;
@@ -819,7 +819,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) {
}
return false;
} else {
- QString options = dbURL.queryItem("options") + ",override";
+ TQString options = dbURL.queryItem("options") + ",override";
dbURL.removeQueryItem("mode"); // now redundant
dbURL.removeQueryItem("options");
dbURL.addQueryItem("options", options);
@@ -911,7 +911,7 @@ bool KMyMoneyView::initializeStorage()
// Check if we have to modify the file before we allow to work with it
IMyMoneyStorage* s = MyMoneyFile::instance()->storage();
while (s->fileFixVersion() < s->currentFixVersion()) {
- qDebug("%s", (QString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data());
+ qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(s->currentFixVersion())).data());
switch (s->fileFixVersion()) {
case 0:
fixFile_0();
@@ -967,11 +967,11 @@ bool KMyMoneyView::initializeStorage()
return true;
}
-void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const QString& keyList)
+void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const TQString& keyList)
{
- QIODevice *dev = qfile;
+ TQIODevice *dev = TQT_TQIODEVICE(qfile);
KFilterBase *base = 0;
- QIODevice *statusDevice = dev;
+ TQIODevice *statusDevice = dev;
bool encryptedOk = true;
bool encryptRecover = false;
@@ -983,23 +983,23 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
if(KMyMoneyGlobalSettings::encryptRecover()) {
encryptRecover = true;
- if(!KGPGFile::keyAvailable(QString(RECOVER_KEY_ID))) {
- KMessageBox::sorry(this, QString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").arg(RECOVER_KEY_ID), i18n("GPG-Key not found"));
+ if(!KGPGFile::keyAvailable(TQString(RECOVER_KEY_ID))) {
+ KMessageBox::sorry(this, TQString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").tqarg(RECOVER_KEY_ID), i18n("GPG-Key not found"));
encryptRecover = false;
}
}
- QStringList keys = QStringList::split(",", keyList);
- QStringList::const_iterator it_s;
+ TQStringList keys = TQStringList::split(",", keyList);
+ TQStringList::const_iterator it_s;
for(it_s = keys.begin(); it_s != keys.begin(); ++it_s) {
if(!KGPGFile::keyAvailable(*it_s)) {
- KMessageBox::sorry(this, QString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").arg(*it_s), i18n("GPG-Key not found"));
+ KMessageBox::sorry(this, TQString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").tqarg(*it_s), i18n("GPG-Key not found"));
encryptedOk = false;
}
}
if(encryptedOk == true) {
- QString msg = QString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>.");
+ TQString msg = TQString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>.");
if(KMessageBox::questionYesNo(this, msg, i18n("Store GPG encrypted"), KStdGuiItem::yes(), KStdGuiItem::no(), "StoreEncrypted") == KMessageBox::No) {
encryptedOk = false;
@@ -1007,7 +1007,7 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
}
}
- int mask = umask((~m_fmode) & 0777);
+ int tqmask = umask((~m_fmode) & 0777);
bool blocked = MyMoneyFile::instance()->signalsBlocked();
MyMoneyFile::instance()->blockSignals(true);
MyMoneyFileTransaction ft;
@@ -1017,8 +1017,8 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
base++;
KGPGFile *kgpg = new KGPGFile(qfile->name());
if(kgpg) {
- QStringList keys = QStringList::split(",", keyList);
- QStringList::const_iterator it_s;
+ TQStringList keys = TQStringList::split(",", keyList);
+ TQStringList::const_iterator it_s;
for(it_s = keys.begin(); it_s != keys.end(); ++it_s) {
kgpg->addRecipient((*it_s).latin1());
}
@@ -1027,11 +1027,11 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
}
MyMoneyFile::instance()->setValue("kmm-encryption-key", keyList);
}
- statusDevice = dev = kgpg;
+ statusDevice = dev = TQT_TQIODEVICE(kgpg);
if(!dev || !dev->open(IO_WriteOnly)) {
MyMoneyFile::instance()->blockSignals(blocked);
delete dev;
- throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name()));
}
} else if(!plaintext) {
@@ -1039,26 +1039,26 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
base = KFilterBase::findFilterByMimeType( COMPRESSION_MIME_TYPE );
if(base) {
qfile->close();
- base->setDevice(qfile, false);
+ base->setDevice(TQT_TQIODEVICE(qfile), false);
// we need to reopen the file to set the mode inside the filter stuff
dev = new KFilterDev(base, true);
if(!dev || !dev->open(IO_WriteOnly)) {
MyMoneyFile::instance()->blockSignals(blocked);
delete dev;
- throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name()));
}
statusDevice = base->device();
}
}
- umask(mask);
+ umask(tqmask);
ft.commit();
pWriter->setProgressCallback(&KMyMoneyView::progressCallback);
- dev->resetStatus();
+ dev->resetqStatus();
pWriter->writeFile(dev, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage()));
MyMoneyFile::instance()->blockSignals(blocked);
if(statusDevice->status() != IO_Ok) {
- throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name()));
}
pWriter->setProgressCallback(0);
@@ -1067,16 +1067,16 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter,
dev->close();
if(statusDevice->status() != IO_Ok) {
delete dev;
- throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name()));
}
delete dev;
} else
qfile->close();
}
-bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList)
+bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList)
{
- QString filename = url.path();
+ TQString filename = url.path();
if (!fileOpen()) {
KMessageBox::error(this, i18n("Tried to access a file when it's not open"));
@@ -1090,7 +1090,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList)
"If you still want to use older versions of KMyMoney with your data files, "
"please make sure you keep a backup-file of your finance data. "
"If you want to abort this operation, please press Cancel now"),
- QString::null, KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel)
+ TQString(), KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel)
return false;
#endif
@@ -1115,19 +1115,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList)
bool rc = true;
try {
if(! url.isValid()) {
- throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").arg(url.url()));
+ throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(url.url()));
}
if(url.isLocalFile()) {
filename = url.path();
int fmode = 0600;
gid_t gid = static_cast<gid_t>(-1); // don't change the group id (see "man 2 chown")
- QFileInfo fi(filename);
+ TQFileInfo fi(filename);
if(fi.exists()) {
- fmode |= fi.permission(QFileInfo::ReadGroup) ? 040 : 0;
- fmode |= fi.permission(QFileInfo::WriteGroup) ? 020 : 0;
- fmode |= fi.permission(QFileInfo::ReadOther) ? 004 : 0;
- fmode |= fi.permission(QFileInfo::WriteOther) ? 002 : 0;
+ fmode |= fi.permission(TQFileInfo::ReadGroup) ? 040 : 0;
+ fmode |= fi.permission(TQFileInfo::WriteGroup) ? 020 : 0;
+ fmode |= fi.permission(TQFileInfo::ReadOther) ? 004 : 0;
+ fmode |= fi.permission(TQFileInfo::WriteOther) ? 002 : 0;
if(fi.groupId() != static_cast<uint>(-2))
gid = fi.groupId();
}
@@ -1135,19 +1135,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList)
// create a new basic block here, so that the object qfile gets
// deleted, before we reach the chown() call
{
- int mask = umask((~fmode) & 0777);
+ int tqmask = umask((~fmode) & 0777);
KSaveFile qfile(filename, fmode);
- umask(mask);
+ umask(tqmask);
if(qfile.status() == 0) {
try {
saveToLocalFile(qfile.file(), pWriter, plaintext, keyList);
} catch (MyMoneyException* e) {
qfile.abort();
delete e;
- throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename));
}
} else {
- throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename));
}
}
chown(filename, static_cast<uid_t>(-1), gid);
@@ -1155,7 +1155,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList)
KTempFile tmpfile;
saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList);
if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL))
- throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url()));
tmpfile.unlink();
}
m_fileType = KmmXML;
@@ -1210,7 +1210,7 @@ bool KMyMoneyView::saveAsDatabase(const KURL& url)
KMessageBox::detailedError (this,
i18n("Can't open or create database %1\n"
"Retry SaveAsDatabase and click Help"
- " for further info").arg(url.prettyURL()), writer->lastError());
+ " for further info").tqarg(url.prettyURL()), writer->lastError());
}
delete writer;
return (rc);
@@ -1224,7 +1224,7 @@ bool KMyMoneyView::dirty(void)
return MyMoneyFile::instance()->dirty();
}
-bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance)
+bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance)
{
bool ok = true;
@@ -1249,7 +1249,7 @@ bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDat
void KMyMoneyView::finishReconciliation(const MyMoneyAccount& /* account */)
{
- emit reconciliationStarts(MyMoneyAccount(), QDate(), MyMoneyMoney());
+ emit reconciliationStarts(MyMoneyAccount(), TQDate(), MyMoneyMoney());
}
void KMyMoneyView::newFile(void)
@@ -1268,7 +1268,7 @@ void KMyMoneyView::slotSetBaseCurrency(const MyMoneySecurity& baseCurrency)
MyMoneyFile::instance()->setBaseCurrency(baseCurrency);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency"));
+ KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(e->what()), i18n("Set base currency"));
delete e;
}
}
@@ -1282,15 +1282,15 @@ void KMyMoneyView::selectBaseCurrency(void)
// check if we have a base currency. If not, we need to select one
if(file->baseCurrency().id().isEmpty()) {
KCurrencyEditDlg dlg(this, "CurrencyEditDlg");
- connect(&dlg, SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, SLOT(slotSetBaseCurrency(const MyMoneySecurity&)));
+ connect(&dlg, TQT_SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, TQT_SLOT(slotSetBaseCurrency(const MyMoneySecurity&)));
dlg.exec();
}
if(!file->baseCurrency().id().isEmpty()) {
// check that all accounts have a currency
- QValueList<MyMoneyAccount> list;
+ TQValueList<MyMoneyAccount> list;
file->accountList(list);
- QValueList<MyMoneyAccount>::Iterator it;
+ TQValueList<MyMoneyAccount>::Iterator it;
// don't forget those standard accounts
list << file->asset();
@@ -1370,7 +1370,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("BAM", i18n("Bosnian Convertible Mark")), create);
loadDefaultCurrency(MyMoneySecurity("BWP", i18n("Botswana Pula")), create);
loadDefaultCurrency(MyMoneySecurity("BRL", i18n("Brazilian Real"), "R$"), create);
- loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("BND", i18n("Brunei Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("BGL", i18n("Bulgarian Lev")), create);
loadDefaultCurrency(MyMoneySecurity("BIF", i18n("Burundi Franc")), create);
@@ -1385,7 +1385,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("CNY", i18n("Chinese Yuan Renminbi")), create);
loadDefaultCurrency(MyMoneySecurity("COP", i18n("Colombian Peso")), create);
loadDefaultCurrency(MyMoneySecurity("KMF", i18n("Comoros Franc")), create);
- loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), QChar(0x20A1)), create);
+ loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), TQChar(0x20A1)), create);
loadDefaultCurrency(MyMoneySecurity("HRK", i18n("Croatian Kuna")), create);
loadDefaultCurrency(MyMoneySecurity("CUP", i18n("Cuban Peso")), create);
loadDefaultCurrency(MyMoneySecurity("CZK", i18n("Czech Koruna")), create);
@@ -1393,18 +1393,18 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("DJF", i18n("Djibouti Franc")), create);
loadDefaultCurrency(MyMoneySecurity("DOP", i18n("Dominican Peso")), create);
loadDefaultCurrency(MyMoneySecurity("XCD", i18n("East Caribbean Dollar"), "$"), create);
- loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("SVC", i18n("El Salvador Colon")), create);
loadDefaultCurrency(MyMoneySecurity("ERN", i18n("Eritrean Nakfa")), create);
loadDefaultCurrency(MyMoneySecurity("EEK", i18n("Estonian Kroon")), create);
loadDefaultCurrency(MyMoneySecurity("ETB", i18n("Ethiopian Birr")), create);
- loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), QChar(0x20ac)), true);
- loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), TQChar(0x20ac)), true);
+ loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("FJD", i18n("Fiji Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("GMD", i18n("Gambian Dalasi")), create);
loadDefaultCurrency(MyMoneySecurity("GEL", i18n("Georgian Lari")), create);
loadDefaultCurrency(MyMoneySecurity("GHC", i18n("Ghanaian Cedi")), create);
- loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("GTQ", i18n("Guatemalan Quetzal")), create);
loadDefaultCurrency(MyMoneySecurity("GWP", i18n("Guinea-Bissau Peso")), create);
loadDefaultCurrency(MyMoneySecurity("GYD", i18n("Guyanan Dollar"), "$"), create);
@@ -1413,21 +1413,21 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("HKD", i18n("Hong Kong Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("HUF", i18n("Hungarian Forint"), "HUF", 1, 1, 100), create);
loadDefaultCurrency(MyMoneySecurity("ISK", i18n("Iceland Krona")), create);
- loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), QChar(0x20A8)), create);
+ loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), TQChar(0x20A8)), create);
loadDefaultCurrency(MyMoneySecurity("IDR", i18n("Indonesian Rupiah"), "IDR", 100, 1), create);
loadDefaultCurrency(MyMoneySecurity("IRR", i18n("Iranian Rial"), "IRR", 1, 1), create);
loadDefaultCurrency(MyMoneySecurity("IQD", i18n("Iraqi Dinar"), "IQD", 1000, 1000), create);
- loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), QChar(0x20AA)), create);
+ loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), TQChar(0x20AA)), create);
loadDefaultCurrency(MyMoneySecurity("JMD", i18n("Jamaican Dollar"), "$"), create);
- loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), QChar(0x00A5), 100, 1), create);
+ loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), TQChar(0x00A5), 100, 1), create);
loadDefaultCurrency(MyMoneySecurity("JOD", i18n("Jordanian Dinar"), "JOD", 1000, 1000), create);
loadDefaultCurrency(MyMoneySecurity("KZT", i18n("Kazakhstan Tenge")), create);
loadDefaultCurrency(MyMoneySecurity("KES", i18n("Kenyan Shilling")), create);
loadDefaultCurrency(MyMoneySecurity("KWD", i18n("Kuwaiti Dinar"), "KWD", 1000, 1000), create);
loadDefaultCurrency(MyMoneySecurity("KGS", i18n("Kyrgyzstan Som")), create);
- loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), QChar(0x20AD)), create);
+ loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), TQChar(0x20AD)), create);
loadDefaultCurrency(MyMoneySecurity("LVL", i18n("Latvian Lats")), create);
- loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("LSL", i18n("Lesotho Loti")), create);
loadDefaultCurrency(MyMoneySecurity("LRD", i18n("Liberian Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("LYD", i18n("Libyan Dinar"), "LYD", 1000, 1000), create);
@@ -1443,7 +1443,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("MUR", i18n("Mauritius Rupee")), create);
loadDefaultCurrency(MyMoneySecurity("MXN", i18n("Mexican Peso"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("MDL", i18n("Moldavian Leu")), create);
- loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), QChar(0x20AE)), create);
+ loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), TQChar(0x20AE)), create);
loadDefaultCurrency(MyMoneySecurity("MAD", i18n("Moroccan Dirham")), create);
loadDefaultCurrency(MyMoneySecurity("MZM", i18n("Mozambique Metical")), create);
loadDefaultCurrency(MyMoneySecurity("MMK", i18n("Myanmar Kyat")), create);
@@ -1451,8 +1451,8 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("NPR", i18n("Nepalese Rupee")), create);
loadDefaultCurrency(MyMoneySecurity("NZD", i18n("New Zealand Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("NIC", i18n("Nicaraguan Cordoba Oro")), create);
- loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), QChar(0x20A6)), create);
- loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), QChar(0x20A9)), create);
+ loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), TQChar(0x20A6)), create);
+ loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), TQChar(0x20A9)), create);
loadDefaultCurrency(MyMoneySecurity("NOK", i18n("Norwegian Kroner"), "kr"), create);
loadDefaultCurrency(MyMoneySecurity("OMR", i18n("Omani Rial"), "OMR", 1000, 1000), create);
loadDefaultCurrency(MyMoneySecurity("PKR", i18n("Pakistan Rupee")), create);
@@ -1460,9 +1460,9 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("PGK", i18n("Papua New Guinea Kina")), create);
loadDefaultCurrency(MyMoneySecurity("PYG", i18n("Paraguay Guarani")), create);
loadDefaultCurrency(MyMoneySecurity("PEN", i18n("Peruvian Nuevo Sol")), create);
- loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), QChar(0x20B1)), create);
+ loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), TQChar(0x20B1)), create);
loadDefaultCurrency(MyMoneySecurity("PLN", i18n("Polish Zloty")), create);
- loadDefaultCurrency(MyMoneySecurity("QAR", i18n("Qatari Rial")), create);
+ loadDefaultCurrency(MyMoneySecurity("TQAR", i18n("Qatari Rial")), create);
loadDefaultCurrency(MyMoneySecurity("RON", i18n("Romanian Leu (new)")), true);
loadDefaultCurrency(MyMoneySecurity("RUB", i18n("Russian Ruble")), true);
loadDefaultCurrency(MyMoneySecurity("RWF", i18n("Rwanda Franc")), create);
@@ -1477,19 +1477,19 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("SBD", i18n("Solomon Islands Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("SOS", i18n("Somali Shilling")), create);
loadDefaultCurrency(MyMoneySecurity("ZAR", i18n("South African Rand")), create);
- loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), QChar(0x20A9)), create);
+ loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), TQChar(0x20A9)), create);
loadDefaultCurrency(MyMoneySecurity("LKR", i18n("Sri Lanka Rupee")), create);
- loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("SDD", i18n("Sudanese Dinar")), create);
loadDefaultCurrency(MyMoneySecurity("SRG", i18n("Suriname Guilder")), create);
loadDefaultCurrency(MyMoneySecurity("SZL", i18n("Swaziland Lilangeni")), create);
loadDefaultCurrency(MyMoneySecurity("SEK", i18n("Swedish Krona")), create);
loadDefaultCurrency(MyMoneySecurity("CHF", i18n("Swiss Franc"), "SFr"), create);
- loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), QChar(0x00A3)), create);
+ loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), TQChar(0x00A3)), create);
loadDefaultCurrency(MyMoneySecurity("TWD", i18n("Taiwan Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("TJS", i18n("Tajikistan Somani")), create);
loadDefaultCurrency(MyMoneySecurity("TZS", i18n("Tanzanian Shilling")), create);
- loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), QChar(0x0E3F)), create);
+ loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), TQChar(0x0E3F)), create);
loadDefaultCurrency(MyMoneySecurity("TOP", i18n("Tongan Pa'anga")), create);
loadDefaultCurrency(MyMoneySecurity("TTD", i18n("Trinidad and Tobago Dollar"), "$"), create);
loadDefaultCurrency(MyMoneySecurity("TND", i18n("Tunisian Dinar"), "TND", 1000, 1000), create);
@@ -1503,7 +1503,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("UZS", i18n("Uzbekistani Sum")), create);
loadDefaultCurrency(MyMoneySecurity("VUV", i18n("Vanuatu Vatu")), create);
loadDefaultCurrency(MyMoneySecurity("VEB", i18n("Venezuelan Bolivar")), create);
- loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), QChar(0x20AB)), create);
+ loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), TQChar(0x20AB)), create);
loadDefaultCurrency(MyMoneySecurity("YUM", i18n("Yugoslav Dinar")), create);
loadDefaultCurrency(MyMoneySecurity("ZMK", i18n("Zambian Kwacha")), create);
loadDefaultCurrency(MyMoneySecurity("ZWD", i18n("Zimbabwe Dollar"), "$"), create);
@@ -1514,7 +1514,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
loadDefaultCurrency(MyMoneySecurity("XAG", i18n("Silver"), "XAG", 1, 1000000), create);
}
-void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, const QString& sym, const QDate& date, const MyMoneyMoney& rate, const QString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction)
+void KMyMoneyView::loadAncientCurrency(const TQString& id, const TQString& name, const TQString& sym, const TQDate& date, const MyMoneyMoney& rate, const TQString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction)
{
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyPrice price(id, newId, date, rate, "KMyMoney");
@@ -1544,34 +1544,34 @@ void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, c
void KMyMoneyView::loadAncientCurrencies(void)
{
- loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", QDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR");
- loadAncientCurrency("DEM", i18n("German Mark"), "DM", QDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR");
- loadAncientCurrency("FRF", i18n("French Franc"), "FF", QDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR");
- loadAncientCurrency("ITL", i18n("Italian Lira"), QChar(0x20A4), QDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR");
- loadAncientCurrency("ESP", i18n("Spanish Peseta"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR");
- loadAncientCurrency("NLG", i18n("Dutch Guilder"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR");
- loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR");
- loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR");
- loadAncientCurrency("PTE", i18n("Portuguese Escudo"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR");
- loadAncientCurrency("IEP", i18n("Irish Pound"), QChar(0x00A3), QDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR");
- loadAncientCurrency("FIM", i18n("Finnish Markka"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR");
- loadAncientCurrency("GRD", i18n("Greek Drachma"), QChar(0x20AF), QDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR");
+ loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", TQDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR");
+ loadAncientCurrency("DEM", i18n("German Mark"), "DM", TQDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR");
+ loadAncientCurrency("FRF", i18n("French Franc"), "FF", TQDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR");
+ loadAncientCurrency("ITL", i18n("Italian Lira"), TQChar(0x20A4), TQDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR");
+ loadAncientCurrency("ESP", i18n("Spanish Peseta"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR");
+ loadAncientCurrency("NLG", i18n("Dutch Guilder"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR");
+ loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR");
+ loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR");
+ loadAncientCurrency("PTE", i18n("Portuguese Escudo"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR");
+ loadAncientCurrency("IEP", i18n("Irish Pound"), TQChar(0x00A3), TQDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR");
+ loadAncientCurrency("FIM", i18n("Finnish Markka"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR");
+ loadAncientCurrency("GRD", i18n("Greek Drachma"), TQChar(0x20AF), TQDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR");
- loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", QDate(2005,6,30), MyMoneyMoney(1, 10000), "RON");
+ loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", TQDate(2005,6,30), MyMoneyMoney(1, 10000), "RON");
- loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", QDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB");
+ loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", TQDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB");
- loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", QDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR");
+ loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", TQDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR");
// Source: http://www.tf-portfoliosolutions.net/products/turkishlira.aspx
- loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", QDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY");
+ loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", TQDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY");
// Source: http://www.focus.de/finanzen/news/malta-und-zypern_aid_66058.html
- loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", QDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR");
- loadAncientCurrency("CYP", i18n("Cyprus Pound"), QString("C%1").arg(QChar(0x00A3)), QDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR");
+ loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", TQDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR");
+ loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR");
// Source: http://www.focus.de/finanzen/news/waehrungszone-slowakei-ist-neuer-euro-staat_aid_359025.html
- loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", QDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR");
+ loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", TQDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR");
}
void KMyMoneyView::viewUp(void)
@@ -1580,7 +1580,7 @@ void KMyMoneyView::viewUp(void)
return;
}
-void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/)
+void KMyMoneyView::viewAccountList(const TQString& /*selectAccount*/)
{
if(pageIndex(m_accountsViewFrame) != activePageIndex())
showPage(1);
@@ -1591,13 +1591,13 @@ void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/)
void KMyMoneyView::slotRefreshViews()
{
// turn off sync between ledger and investment view
- disconnect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&)));
- disconnect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&)));
+ disconnect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ disconnect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
// TODO turn sync between ledger and investment view if selected by user
if(KMyMoneyGlobalSettings::syncLedgerInvestment()) {
- connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&)));
- connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
+ connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&)));
}
showTitleBar(KMyMoneyGlobalSettings::showTitleBar());
@@ -1623,12 +1623,12 @@ void KMyMoneyView::slotShowTransactionDetail(bool detailed)
}
-void KMyMoneyView::progressCallback(int current, int total, const QString& msg)
+void KMyMoneyView::progressCallback(int current, int total, const TQString& msg)
{
kmymoney2->progressCallback(current, total, msg);
}
-void KMyMoneyView::slotRememberPage(QWidget* w)
+void KMyMoneyView::slotRememberPage(TQWidget* w)
{
KConfig *config = KGlobal::config();
config->setGroup("Last Use Settings");
@@ -1645,22 +1645,22 @@ void KMyMoneyView::fixFile_2(void)
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyTransactionFilter filter;
filter.setReportAllSplits( false );
- QValueList<MyMoneyTransaction> transactionList;
+ TQValueList<MyMoneyTransaction> transactionList;
file->transactionList(transactionList, filter);
// scan the transactions and modify transactions with two splits
// which reference an account and a category to have the memo text
// of the account.
- QValueList<MyMoneyTransaction>::Iterator it_t;
+ TQValueList<MyMoneyTransaction>::Iterator it_t;
int count = 0;
for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) {
if((*it_t).splitCount() == 2) {
- QString accountId;
- QString categoryId;
- QString accountMemo;
- QString categoryMemo;
- const QValueList<MyMoneySplit>& splits = (*it_t).splits();
- QValueList<MyMoneySplit>::const_iterator it_s;
+ TQString accountId;
+ TQString categoryId;
+ TQString accountMemo;
+ TQString categoryMemo;
+ const TQValueList<MyMoneySplit>& splits = (*it_t).splits();
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = splits.begin(); it_s != splits.end(); ++it_s) {
MyMoneyAccount acc = file->account((*it_s).accountId());
if(acc.isIncomeExpense()) {
@@ -1688,23 +1688,23 @@ void KMyMoneyView::fixFile_2(void)
void KMyMoneyView::fixFile_1(void)
{
- // we need to fix reports. If the account filter list contains
+ // we need to fix reports. If the account filter list tqcontains
// investment accounts, we need to add the stock accounts to the list
// as well if we don't have the expert mode enabled
if(!KMyMoneyGlobalSettings::expertMode()) {
try {
- QValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList();
- QValueList<MyMoneyReport>::iterator it_r;
+ TQValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList();
+ TQValueList<MyMoneyReport>::iterator it_r;
for(it_r = reports.begin(); it_r != reports.end(); ++it_r) {
- QStringList list;
+ TQStringList list;
(*it_r).accounts(list);
- QStringList missing;
- QStringList::const_iterator it_a, it_b;
+ TQStringList missing;
+ TQStringList::const_iterator it_a, it_b;
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a);
if(acc.accountType() == MyMoneyAccount::Investment) {
for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) {
- if(!list.contains(*it_b)) {
+ if(!list.tqcontains(*it_b)) {
missing.append(*it_b);
}
}
@@ -1724,20 +1724,20 @@ void KMyMoneyView::fixFile_1(void)
#if 0
if(!m_accountsView->allItemsSelected()) {
// retrieve a list of selected accounts
- QStringList list;
+ TQStringList list;
m_accountsView->selectedItems(list);
// if we're not in expert mode, we need to make sure
// that all stock accounts for the selected investment
// account are also selected
if(!KMyMoneyGlobalSettings::expertMode()) {
- QStringList missing;
- QStringList::const_iterator it_a, it_b;
+ TQStringList missing;
+ TQStringList::const_iterator it_a, it_b;
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a);
if(acc.accountType() == MyMoneyAccount::Investment) {
for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) {
- if(!list.contains(*it_b)) {
+ if(!list.tqcontains(*it_b)) {
missing.append(*it_b);
}
}
@@ -1764,13 +1764,13 @@ void KMyMoneyView::fixFile_0(void)
*/
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneyAccount> accountList;
+ TQValueList<MyMoneyAccount> accountList;
file->accountList(accountList);
::timetrace("Have account list");
- QValueList<MyMoneyAccount>::Iterator it_a;
- QValueList<MyMoneySchedule> scheduleList = file->scheduleList();
+ TQValueList<MyMoneyAccount>::Iterator it_a;
+ TQValueList<MyMoneySchedule> scheduleList = file->scheduleList();
::timetrace("Have schedule list");
- QValueList<MyMoneySchedule>::Iterator it_s;
+ TQValueList<MyMoneySchedule>::Iterator it_s;
MyMoneyAccount equity = file->equity();
MyMoneyAccount asset = file->asset();
@@ -1784,15 +1784,15 @@ void KMyMoneyView::fixFile_0(void)
}
// until early before 0.8 release, the equity account was not saved to
// the file. If we have an equity account with no sub-accounts but
- // find and equity account that has equity() as it's parent, we reparent
+ // find and equity account that has equity() as it's tqparent, we reparent
// this account. Need to move it to asset() first, because otherwise
// MyMoneyFile::reparent would act as NOP.
if(equityListEmpty && (*it_a).accountType() == MyMoneyAccount::Equity) {
- if((*it_a).parentAccountId() == equity.id()) {
+ if((*it_a).tqparentAccountId() == equity.id()) {
MyMoneyAccount acc = *it_a;
- // tricky, force parent account to be empty so that we really
- // can re-parent it
- acc.setParentAccountId(QString());
+ // tricky, force tqparent account to be empty so that we really
+ // can re-tqparent it
+ acc.setParentAccountId(TQString());
file->reparentAccount(acc, equity);
kdDebug(2) << __func__ << " fixed account " << acc.id() << " reparented to " << equity.id() << endl;
}
@@ -1812,8 +1812,8 @@ void KMyMoneyView::fixFile_0(void)
void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched)
{
MyMoneyTransaction t = sched.transaction();
- QValueList<MyMoneySplit> splitList = t.splits();
- QValueList<MyMoneySplit>::ConstIterator it_s;
+ TQValueList<MyMoneySplit> splitList = t.splits();
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
bool updated = false;
try {
@@ -1844,7 +1844,7 @@ void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched)
if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) {
kdDebug(2) << __func__ << " " << sched.id() << " " << (*it_s).id() << " should be 'not reconciled'" << endl;
MyMoneySplit split = *it_s;
- split.setReconcileDate(QDate());
+ split.setReconcileDate(TQDate());
split.setReconcileFlag(MyMoneySplit::NotReconciled);
t.modifySplit(split);
updated = true;
@@ -1884,7 +1884,7 @@ void KMyMoneyView::fixLoanAccount_0(MyMoneyAccount acc)
i18n("The account \"%1\" was previously created as loan account but some information "
"is missing. The new loan wizard will be started to collect all relevant "
"information. Please use a KMyMoney version >= 0.8.7 and < 0.9 to correct the problem."
- ).arg(acc.name()),
+ ).tqarg(acc.name()),
i18n("Account problem"));
throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore");
@@ -1911,7 +1911,7 @@ void KMyMoneyView::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n
// to the account pool. Note: the schedule code used to leave
// this always the first split, but the loan code leaves it as
// the second one. So I thought, searching is a good alternative ....
- QValueList<MyMoneySplit>::ConstIterator it_s;
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) {
if((*it_s).accountId().isEmpty()) {
MyMoneySplit s = (*it_s);
@@ -1952,16 +1952,16 @@ void KMyMoneyView::fixTransactions_0(void)
#endif
::timetrace("fixTransactions: get schedule list");
- QValueList<MyMoneySchedule> scheduleList = file->scheduleList();
+ TQValueList<MyMoneySchedule> scheduleList = file->scheduleList();
::timetrace("fixTransactions: get transaction list");
MyMoneyTransactionFilter filter;
filter.setReportAllSplits( false );
- QValueList<MyMoneyTransaction> transactionList;
+ TQValueList<MyMoneyTransaction> transactionList;
file->transactionList(transactionList, filter);
::timetrace("fixTransactions: have list");
- QValueList<MyMoneySchedule>::Iterator it_x;
- QStringList interestAccounts;
+ TQValueList<MyMoneySchedule>::Iterator it_x;
+ TQStringList interestAccounts;
KMSTATUS(i18n("Fix transactions"));
kmymoney2->slotStatusProgressBar(0, scheduleList.count() + transactionList.count());
@@ -1970,12 +1970,12 @@ void KMyMoneyView::fixTransactions_0(void)
// scan the schedules to find interest accounts
for(it_x = scheduleList.begin(); it_x != scheduleList.end(); ++it_x) {
MyMoneyTransaction t = (*it_x).transaction();
- QValueList<MyMoneySplit>::ConstIterator it_s;
- QStringList accounts;
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
+ TQStringList accounts;
bool hasDuplicateAccounts = false;
for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) {
- if(accounts.contains((*it_s).accountId())) {
+ if(accounts.tqcontains((*it_s).accountId())) {
hasDuplicateAccounts = true;
kdDebug(2) << __func__ << " " << t.id() << " has multiple splits with account " << (*it_s).accountId() << endl;
} else {
@@ -1983,7 +1983,7 @@ void KMyMoneyView::fixTransactions_0(void)
}
if((*it_s).action() == MyMoneySplit::ActionInterest) {
- if(interestAccounts.contains((*it_s).accountId()) == 0) {
+ if(interestAccounts.tqcontains((*it_s).accountId()) == 0) {
interestAccounts << (*it_s).accountId();
}
}
@@ -1998,12 +1998,12 @@ void KMyMoneyView::fixTransactions_0(void)
::timetrace("fixTransactions: start loop");
// scan the transactions and modify loan transactions
- QValueList<MyMoneyTransaction>::Iterator it_t;
+ TQValueList<MyMoneyTransaction>::Iterator it_t;
for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) {
const char *defaultAction = 0;
- QValueList<MyMoneySplit> splits = (*it_t).splits();
- QValueList<MyMoneySplit>::Iterator it_s;
- QStringList accounts;
+ TQValueList<MyMoneySplit> splits = (*it_t).splits();
+ TQValueList<MyMoneySplit>::Iterator it_s;
+ TQStringList accounts;
// check if base commodity is set. if not, set baseCurrency
if((*it_t).commodity().isEmpty()) {
@@ -2091,14 +2091,14 @@ void KMyMoneyView::fixTransactions_0(void)
// and check if there are any duplicates in this transactions
for(it_s = splits.begin(); it_s != splits.end(); ++it_s) {
MyMoneyAccount splitAccount = file->account((*it_s).accountId());
- if(accounts.contains((*it_s).accountId())) {
+ if(accounts.tqcontains((*it_s).accountId())) {
hasDuplicateAccounts = true;
} else {
accounts << (*it_s).accountId();
}
// if this split references an interest account, the action
// must be of type ActionInterest
- if(interestAccounts.contains((*it_s).accountId())) {
+ if(interestAccounts.tqcontains((*it_s).accountId())) {
if((*it_s).action() != MyMoneySplit::ActionInterest) {
kdDebug(2) << __func__ << " " << (*it_t).id() << " contains an interest account (" << (*it_s).accountId() << ") but does not have ActionInterest" << endl;
(*it_s).setAction(MyMoneySplit::ActionInterest);
@@ -2175,10 +2175,10 @@ void KMyMoneyView::slotPrintView(void)
m_homeView->slotPrintView();
}
-KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& icon)
+KMyMoneyViewBase* KMyMoneyView::addPage(const TQString& title, const TQString& icon)
{
const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16;
- QFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize));
+ TQFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize));
return new KMyMoneyViewBase(frm, title.latin1(), title);
}
@@ -2189,8 +2189,8 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -2202,30 +2202,30 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico
class KMyMoneyViewBase::Private {
public:
- QFrame* m_titleLine;
+ TQFrame* m_titleLine;
KMyMoneyTitleLabel* m_titleLabel;
- QVBoxLayout* m_viewLayout;
+ TQVBoxLayout* m_viewLayout;
};
-KMyMoneyViewBase::KMyMoneyViewBase(QWidget* parent, const char* name, const QString& title) :
- QWidget(parent, name),
+KMyMoneyViewBase::KMyMoneyViewBase(TQWidget* tqparent, const char* name, const TQString& title) :
+ TQWidget(tqparent, name),
d(new Private)
{
- d->m_viewLayout = new QVBoxLayout(this);
+ d->m_viewLayout = new TQVBoxLayout(this);
d->m_viewLayout->setSpacing( 6 );
d->m_viewLayout->setMargin( 0 );
d->m_titleLabel = new KMyMoneyTitleLabel( this, "titleLabel" );
- d->m_titleLabel->setMinimumSize( QSize( 100, 30 ) );
+ d->m_titleLabel->setMinimumSize( TQSize( 100, 30 ) );
d->m_titleLabel->setRightImageFile("pics/titlelabel_background.png" );
d->m_titleLabel->setText(title);
d->m_viewLayout->addWidget( d->m_titleLabel );
#if 0
- d->m_titleLine = new QFrame( this, "titleLine" );
- d->m_titleLine->setFrameShape( QFrame::HLine );
- d->m_titleLine->setFrameShadow( QFrame::Sunken );
- d->m_titleLine->setFrameShape( QFrame::HLine );
+ d->m_titleLine = new TQFrame( this, "titleLine" );
+ d->m_titleLine->setFrameShape( TQFrame::HLine );
+ d->m_titleLine->setFrameShadow( TQFrame::Sunken );
+ d->m_titleLine->setFrameShape( TQFrame::HLine );
d->m_viewLayout->addWidget( d->m_titleLine );
#endif
}
@@ -2235,12 +2235,12 @@ KMyMoneyViewBase::~KMyMoneyViewBase()
delete d;
}
-void KMyMoneyViewBase::addWidget(QWidget* w)
+void KMyMoneyViewBase::addWidget(TQWidget* w)
{
d->m_viewLayout->addWidget(w);
}
-QVBoxLayout* KMyMoneyViewBase::layout(void) const
+TQVBoxLayout* KMyMoneyViewBase::tqlayout(void) const
{
return d->m_viewLayout;
}
diff --git a/kmymoney2/views/kmymoneyview.h b/kmymoney2/views/kmymoneyview.h
index 13e3d76..e1c1266 100644
--- a/kmymoney2/views/kmymoneyview.h
+++ b/kmymoney2/views/kmymoneyview.h
@@ -24,10 +24,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-class QVBox;
-class QFile;
-class QVBoxLayout;
+#include <tqwidget.h>
+class TQVBox;
+class TQFile;
+class TQVBoxLayout;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -65,7 +65,7 @@ class TransactionEditor;
class KForecastView;
/**
- * This class represents the view of the MyMoneyFile which contains
+ * This class represents the view of the MyMoneyFile which tqcontains
* Banks/Accounts/Transactions, Recurring transactions (or Bills & Deposits)
* and scripts (yet to be implemented). Each different aspect of the file
* is represented by a tab within the view.
@@ -77,6 +77,7 @@ class KForecastView;
class KMyMoneyView : public KJanusWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum viewID {
@@ -127,17 +128,17 @@ private:
KReportsView* m_reportsView;
KForecastView* m_forecastView;
- QVBox* m_homeViewFrame;
- QVBox* m_accountsViewFrame;
- QVBox* m_institutionsViewFrame;
- QVBox* m_categoriesViewFrame;
- QVBox* m_payeesViewFrame;
- QVBox* m_budgetViewFrame;
- QVBox* m_scheduleViewFrame;
- QVBox* m_ledgerViewFrame;
- QVBox* m_investmentViewFrame;
- QVBox* m_reportsViewFrame;
- QVBox* m_forecastViewFrame;
+ TQVBox* m_homeViewFrame;
+ TQVBox* m_accountsViewFrame;
+ TQVBox* m_institutionsViewFrame;
+ TQVBox* m_categoriesViewFrame;
+ TQVBox* m_payeesViewFrame;
+ TQVBox* m_budgetViewFrame;
+ TQVBox* m_scheduleViewFrame;
+ TQVBox* m_ledgerViewFrame;
+ TQVBox* m_investmentViewFrame;
+ TQVBox* m_reportsViewFrame;
+ TQVBox* m_forecastViewFrame;
bool m_inConstructor;
@@ -161,9 +162,9 @@ private:
fileTypeE m_fileType;
private:
- void addTitleBar(QWidget* parent, const QString& title);
+ void addTitleBar(TQWidget* tqparent, const TQString& title);
- void ungetString(QIODevice *qfile, char * buf, int len);
+ void ungetString(TQIODevice *qfile, char * buf, int len);
/**
* This method creates the currency @p curr if it does not exist and
@@ -180,7 +181,7 @@ private:
/**
*
*/
- void loadAncientCurrency(const QString& id, const QString& name, const QString& sym, const QDate& date, const MyMoneyMoney& rate, const QString& newId, const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0);
+ void loadAncientCurrency(const TQString& id, const TQString& name, const TQString& sym, const TQDate& date, const MyMoneyMoney& rate, const TQString& newId, const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0);
/**
* if no base currency is defined, start the dialog and force it to be set
@@ -200,9 +201,9 @@ private:
*/
void removeStorage(void);
- void viewAccountList(const QString& selectAccount); // Show the accounts view
+ void viewAccountList(const TQString& selectAccount); // Show the accounts view
- static void progressCallback(int current, int total, const QString&);
+ static void progressCallback(int current, int total, const TQString&);
/**
*/
@@ -222,14 +223,14 @@ private:
void createSchedule(MyMoneySchedule s, MyMoneyAccount& a);
- void checkAccountName(const MyMoneyAccount& acc, const QString& name) const;
+ void checkAccountName(const MyMoneyAccount& acc, const TQString& name) const;
public:
/**
* The constructor for KMyMoneyView. Just creates all the tabs for the
* different aspects of the MyMoneyFile.
*/
- KMyMoneyView(QWidget *parent=0, const char *name=0);
+ KMyMoneyView(TQWidget *tqparent=0, const char *name=0);
/**
* Destructor
@@ -266,14 +267,14 @@ public:
*
* @param url The URL to save into.
* If no protocol is specified, file:// is assumed.
- * @param keyList QString containing a comma separated list of keys
+ * @param keyList TQString containing a comma separated list of keys
* to be used for encryption. If @p keyList is empty,
* the file will be saved unencrypted (the default)
*
* @retval false save operation failed
* @retval true save operation was successful
*/
- bool saveFile(const KURL& url, const QString& keyList = QString());
+ bool saveFile(const KURL& url, const TQString& keyList = TQString());
/**
* Saves the data into permanent storage on a new or empty SQL database.
*
@@ -340,9 +341,9 @@ public:
*/
void enableViews(int state = -1);
- KMyMoneyViewBase* addPage(const QString& title, const QString& icon = QString());
+ KMyMoneyViewBase* addPage(const TQString& title, const TQString& icon = TQString());
- void addWidget(QWidget* w);
+ void addWidget(TQWidget* w);
virtual bool showPage(int index);
@@ -357,7 +358,7 @@ public:
* @retval true Yes, view allows to create a transaction (tooltip is not changed)
* @retval false No, view cannot to create a transaction (tooltip is updated with message)
*/
- bool canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
/**
* check if the current view allows to modify (edit/delete) the selected transactions
@@ -370,9 +371,9 @@ public:
* @retval true Yes, view allows to edit/delete transactions (tooltip is not changed)
* @retval false No, view cannot edit/delete transactions (tooltip is updated with message)
*/
- bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
- bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
/**
* check if the current view allows to edit the selected transactions
@@ -385,7 +386,7 @@ public:
* @retval true Yes, view allows to enter/edit transactions
* @retval false No, view cannot enter/edit transactions
*/
- bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const;
+ bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const;
/**
* check if the current view allows to print something
@@ -410,7 +411,7 @@ public:
* @retval true Reconciliation started
* @retval false Account cannot be reconciled
*/
- bool startReconciliation(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance);
+ bool startReconciliation(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance);
/**
* Used to finish reconciliation of account @a account. It switches the
@@ -437,7 +438,7 @@ public slots:
*
* @param widget pointer to page widget
*/
- void slotRememberPage(QWidget* widget);
+ void slotRememberPage(TQWidget* widget);
/**
* Brings up a dialog to change the list(s) settings and saves them into the
@@ -445,7 +446,7 @@ public slots:
*
* @see KListSettingsDlg
* Refreshs all views. Used e.g. after settings have been changed or
- * data has been loaded from external sources (QIF import).
+ * data has been loaded from external sources (TQIF import).
**/
void slotRefreshViews();
@@ -457,7 +458,7 @@ public slots:
* @param acc The ID of the account to be shown
* @param transaction The ID of the transaction to be selected
*/
- void slotLedgerSelected(const QString& acc, const QString& transaction = QString());
+ void slotLedgerSelected(const TQString& acc, const TQString& transaction = TQString());
/**
* Called, whenever the payees view should pop up and a specific
@@ -467,7 +468,7 @@ public slots:
* @param accountId The ID of the account to be shown
* @param transactionId The ID of the transaction to be selected
*/
- void slotPayeeSelected(const QString& payeeId, const QString& accountId, const QString& transactionId);
+ void slotPayeeSelected(const TQString& payeeId, const TQString& accountId, const TQString& transactionId);
/**
* Called, whenever the schedule view should pop up and a specific
@@ -475,7 +476,7 @@ public slots:
*
* @param schedule The ID of the schedule to be shown
*/
- void slotScheduleSelected(const QString& schedule);
+ void slotScheduleSelected(const TQString& schedule);
/**
* Called, whenever the report view should pop up and a specific
@@ -483,7 +484,7 @@ public slots:
*
* @param reportid The ID of the report to be shown
*/
- void slotShowReport(const QString& reportid);
+ void slotShowReport(const TQString& reportid);
/**
* Same as the above, but the caller passes in an actual report
@@ -546,15 +547,15 @@ private:
* the final destination is reached over a network
* protocol (e.g. FTP)
*
- * @param qf pointer to QFile representing the opened file
+ * @param qf pointer to TQFile representing the opened file
* @param writer pointer to the formatter
* @param plaintext whether to override any compression & encryption settings
- * @param keyList QString containing a comma separated list of keys to be used for encryption
+ * @param keyList TQString containing a comma separated list of keys to be used for encryption
* If @p keyList is empty, the file will be saved unencrypted
*
* @note This method will close the file when it is written.
*/
- void saveToLocalFile(QFile* qf, IMyMoneyStorageFormat* writer, bool plaintext=false, const QString& keyList = QString());
+ void saveToLocalFile(TQFile* qf, IMyMoneyStorageFormat* writer, bool plaintext=false, const TQString& keyList = TQString());
/**
* Internal method used by slotAccountNew() and slotAccountCategory().
@@ -587,7 +588,7 @@ signals:
* @param endingBalance collected ending balance when reconciliation starts
* 0 otherwise
*/
- void reconciliationStarts(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance);
+ void reconciliationStarts(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance);
};
@@ -595,16 +596,17 @@ signals:
* This class is an abstract base class that all specific views
* should be based on.
*/
-class KMyMoneyViewBase : public QWidget
+class KMyMoneyViewBase : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KMyMoneyViewBase(QWidget* parent, const char *name, const QString& title);
+ KMyMoneyViewBase(TQWidget* tqparent, const char *name, const TQString& title);
virtual ~KMyMoneyViewBase();
- void setTitle(const QString& title);
- QVBoxLayout* layout(void) const;
- void addWidget(QWidget* w);
+ void setTitle(const TQString& title);
+ TQVBoxLayout* tqlayout(void) const;
+ void addWidget(TQWidget* w);
/**
* This method is used to edit the currently selected transactions
@@ -614,7 +616,7 @@ public:
* @retval false view was not capable to edit transactions
* @retval true view was capable to edit the transactions and did so
*/
- bool editTransactions(const QValueList<MyMoneyTransaction>& transactions) const { Q_UNUSED(transactions) return false; }
+ bool editTransactions(const TQValueList<MyMoneyTransaction>& transactions) const { Q_UNUSED(transactions) return false; }
private:
/// \internal d-pointer class.
class Private;
diff --git a/kmymoney2/views/kpayeesview.cpp b/kmymoney2/views/kpayeesview.cpp
index ad17ff4..83c7e8f 100644
--- a/kmymoney2/views/kpayeesview.cpp
+++ b/kmymoney2/views/kpayeesview.cpp
@@ -25,22 +25,22 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qpixmap.h>
-#include <qtabwidget.h>
-#include <qcursor.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpainter.h>
-#include <qheader.h>
-#include <qbuttongroup.h>
-#include <qsplitter.h>
-#include <qmap.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqpixmap.h>
+#include <tqtabwidget.h>
+#include <tqcursor.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpainter.h>
+#include <tqheader.h>
+#include <tqbuttongroup.h>
+#include <tqsplitter.h>
+#include <tqmap.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -70,7 +70,7 @@
/* KTransactionPtrVector */
/* -------------------------------------------------------------------------------*/
-int KTransactionPtrVector::compareItems(const QString& s1, const QString& s2) const
+int KTransactionPtrVector::compareItems(const TQString& s1, const TQString& s2) const
{
if(s1 == s2)
return 0;
@@ -99,7 +99,7 @@ int KTransactionPtrVector::compareItems(KTransactionPtrVector::Item d1, KTransac
s2 = t2->splitByPayee(m_id);
break;
}
- QString p1, p2;
+ TQString p1, p2;
switch(m_sortType) {
case SortValue:
@@ -245,13 +245,13 @@ void KTransactionPtrVector::setSortType(const TransactionSortE type)
sort();
}
-void KTransactionPtrVector::setAccountId(const QString& id)
+void KTransactionPtrVector::setAccountId(const TQString& id)
{
m_id = id;
m_idMode = AccountMode;
}
-void KTransactionPtrVector::setPayeeId(const QString& id)
+void KTransactionPtrVector::setPayeeId(const TQString& id)
{
m_id = id;
m_idMode = PayeeMode;
@@ -260,8 +260,8 @@ void KTransactionPtrVector::setPayeeId(const QString& id)
// *** KPayeeListItem Implementation ***
-KPayeeListItem::KPayeeListItem(KListView *parent, const MyMoneyPayee& payee) :
- KListViewItem(parent),
+KPayeeListItem::KPayeeListItem(KListView *tqparent, const MyMoneyPayee& payee) :
+ KListViewItem(tqparent),
m_payee(payee)
{
setText(0, payee.name());
@@ -273,22 +273,22 @@ KPayeeListItem::~KPayeeListItem()
{
}
-void KPayeeListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+void KPayeeListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
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());
p->setFont(KMyMoneyGlobalSettings::listCellFont());
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
-KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* parent, const QString& accountId, const QString& transactionId) :
- KListViewItem(view, parent)
+KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* tqparent, const TQString& accountId, const TQString& transactionId) :
+ KListViewItem(view, tqparent)
{
m_accountId = accountId;
m_transactionId = transactionId;
@@ -298,14 +298,14 @@ KTransactionListItem::~KTransactionListItem()
{
}
-void KTransactionListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KTransactionListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{
- QColorGroup _cg = cg;
- _cg.setColor(QColorGroup::Base, backgroundColor());
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ TQColorGroup _cg = cg;
+ _cg.setColor(TQColorGroup::Base, backgroundColor());
+ TQListViewItem::paintCell(p, _cg, column, width, tqalignment);
}
-const QColor KTransactionListItem::backgroundColor(void)
+const TQColor KTransactionListItem::backgroundColor(void)
{
return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor();
}
@@ -315,30 +315,30 @@ const QColor KTransactionListItem::backgroundColor(void)
// *** KPayeesView Implementation ***
-KPayeesView::KPayeesView(QWidget *parent, const char *name ) :
- KPayeesViewDecl(parent,name),
+KPayeesView::KPayeesView(TQWidget *tqparent, const char *name ) :
+ KPayeesViewDecl(tqparent,name),
m_needReload(false),
m_needConnection(true),
m_updatesQueued(0),
m_inSelection(false)
{
// create the searchline widget
- // and insert it into the existing layout
+ // and insert it into the existing tqlayout
m_searchWidget = new KListViewSearchLineWidget(m_payeesList, this);
- m_searchWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ m_searchWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
KPayeesViewDeclLayout->insertWidget(0, m_searchWidget);
- m_splitter = new QSplitter(this);
- m_payeesList->reparent(m_splitter, QPoint(0,0), true);
- m_tabWidget->reparent(m_splitter, QPoint(0, 0), true);
- m_splitter->setResizeMode(m_tabWidget, QSplitter::Stretch);
+ m_splitter = new TQSplitter(this);
+ m_payeesList->reparent(m_splitter, TQPoint(0,0), true);
+ m_tabWidget->reparent(m_splitter, TQPoint(0, 0), true);
+ m_splitter->setResizeMode(m_tabWidget, TQSplitter::Stretch);
m_splitter->setOpaqueResize();
- layout10->addWidget(m_splitter);
+ tqlayout10->addWidget(m_splitter);
// use the size settings of the last run (if any)
KConfig *config = KGlobal::config();
config->setGroup("Last Use Settings");
- QValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize");
+ TQValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize");
if(sizes.size() == 2) {
if(!sizes[0] || !sizes[1]) {
sizes[0] = 1;
@@ -348,10 +348,10 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) :
}
m_transactionView->setSorting(-1);
- m_transactionView->setColumnWidthMode(2, QListView::Manual);
- m_transactionView->setColumnAlignment(3, Qt::AlignRight);
+ m_transactionView->setColumnWidthMode(2, TQListView::Manual);
+ m_transactionView->setColumnAlignment(3, TQt::AlignRight);
// never show horizontal scroll bars
- m_transactionView->setHScrollBarMode(QScrollView::AlwaysOff);
+ m_transactionView->setHScrollBarMode(TQScrollView::AlwaysOff);
m_payeesList->addColumn(i18n("Name"));
@@ -366,44 +366,44 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) :
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);
- connect(m_payeesList, SIGNAL(selectionChanged()), this, SLOT(slotSelectPayee()));
- connect(m_payeesList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenamePayee(QListViewItem*,int,const QString&)));
+ connect(m_payeesList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectPayee()));
+ connect(m_payeesList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenamePayee(TQListViewItem*,int,const TQString&)));
- connect(addressEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged()));
- connect(postcodeEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged()));
- connect(telephoneEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged()));
- connect(emailEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged()));
- connect(notesEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged()));
- connect(matchKeyEditList, SIGNAL(changed()), this, SLOT(slotKeyListChanged()));
+ connect(addressEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(postcodeEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(telephoneEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(emailEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(notesEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(matchKeyEditList, TQT_SIGNAL(changed()), this, TQT_SLOT(slotKeyListChanged()));
- connect(radioNoMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
- connect(radioNameMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
- connect(radioKeyMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
- connect(checkMatchIgnoreCase, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
+ connect(radioNoMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(radioNameMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(radioKeyMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(checkMatchIgnoreCase, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged()));
- connect(checkEnableDefaultAccount, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
- connect(comboDefaultAccount, SIGNAL(accountSelected(const QString&)), this, SLOT(slotPayeeDataChanged()));
- connect(buttonSelectMyAccount, SIGNAL(clicked()), this, SLOT(slotChooseDefaultAccount()));
+ connect(checkEnableDefaultAccount, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(comboDefaultAccount, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged()));
+ connect(buttonSelectMyAccount, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChooseDefaultAccount()));
- connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdatePayee()));
- connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
+ connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdatePayee()));
+ connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp()));
- connect(m_payeesList, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(m_payeesList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
-// connect(m_payeesList, SIGNAL(rightButtonClicked(QListViewItem* , const QPoint&, int)),
-// this, SLOT(slotOpenContextMenu(QListViewItem*)));
+// connect(m_payeesList, TQT_SIGNAL(rightButtonClicked(TQListViewItem* , const TQPoint&, int)),
+// this, TQT_SLOT(slotOpenContextMenu(TQListViewItem*)));
- connect(m_transactionView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotTransactionDoubleClicked(QListViewItem*)));
+ connect(m_transactionView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotTransactionDoubleClicked(TQListViewItem*)));
- connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(rearrange(void)));
+ connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(rearrange(void)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadPayees()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadPayees()));
}
KPayeesView::~KPayeesView()
@@ -419,7 +419,7 @@ void KPayeesView::slotQueueUpdate(void)
m_updatesQueued++;
// The KListViewSearchLineWidget has an internal timer for update purposes
// of 200 ms, so we should be safe with 250 ms here
- QTimer::singleShot(250, this, SLOT(slotActivateUpdate()));
+ TQTimer::singleShot(250, this, TQT_SLOT(slotActivateUpdate()));
}
void KPayeesView::slotActivateUpdate(void)
@@ -432,20 +432,20 @@ void KPayeesView::slotActivateUpdate(void)
void KPayeesView::slotChooseDefaultAccount(void)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QMap<QString,int> account_count;
+ TQMap<TQString,int> account_count;
for (int i = 0; i < m_transactionPtrVector.size(); ++i) {
KMyMoneyTransaction* t = m_transactionPtrVector[i];
MyMoneySplit s = t->splitById(t->splitId());
const MyMoneyAccount& acc = file->account(s.accountId());
- QString txt;
+ TQString txt;
if (s.action() != MyMoneySplit::ActionAmortization
&& acc.accountType() != MyMoneyAccount::AssetLoan
&& !file->isTransfer(*t)
&& t->splitCount() == 2) {
MyMoneySplit s0 = t->splitByAccount(s.accountId(), false);
- if (account_count.contains(s0.accountId())) {
+ if (account_count.tqcontains(s0.accountId())) {
account_count[s0.accountId()]++;
}
else {
@@ -454,7 +454,7 @@ void KPayeesView::slotChooseDefaultAccount(void)
}
}
- QMapIterator<QString,int> most_frequent, iter;
+ TQMapIterator<TQString,int> most_frequent, iter;
most_frequent = account_count.end();
for (iter = account_count.begin(); iter != account_count.end(); iter++) {
if (iter.data() > most_frequent.data()) {
@@ -470,19 +470,19 @@ void KPayeesView::slotChooseDefaultAccount(void)
void KPayeesView::slotStartRename(void)
{
- QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
if((it_v = it_l.current()) != 0) {
it_v->startRename(0);
}
}
// This variant is only called when a single payee is selected and renamed.
-void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QString& txt)
+void KPayeesView::slotRenamePayee(TQListViewItem* p , int /* col */, const TQString& txt)
{
//kdDebug() << "[KPayeesView::slotRenamePayee]" << endl;
// create a copy of the new name without appended whitespaces
- QString new_name = txt.stripWhiteSpace();
+ TQString new_name = txt.stripWhiteSpace();
if (m_payee.name() != new_name) {
MyMoneyFileTransaction ft;
try {
@@ -495,7 +495,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin
if (KMessageBox::questionYesNo(this,
i18n("A payee with the name '%1' already exists. It is not advisable to have "
"multiple payees with the same identification name. Are you sure you would like "
- "to rename the payee?").arg(new_name)) != KMessageBox::Yes)
+ "to rename the payee?").tqarg(new_name)) != KMessageBox::Yes)
{
p->setText(0,m_payee.name());
return;
@@ -521,7 +521,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to modify payee"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -530,9 +530,9 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin
}
}
-void KPayeesView::ensurePayeeVisible(const QString& id)
+void KPayeesView::ensurePayeeVisible(const TQString& id)
{
- for (QListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) {
+ for (TQListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) {
KPayeeListItem* p = dynamic_cast<KPayeeListItem*>(item);
if(p && p->payee().id() == id) {
if(p->itemAbove())
@@ -548,10 +548,10 @@ void KPayeesView::ensurePayeeVisible(const QString& id)
}
}
-void KPayeesView::selectedPayees(QValueList<MyMoneyPayee>& payeesList) const
+void KPayeesView::selectedPayees(TQValueList<MyMoneyPayee>& payeesList) const
{
- QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected | QListViewItemIterator::Visible);
- QListViewItem* it_v;
+ TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected | TQListViewItemIterator::Visible);
+ TQListViewItem* it_v;
while((it_v = it_l.current()) != 0) {
KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v);
if(item)
@@ -565,8 +565,8 @@ void KPayeesView::slotSelectPayee(void)
// check if the content of a currently selected payee was modified
// and ask to store the data
if (m_updateButton->isEnabled()) {
- if (KMessageBox::questionYesNo(this, QString("<qt>%1</qt>").arg(
- i18n("Do you want to save the changes for <b>%1</b>?").arg(m_newName)),
+ if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg(
+ i18n("Do you want to save the changes for <b>%1</b>?").tqarg(m_newName)),
i18n("Save changes")) == KMessageBox::Yes) {
m_inSelection = true;
slotUpdatePayee();
@@ -576,7 +576,7 @@ void KPayeesView::slotSelectPayee(void)
// loop over all payees and count the number of payees, also
// optain last selected payee
- QValueList<MyMoneyPayee> payeesList;
+ TQValueList<MyMoneyPayee> payeesList;
selectedPayees(payeesList);
emit selectObjects(payeesList);
@@ -593,18 +593,18 @@ void KPayeesView::slotSelectPayee(void)
m_tabWidget->setEnabled(false); // disable tab widget
clearItemData();
// disable renaming in all listviewitem
- for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow())
+ for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow())
i->setRenameEnabled(0, false);
return;
}
// otherwise we have just one selected, enable payee information widget
m_tabWidget->setEnabled(true);
// enable renaming in all listviewitem
- for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow())
+ for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow())
i->setRenameEnabled(0, true);
// as of now we are updating only the last selected payee, and until
- // selection mode of the QListView has been changed to Extended, this
+ // selection mode of the TQListView has been changed to Extended, this
// will also be the only selection and behave exactly as before - Andreas
try {
m_payee = payeesList[0];
@@ -620,7 +620,7 @@ void KPayeesView::slotSelectPayee(void)
emailEdit->setText(m_payee.email());
notesEdit->setText(m_payee.notes());
- QStringList keys;
+ TQStringList keys;
bool ignorecase = false;
MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys);
@@ -646,11 +646,11 @@ void KPayeesView::slotSelectPayee(void)
void KPayeesView::clearItemData(void)
{
- addressEdit->setText(QString());
- postcodeEdit->setText(QString());
- telephoneEdit->setText(QString());
- emailEdit->setText(QString());
- notesEdit->setText(QString());
+ addressEdit->setText(TQString());
+ postcodeEdit->setText(TQString());
+ telephoneEdit->setText(TQString());
+ emailEdit->setText(TQString());
+ notesEdit->setText(TQString());
showTransactions();
}
@@ -664,16 +664,16 @@ void KPayeesView::showTransactions(void)
m_transactionView->clear();
if(m_payee.id().isEmpty() || !m_tabWidget->isEnabled()) {
- m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction())));
+ m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction())));
return;
}
// setup the list and the pointer vector
MyMoneyTransactionFilter filter;
filter.addPayee(m_payee.id());
- filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), QDate());
+ filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), TQDate());
- QValueList<MyMoneyTransaction> list = file->transactionList(filter);
+ TQValueList<MyMoneyTransaction> list = file->transactionList(filter);
m_transactionList.clear();
m_transactionPtrVector.clear();
@@ -681,8 +681,8 @@ void KPayeesView::showTransactions(void)
m_transactionPtrVector.setPayeeId(m_payee.id());
m_transactionPtrVector.setSortType(KTransactionPtrVector::SortPostDate);
- QValueList<MyMoneyTransaction>::ConstIterator it_t;
- QString lastId;
+ TQValueList<MyMoneyTransaction>::ConstIterator it_t;
+ TQString lastId;
int ofs = 0;
for(i = 0, it_t = list.begin(); it_t != list.end(); ++it_t) {
@@ -699,7 +699,7 @@ void KPayeesView::showTransactions(void)
MyMoneyAccount acc = MyMoneyFile::instance()->account(filter.matchingSplits()[ofs].accountId());
if(acc.accountGroup() == MyMoneyAccount::Asset
|| acc.accountGroup() == MyMoneyAccount::Liability) {
- QValueList<KMyMoneyTransaction>::ConstIterator it_k;
+ TQValueList<KMyMoneyTransaction>::ConstIterator it_k;
it_k = m_transactionList.append(k);
balance += k.splitById(k.splitId()).value();
m_transactionPtrVector.insert(i, &(*it_k));
@@ -723,28 +723,28 @@ void KPayeesView::showTransactions(void)
item->setText(0, s.number());
item->setText(1, KGlobal::locale()->formatDate(t->postDate(), true));
- QString txt;
+ TQString txt;
if(s.action() == MyMoneySplit::ActionAmortization) {
if(acc.accountType() == MyMoneyAccount::Loan) {
if(s.value().isPositive()) {
- txt = i18n("Amortization of %1").arg(acc.name());
+ txt = i18n("Amortization of %1").tqarg(acc.name());
} else {
- txt = i18n("Payment to %1").arg(acc.name());
+ txt = i18n("Payment to %1").tqarg(acc.name());
}
} else if(acc.accountType() == MyMoneyAccount::AssetLoan) {
if(s.value().isNegative()) {
- txt = i18n("Amortization of %1").arg(acc.name());
+ txt = i18n("Amortization of %1").tqarg(acc.name());
} else {
- txt = i18n("Payment to %1").arg(acc.name());
+ txt = i18n("Payment to %1").tqarg(acc.name());
}
} else {
- txt = i18n("Loan payment from %1").arg(acc.name());
+ txt = i18n("Loan payment from %1").tqarg(acc.name());
}
} else if (file->isTransfer(*t)) {
if(!s.value().isNegative()) {
- txt = i18n("Transfer to %1").arg(acc.name());
+ txt = i18n("Transfer to %1").tqarg(acc.name());
} else {
- txt = i18n("Transfer from %1").arg(acc.name());
+ txt = i18n("Transfer from %1").tqarg(acc.name());
}
} else if(t->splitCount() > 2) {
txt = i18n("Split transaction (category replacement)", "Split transaction");
@@ -755,7 +755,7 @@ void KPayeesView::showTransactions(void)
item->setText(2, txt);
item->setText(3, s.value().formatMoney(acc.fraction()));
}
- m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction())));
+ m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction())));
// Trick: it seems, that the initial sizing of the view does
// not work correctly. At least, the columns do not get displayed
@@ -763,14 +763,14 @@ void KPayeesView::showTransactions(void)
// is incorrect. If the widget is visible, resizing works correctly.
// So, we let the dialog show up and resize it then. It's not really
// clean, but the only way I got the damned thing working.
- QTimer::singleShot(50, this, SLOT(rearrange()));
+ TQTimer::singleShot(50, this, TQT_SLOT(rearrange()));
}
void KPayeesView::slotKeyListChanged(void)
{
bool rc = false;
bool ignorecase = false;
- QStringList keys;
+ TQStringList keys;
// J.Rodehueser: delete unused variable 'type'
// orig: MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys);
m_payee.matchData(ignorecase, keys);
@@ -801,7 +801,7 @@ void KPayeesView::slotPayeeDataChanged(void)
|| (!notesEdit->text().isEmpty() && m_payee.notes() != notesEdit->text()));
bool ignorecase = false;
- QStringList keys;
+ TQStringList keys;
MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys);
rc |= (static_cast<int>(type) != m_matchType->selectedId());
@@ -831,7 +831,7 @@ void KPayeesView::slotPayeeDataChanged(void)
rc |= !m_payee.defaultAccountId().isEmpty();
}
else {
- QString temp = comboDefaultAccount->selectedAccounts().front();
+ TQString temp = comboDefaultAccount->selectedAccounts().front();
rc |= ( temp.isEmpty() != m_payee.defaultAccountId().isEmpty())
|| (!m_payee.defaultAccountId().isEmpty() && temp != m_payee.defaultAccountId());
}
@@ -860,7 +860,7 @@ void KPayeesView::slotUpdatePayee(void)
m_payee.setDefaultAccountId();
if (checkEnableDefaultAccount->isChecked()) {
- QString temp;
+ TQString temp;
if (!comboDefaultAccount->selectedAccounts().empty()) {
temp = comboDefaultAccount->selectedAccounts().front();
m_payee.setDefaultAccountId(temp);
@@ -872,7 +872,7 @@ void KPayeesView::slotUpdatePayee(void)
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to modify payee"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -882,7 +882,7 @@ void KPayeesView::readConfig(void)
{
m_transactionView->setFont(KMyMoneyGlobalSettings::listCellFont());
- QFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() );
+ TQFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() );
int height = fm.lineSpacing()+6;
m_transactionView->header()->setMinimumHeight(height);
@@ -890,7 +890,7 @@ void KPayeesView::readConfig(void)
m_transactionView->header()->setFont(KMyMoneyGlobalSettings::listHeaderFont());
m_payeesList->setDefaultRenameAction(
- KMyMoneyGlobalSettings::focusChangeIsEnter() ? QListView::Accept : QListView::Reject);
+ KMyMoneyGlobalSettings::focusChangeIsEnter() ? TQListView::Accept : TQListView::Reject);
//initialize the account list?
comboDefaultAccount->loadList((KMyMoneyUtils::categoryTypeE)(KMyMoneyUtils::asset | KMyMoneyUtils::liability | MyMoneyAccount::Income | MyMoneyAccount::Expense));
@@ -904,7 +904,7 @@ void KPayeesView::show(void)
// If you want to learn about the details, see the source of KListViewSearchLineWidget's
// constructor
if(m_needConnection) {
- connect(m_searchWidget->searchLine(), SIGNAL(textChanged(const QString&)), this, SLOT(slotQueueUpdate(void)));
+ connect(m_searchWidget->searchLine(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotQueueUpdate(void)));
m_needConnection = false;
}
@@ -913,13 +913,13 @@ void KPayeesView::show(void)
m_needReload = false;
}
- // fixup the layout
- QTimer::singleShot(0, this, SLOT(rearrange()));
+ // fixup the tqlayout
+ TQTimer::singleShot(0, this, TQT_SLOT(rearrange()));
// don't forget base class implementation
KPayeesViewDecl::show();
- QValueList<MyMoneyPayee> list;
+ TQValueList<MyMoneyPayee> list;
selectedPayees(list);
emit selectObjects(list);
}
@@ -928,7 +928,7 @@ void KPayeesView::slotLoadPayees(void)
{
if(isVisible()) {
if(m_inSelection)
- QTimer::singleShot(0, this, SLOT(slotLoadPayees()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotLoadPayees()));
else
loadPayees();
} else {
@@ -941,15 +941,15 @@ void KPayeesView::loadPayees(void)
if(m_inSelection)
return;
- QMap<QString, bool> isSelected;
- QString id;
+ TQMap<TQString, bool> isSelected;
+ TQString id;
::timetrace("Start KPayeesView::loadPayees");
readConfig();
// remember which items are selected in the list
- QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
while((it_v = it_l.current()) != 0) {
KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v);
if(item)
@@ -963,7 +963,7 @@ void KPayeesView::loadPayees(void)
id = currentItem->payee().id();
// remember the upper left corner of the viewport
- QPoint startPoint = m_payeesList->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_payeesList->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_payeesList->setUpdatesEnabled(false);
@@ -973,8 +973,8 @@ void KPayeesView::loadPayees(void)
m_transactionView->clear();
currentItem = 0;
- QValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList();
- QValueList<MyMoneyPayee>::ConstIterator it;
+ TQValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList();
+ TQValueList<MyMoneyPayee>::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
KPayeeListItem* item = new KPayeeListItem(m_payeesList, *it);
@@ -991,11 +991,11 @@ void KPayeesView::loadPayees(void)
// reposition viewport
m_payeesList->setContentsPos(startPoint.x(), startPoint.y());
- m_searchWidget->searchLine()->updateSearch(QString::null);
+ m_searchWidget->searchLine()->updateSearch(TQString());
// turn updates back on
m_payeesList->setUpdatesEnabled(true);
- m_payeesList->repaintContents();
+ m_payeesList->tqrepaintContents();
slotSelectPayee();
@@ -1007,7 +1007,7 @@ void KPayeesView::rearrange(void)
resizeEvent(0);
}
-void KPayeesView::resizeEvent(QResizeEvent* ev)
+void KPayeesView::resizeEvent(TQResizeEvent* ev)
{
// resize the register
int w = m_transactionView->visibleWidth();
@@ -1023,14 +1023,14 @@ void KPayeesView::resizeEvent(QResizeEvent* ev)
KPayeesViewDecl::resizeEvent(ev);
}
-void KPayeesView::slotTransactionDoubleClicked(QListViewItem* i)
+void KPayeesView::slotTransactionDoubleClicked(TQListViewItem* i)
{
KTransactionListItem* item = static_cast<KTransactionListItem *>(i);
if (item)
emit transactionSelected(item->accountId(), item->transactionId());
}
-void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QString& accountId, const QString& transactionId)
+void KPayeesView::slotSelectPayeeAndTransaction(const TQString& payeeId, const TQString& accountId, const TQString& transactionId)
{
if(!isVisible())
return;
@@ -1041,8 +1041,8 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS
m_searchWidget->searchLine()->updateSearch();
// deselect all other selected items
- QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected);
- QListViewItem* it_v;
+ TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected);
+ TQListViewItem* it_v;
while((it_v = it_l.current()) != 0) {
KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v);
if(item)
@@ -1051,7 +1051,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS
}
// find the payee in the list
- QListViewItem* it;
+ TQListViewItem* it;
for(it = m_payeesList->firstChild(); it; it = it->itemBelow()) {
KPayeeListItem* item = dynamic_cast<KPayeeListItem *>(it);
if(item && item->payee().id() == payeeId) {
@@ -1088,7 +1088,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS
}
}
-void KPayeesView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p)
+void KPayeesView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p)
{
Q_UNUSED(p);
if(lv == m_payeesList) {
diff --git a/kmymoney2/views/kpayeesview.h b/kmymoney2/views/kpayeesview.h
index 92f98fd..f4a481e 100644
--- a/kmymoney2/views/kpayeesview.h
+++ b/kmymoney2/views/kpayeesview.h
@@ -29,8 +29,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-class QSplitter;
+#include <tqwidget.h>
+class TQSplitter;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -57,7 +57,7 @@ class KListViewSearchLineWidget;
* vector is created, the sort method is set to SortPostDate.
* The sort type can be changed using the method setSortType().
*/
-class KTransactionPtrVector : public QPtrVector<KMyMoneyTransaction> {
+class KTransactionPtrVector : public TQPtrVector<KMyMoneyTransaction> {
public:
/**
* This enumerator defines the possible sort methods.
@@ -111,20 +111,20 @@ public:
* get information about the split referencing the current account
* during the sort phase.
*/
- void setAccountId(const QString& id);
+ void setAccountId(const TQString& id);
/**
* This method is used to set the payee id to have a chance to
* get information about the split referencing the current payee
* during the sort phase.
*/
- void setPayeeId(const QString& id);
+ void setPayeeId(const TQString& id);
protected:
int compareItems(KTransactionPtrVector::Item d1, KTransactionPtrVector::Item d2);
private:
- int compareItems(const QString& s1, const QString& s2) const;
+ int compareItems(const TQString& s1, const TQString& s2) const;
private:
enum {
@@ -132,7 +132,7 @@ private:
PayeeMode
};
short m_idMode;
- QString m_id;
+ TQString m_id;
TransactionSortE m_sortType;
};
@@ -147,20 +147,20 @@ public:
/**
* Constructor to be used to construct a payee 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 payee const reference to MyMoneyPayee for which
* the KListView entry is constructed
*/
- KPayeeListItem(KListView *parent, const MyMoneyPayee& payee);
+ KPayeeListItem(KListView *tqparent, const MyMoneyPayee& payee);
~KPayeeListItem();
/**
- * 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);
const MyMoneyPayee& payee(void) const { return m_payee; };
@@ -175,48 +175,49 @@ private:
class KTransactionListItem : public KListViewItem
{
public:
- KTransactionListItem(KListView* view, KTransactionListItem* parent, const QString& accountId, const QString& transaction);
+ KTransactionListItem(KListView* view, KTransactionListItem* tqparent, const TQString& accountId, const TQString& transaction);
~KTransactionListItem();
- const QString& transactionId(void) const { return m_transactionId; };
+ const TQString& transactionId(void) const { return m_transactionId; };
- const QString& accountId(void) const { return m_accountId; };
+ const TQString& accountId(void) const { return m_accountId; };
/**
* 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();
private:
- QString m_transactionId;
- QString m_accountId;
+ TQString m_transactionId;
+ TQString m_accountId;
};
class KPayeesView : public KPayeesViewDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
- KPayeesView(QWidget *parent=0, const char *name=0);
+ KPayeesView(TQWidget *tqparent=0, const char *name=0);
~KPayeesView();
void show(void);
public slots:
- void slotSelectPayeeAndTransaction(const QString& payeeId, const QString& accountId = QString(), const QString& transactionId = QString());
+ void slotSelectPayeeAndTransaction(const TQString& payeeId, const TQString& accountId = TQString(), const TQString& transactionId = TQString());
void slotLoadPayees(void);
void slotStartRename(void);
void slotHelp(void);
protected:
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
void loadPayees(void);
- void selectedPayees(QValueList<MyMoneyPayee>& payeesList) const;
- void ensurePayeeVisible(const QString& id);
+ void selectedPayees(TQValueList<MyMoneyPayee>& payeesList) const;
+ void ensurePayeeVisible(const TQString& id);
void clearItemData(void);
protected slots:
@@ -244,7 +245,7 @@ protected slots:
* This slot is called when the name of a payee is changed inside
* the payee list view and only a single payee is selected.
*/
- void slotRenamePayee(QListViewItem *p, int col, const QString& txt);
+ void slotRenamePayee(TQListViewItem *p, int col, const TQString& txt);
/**
* Updates the payee data in m_payee from the information in the
@@ -252,7 +253,7 @@ protected slots:
*/
void slotUpdatePayee(void);
- void slotTransactionDoubleClicked(QListViewItem *);
+ void slotTransactionDoubleClicked(TQListViewItem *);
private slots:
void rearrange(void);
@@ -265,7 +266,7 @@ private slots:
* @param item the item on which the cursor resides
* @param p position of the pointer device
*/
- void slotOpenContextMenu(KListView* lv, QListViewItem* item, const QPoint& p);
+ void slotOpenContextMenu(KListView* lv, TQListViewItem* item, const TQPoint& p);
void slotQueueUpdate(void);
@@ -277,20 +278,20 @@ private:
void readConfig(void);
signals:
- void transactionSelected(const QString& accountId, const QString& transactionId);
+ void transactionSelected(const TQString& accountId, const TQString& transactionId);
void openContextMenu(const MyMoneyObject& obj);
- void selectObjects(const QValueList<MyMoneyPayee>& payees);
+ void selectObjects(const TQValueList<MyMoneyPayee>& payees);
private:
MyMoneyPayee m_payee;
- QString m_newName;
+ TQString m_newName;
- QSplitter* m_splitter;
+ TQSplitter* m_splitter;
/**
* This member holds a list of all transactions
*/
- QValueList<KMyMoneyTransaction> m_transactionList;
+ TQValueList<KMyMoneyTransaction> m_transactionList;
/**
* This member keeps a vector of pointers to all visible (filtered)
diff --git a/kmymoney2/views/kpayeesviewdecl.ui b/kmymoney2/views/kpayeesviewdecl.ui
index 3584e6f..0c2705e 100644
--- a/kmymoney2/views/kpayeesviewdecl.ui
+++ b/kmymoney2/views/kpayeesviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KPayeesViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KPayeesViewDecl</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
@@ -52,7 +52,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>m_tabWidget</cstring>
</property>
@@ -64,7 +64,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -75,7 +75,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>transactionGroup</cstring>
</property>
@@ -92,7 +92,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout11</cstring>
</property>
@@ -161,14 +161,14 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_balanceLabel</cstring>
</property>
<property name="text">
<string>Balance: </string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -178,7 +178,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -189,7 +189,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>detailsGroup</cstring>
</property>
@@ -206,7 +206,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel7</cstring>
</property>
@@ -218,7 +218,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -228,7 +228,7 @@
<string>E-Mail:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
@@ -240,7 +240,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -250,7 +250,7 @@
<string>Postal Code:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
@@ -262,7 +262,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -272,7 +272,7 @@
<string>Telephone/Fax:</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>
@@ -284,7 +284,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -293,26 +293,26 @@
<property name="text">
<string>Notes</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop|AlignLeft</set>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>postcodeEdit</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>telephoneEdit</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="3" column="1">
+ <widget class="TQLineEdit" row="3" column="1">
<property name="name">
<cstring>emailEdit</cstring>
</property>
</widget>
- <widget class="QMultiLineEdit" row="0" column="1">
+ <widget class="TQMultiLineEdit" row="0" column="1">
<property name="name">
<cstring>addressEdit</cstring>
</property>
@@ -325,7 +325,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QMultiLineEdit" row="4" column="1">
+ <widget class="TQMultiLineEdit" row="4" column="1">
<property name="name">
<cstring>notesEdit</cstring>
</property>
@@ -338,7 +338,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
@@ -350,7 +350,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -359,7 +359,7 @@
<property name="text">
<string>Address:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop|AlignLeft</set>
</property>
</widget>
@@ -375,7 +375,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
@@ -384,7 +384,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -395,14 +395,14 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
<property name="title">
<string>Transaction Matching</string>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>m_matchType</cstring>
</property>
@@ -426,7 +426,7 @@
<property name="exclusive">
<bool>true</bool>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioNoMatch</cstring>
</property>
@@ -445,7 +445,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioNameMatch</cstring>
</property>
@@ -461,7 +461,7 @@
<string>Match on Payee name</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioKeyMatch</cstring>
</property>
@@ -498,7 +498,7 @@
<string>This list contains the names that will match this payee if a transaction is imported from an external source. Keep in mind, that you can specify regular expressions here.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkMatchIgnoreCase</cstring>
</property>
@@ -516,7 +516,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -525,7 +525,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage2</cstring>
</property>
@@ -536,7 +536,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkEnableDefaultAccount</cstring>
</property>
@@ -545,15 +545,15 @@
new transactions with this payee</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelDefaultAccount</cstring>
</property>
@@ -586,7 +586,7 @@ new transactions with this payee</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>31</height>
@@ -598,9 +598,9 @@ new transactions with this payee</string>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
@@ -632,7 +632,7 @@ new transactions with this payee</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>260</width>
<height>21</height>
@@ -662,5 +662,5 @@ new transactions with this payee</string>
<includes>
<include location="local" impldecl="in declaration">../widgets/kmymoneyaccountcombo.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp
index 6c7da52..36de4c9 100755
--- a/kmymoney2/views/kreportsview.cpp
+++ b/kmymoney2/views/kreportsview.cpp
@@ -30,22 +30,22 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdragobject.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qiconset.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdragobject.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqiconset.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -86,12 +86,12 @@ using namespace reports;
* KReportsView::KReportTab Implementation
*/
-KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& report ):
- QWidget( parent, "reporttab" ),
+KReportsView::KReportTab::KReportTab(KTabWidget* tqparent, const MyMoneyReport& report ):
+ TQWidget( tqparent, "reporttab" ),
m_part( new KHTMLPart( this, "reporttabpart" ) ),
m_chartView( new KReportChartView( this, "reportchart" ) ),
m_control( new kMyMoneyReportControlDecl( this, "reportcontrol" ) ),
- m_layout( new QVBoxLayout( this, 11, 6, "reporttablayout" ) ),
+ m_layout( new TQVBoxLayout( this, 11, 6, "reporttabtqlayout" ) ),
m_report( report ),
m_deleteMe( false ),
m_showingChart( false ),
@@ -105,20 +105,20 @@ KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& re
m_control->buttonChart->hide();
}
- m_chartView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ m_chartView->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_chartView->hide();
- m_layout->addWidget( m_control ); //, 0, Qt::AlignTop );
+ m_layout->addWidget( m_control ); //, 0, TQt::AlignTop );
m_layout->addWidget( m_part->view() );
m_layout->addWidget( m_chartView );
// I like this icon...
- QString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png");
+ TQString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png");
// but if it's not there, we'll use ye ol' standard icon
- if ( icon == QString::null )
+ if ( icon == TQString() )
icon = KGlobal::dirs()->findResource("icon", "hicolor/16x16/apps/kmymoney2.png");
- parent->insertTab( this, QIconSet(QPixmap(icon)), report.name() );
- parent->setTabEnabled( this, true );
+ tqparent->insertTab( this, TQIconSet(TQPixmap(icon)), report.name() );
+ tqparent->setTabEnabled( this, true );
#ifdef HAVE_KDCHART
if ( m_report.isChartByDefault() )
@@ -139,29 +139,29 @@ void KReportsView::KReportTab::print(void)
void KReportsView::KReportTab::copyToClipboard(void)
{
- QTextDrag* pdrag = new QTextDrag( createTable() );
+ TQTextDrag* pdrag = new TQTextDrag( createTable() );
pdrag->setSubtype("html");
- QApplication::clipboard()->setData(pdrag);
+ TQApplication::tqclipboard()->setData(pdrag);
}
-void KReportsView::KReportTab::saveAs( const QString& filename, bool includeCSS )
+void KReportsView::KReportTab::saveAs( const TQString& filename, bool includeCSS )
{
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_WriteOnly ) )
{
- if ( QFileInfo(filename).extension(false).lower() == "csv")
+ if ( TQFileInfo(filename).extension(false).lower() == "csv")
{
- QTextStream(&file) << m_table->renderCSV();
+ TQTextStream(&file) << m_table->renderCSV();
}
else {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
- QRegExp exp(QString("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").arg(KGlobal::locale()->encoding()));
- QString table = createTable();
+ TQRegExp exp(TQString("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").tqarg(KGlobal::locale()->encoding()));
+ TQString table = createTable();
if(exp.search(table) != -1 && includeCSS) {
- QFile cssFile(exp.cap(3));
+ TQFile cssFile(exp.cap(3));
if(cssFile.open(IO_ReadOnly)) {
- QTextStream cssStream(&cssFile);
+ TQTextStream cssStream(&cssFile);
stream << exp.cap(1);
stream << exp.cap(4);
stream << endl << "<style type=\"text/css\">" << endl << "<!--" << endl;
@@ -195,7 +195,7 @@ void KReportsView::KReportTab::show(void)
m_needReload = false;
updateReport();
}
- QWidget::show();
+ TQWidget::show();
}
void KReportsView::KReportTab::updateReport(void)
@@ -230,24 +230,24 @@ void KReportsView::KReportTab::updateReport(void)
m_chartView->update();
}
-QString KReportsView::KReportTab::createTable(const QString& links)
+TQString KReportsView::KReportTab::createTable(const TQString& links)
{
- QString filename;
+ TQString filename;
if(!MyMoneyFile::instance()->value("reportstylesheet").isEmpty())
- filename = KGlobal::dirs()->findResource("appdata", QString("html/%1").arg(MyMoneyFile::instance()->value("reportstylesheet")));
+ filename = KGlobal::dirs()->findResource("appdata", TQString("html/%1").tqarg(MyMoneyFile::instance()->value("reportstylesheet")));
if(filename.isEmpty())
filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css");
- QString header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") +
- QString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").arg(filename);
+ TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") +
+ TQString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").tqarg(filename);
- header += QString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").arg(KGlobal::locale()->encoding());
+ header += TQString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").tqarg(KGlobal::locale()->encoding());
header += KMyMoneyUtils::variableCSS();
header += "</head><body>\n";
- QString footer = "</body></html>\n";
+ TQString footer = "</body></html>\n";
- QString html;
+ TQString html;
try {
html += header;
html += links;
@@ -260,7 +260,7 @@ QString KReportsView::KReportTab::createTable(const QString& links)
{
kdDebug(2) << "KReportsView::KReportTab::createTable(): ERROR " << e->what() << endl;
- QString error = QString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).arg(e->what());
+ TQString error = TQString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).tqarg(e->what());
KMessageBox::error(this, error, i18n("Critical Error"));
@@ -285,7 +285,7 @@ void KReportsView::KReportTab::toggleChart(void)
m_chartView->hide();
m_control->buttonChart->setText( i18n( "Chart" ) );
- QToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) );
+ TQToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) );
}
else
{
@@ -293,7 +293,7 @@ void KReportsView::KReportTab::toggleChart(void)
m_chartView->show();
m_control->buttonChart->setText( i18n( "Report" ) );
- QToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) );
+ TQToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) );
}
m_showingChart = ! m_showingChart;
}
@@ -308,11 +308,11 @@ public:
Private() :
includeCSS(0) {}
- QCheckBox* includeCSS;
+ TQCheckBox* includeCSS;
};
-KReportsView::KReportsView(QWidget *parent, const char *name ) :
- KMyMoneyViewBase(parent, name, i18n("Reports")),
+KReportsView::KReportsView(TQWidget *tqparent, const char *name ) :
+ KMyMoneyViewBase(tqparent, name, i18n("Reports")),
d(new Private),
m_needReload(false)
{
@@ -320,29 +320,29 @@ KReportsView::KReportsView(QWidget *parent, const char *name ) :
addWidget( m_reportTabWidget );
m_reportTabWidget->setHoverCloseButton( true );
- m_listTab = (new QWidget( m_reportTabWidget, "indextab" ));
- m_listTabLayout = ( new QVBoxLayout( m_listTab, 11, 6, "indextabLayout") );
+ m_listTab = (new TQWidget( m_reportTabWidget, "indextab" ));
+ m_listTabLayout = ( new TQVBoxLayout( m_listTab, 11, 6, "indextabLayout") );
m_reportListView = new KListView( m_listTab, "m_reportListView" );
m_listTabLayout->addWidget( m_reportListView );
m_reportTabWidget->insertTab( m_listTab, i18n("Reports") );
m_reportListView->addColumn(i18n("Report"));
m_reportListView->addColumn(i18n("Comment"));
- m_reportListView->setResizeMode(QListView::AllColumns);
+ m_reportListView->setResizeMode(TQListView::AllColumns);
m_reportListView->setAllColumnsShowFocus(true);
m_reportListView->setRootIsDecorated(true);
m_reportListView->setShadeSortColumn(false);
- connect( m_reportTabWidget, SIGNAL(closeRequest(QWidget*)),
- this, SLOT(slotClose(QWidget*)) );
- connect(m_reportListView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotOpenReport(QListViewItem*)));
- connect(m_reportListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotOpenReport(QListViewItem*)));
- connect( m_reportListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint &)),
- this, SLOT(slotListContextMenu(KListView*,QListViewItem*,const QPoint &)));
+ connect( m_reportTabWidget, TQT_SIGNAL(closeRequest(TQWidget*)),
+ this, TQT_SLOT(slotClose(TQWidget*)) );
+ connect(m_reportListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotOpenReport(TQListViewItem*)));
+ connect(m_reportListView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotOpenReport(TQListViewItem*)));
+ connect( m_reportListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint &)),
+ this, TQT_SLOT(slotListContextMenu(KListView*,TQListViewItem*,const TQPoint &)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView()));
}
KReportsView::~KReportsView()
@@ -376,16 +376,16 @@ void KReportsView::slotLoadView(void)
}
}
-QString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const
+TQString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const
{
if (column == 0)
- return QString::number(m_nr).rightJustify(3,'0');
+ return TQString::number(m_nr).rightJustify(3,'0');
else
return KListViewItem::key(column,ascending);
}
-KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, const int nr, QString name) :
- KListViewItem(parent),
+KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* tqparent, const int nr, TQString name) :
+ KListViewItem(tqparent),
m_name(name)
{
setNr(nr);
@@ -394,7 +394,7 @@ KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, cons
void KReportsView::KReportGroupListItem::setNr(const int nr)
{
m_nr = nr;
- setText(0, QString("%1. %2").arg(nr).arg(m_name));
+ setText(0, TQString("%1. %2").tqarg(nr).tqarg(m_name));
}
void KReportsView::loadView(void)
@@ -403,12 +403,12 @@ void KReportsView::loadView(void)
// remember the id of the current selected item and the
// items that are shown 'expanded'
- QMap<QString, bool> isOpen;
- QListViewItem *item = m_reportListView->selectedItem();
- QString selectedPage = (item) ? item->text(0) : QString();
+ TQMap<TQString, bool> isOpen;
+ TQListViewItem *item = m_reportListView->selectedItem();
+ TQString selectedPage = (item) ? item->text(0) : TQString();
// keep a map of all 'expanded' accounts
- QListViewItemIterator it_lvi(m_reportListView);
+ TQListViewItemIterator it_lvi(m_reportListView);
while(it_lvi.current()) {
item = it_lvi.current();
if(item && item->isOpen()) {
@@ -418,7 +418,7 @@ void KReportsView::loadView(void)
}
// remember the upper left corner of the viewport
- QPoint startPoint = m_reportListView->viewportToContents(QPoint(0, 0));
+ TQPoint startPoint = m_reportListView->viewportToContents(TQPoint(0, 0));
// turn off updates to avoid flickering during reload
m_reportListView->setUpdatesEnabled(false);
@@ -432,18 +432,18 @@ void KReportsView::loadView(void)
// Default Reports
KReportGroupListItem* chartnode = new KReportGroupListItem(m_reportListView, 10, i18n("Charts"));
- QMap<QString,KReportGroupListItem*> groupitems;
- QValueList<ReportGroup> defaultreports;
+ TQMap<TQString,KReportGroupListItem*> groupitems;
+ TQValueList<ReportGroup> defaultreports;
defaultReports(defaultreports);
- QValueList<ReportGroup>::const_iterator it_group = defaultreports.begin();
+ TQValueList<ReportGroup>::const_iterator it_group = defaultreports.begin();
while ( it_group != defaultreports.end() )
{
- QString groupname = (*it_group).name();
+ TQString groupname = (*it_group).name();
KReportGroupListItem* curnode = new KReportGroupListItem(m_reportListView, pagenumber++, (*it_group).title());
- curnode->setOpen(isOpen.find(curnode->text(0)) != isOpen.end());
+ curnode->setOpen(isOpen.tqfind(curnode->text(0)) != isOpen.end());
groupitems[groupname] = curnode;
- QValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin();
+ TQValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin();
while( it_report != (*it_group).end() )
{
MyMoneyReport report = *it_report;
@@ -464,16 +464,16 @@ void KReportsView::loadView(void)
// Rename the charts item to place it at this point in the list.
chartnode->setNr(pagenumber++);
- chartnode->setOpen(isOpen.find(chartnode->text(0)) != isOpen.end());
+ chartnode->setOpen(isOpen.tqfind(chartnode->text(0)) != isOpen.end());
// Custom reports
KReportGroupListItem* favoritenode = new KReportGroupListItem(m_reportListView,pagenumber++, i18n("Favorite Reports"));
- favoritenode->setOpen(isOpen.find(favoritenode->text(0)) != isOpen.end());
+ favoritenode->setOpen(isOpen.tqfind(favoritenode->text(0)) != isOpen.end());
KReportGroupListItem* orphannode = NULL;
- QValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList();
- QValueList<MyMoneyReport>::const_iterator it_report = customreports.begin();
+ TQValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList();
+ TQValueList<MyMoneyReport>::const_iterator it_report = customreports.begin();
while( it_report != customreports.end() )
{
// If this report is in a known group, place it there
@@ -504,7 +504,7 @@ void KReportsView::loadView(void)
// turn updates back on
m_reportListView->setUpdatesEnabled(true);
- m_reportListView->repaintContents();
+ m_reportListView->tqrepaintContents();
//
// Go through the tabs to set their update flag or delete them if needed
@@ -529,8 +529,8 @@ void KReportsView::loadView(void)
void KReportsView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
{
- QString view = url.fileName(false);
- QString command = url.queryItem("command").data();
+ TQString view = url.fileName(false);
+ TQString command = url.queryItem("command");
if(view == VIEW_REPORTS) {
@@ -576,28 +576,28 @@ void KReportsView::slotSaveView(void)
{
KReportTab* tab = dynamic_cast<KReportTab*>(m_reportTabWidget->currentPage());
if(tab) {
- QVBox* vbox = new QVBox();
- d->includeCSS = new QCheckBox(i18n("Include Stylesheet"), vbox);
+ TQVBox* vbox = new TQVBox();
+ d->includeCSS = new TQCheckBox(i18n("Include Stylesheet"), vbox);
// the following code is copied from KFileDialog::getSaveFileName,
// adjust to our local needs (filetypes etc.) and
// enhanced to show the m_saveEncrypted combo box
KFileDialog dlg( ":kmymoney-export",
- QString("%1|%2\n").arg("*.csv").arg(i18n("CSV (Filefilter)", "CSV files")) +
- QString("%1|%2\n").arg("*.html").arg(i18n("HTML (Filefilter)", "HTML files")),
+ TQString("%1|%2\n").tqarg("*.csv").tqarg(i18n("CSV (Filefilter)", "CSV files")) +
+ TQString("%1|%2\n").tqarg("*.html").tqarg(i18n("HTML (Filefilter)", "HTML files")),
this, "filedialog", true, vbox);
- connect(&dlg, SIGNAL(filterChanged(const QString&)), this, SLOT(slotSaveFilterChanged(const QString&)));
+ connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), this, TQT_SLOT(slotSaveFilterChanged(const TQString&)));
dlg.setOperationMode( KFileDialog::Saving );
dlg.setCaption(i18n("Export as"));
slotSaveFilterChanged("*.csv"); // init gui
- if(dlg.exec() == QDialog::Accepted) {
+ if(dlg.exec() == TQDialog::Accepted) {
KURL newURL = dlg.selectedURL();
if (!newURL.isEmpty()) {
- QString newName = newURL.prettyURL(0, KURL::StripFileProtocol);
+ TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol);
- if(newName.findRev('.') == -1)
+ if(newName.tqfindRev('.') == -1)
newName.append(".html");
tab->saveAs( newName, d->includeCSS->isEnabled() && d->includeCSS->isChecked() );
@@ -606,7 +606,7 @@ void KReportsView::slotSaveView(void)
}
}
-void KReportsView::slotSaveFilterChanged(const QString& filter)
+void KReportsView::slotSaveFilterChanged(const TQString& filter)
{
d->includeCSS->setEnabled(filter == "*.html");
}
@@ -657,7 +657,7 @@ void KReportsView::slotDuplicate(void)
if(tab) {
MyMoneyReport dupe = tab->report();
- dupe.setName( QString(i18n("Copy of %1")).arg(dupe.name()) );
+ dupe.setName( TQString(i18n("Copy of %1")).tqarg(dupe.name()) );
if ( dupe.comment() == i18n("Default Report") )
dupe.setComment( i18n("Custom Report") );
dupe.clearId();
@@ -688,7 +688,7 @@ void KReportsView::slotDelete(void)
MyMoneyReport report = tab->report();
if ( ! report.id().isEmpty() )
{
- if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, QString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").arg(report.name())+QString("</qt>"), i18n("Delete Report?")))
+ if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, TQString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?")))
{
// close the tab and then remove the report so that it is not
// generated again during the following loadView() call
@@ -700,11 +700,11 @@ void KReportsView::slotDelete(void)
}
}
else
- KMessageBox::information(this, QString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").arg(report.name())+QString("</qt>"), i18n("Delete Report?"));
+ KMessageBox::information(this, TQString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?"));
}
}
-void KReportsView::slotOpenReport(const QString& id)
+void KReportsView::slotOpenReport(const TQString& id)
{
if ( ! id.isEmpty() )
{
@@ -731,7 +731,7 @@ void KReportsView::slotOpenReport(const QString& id)
}
}
-void KReportsView::slotOpenReport(QListViewItem* item)
+void KReportsView::slotOpenReport(TQListViewItem* item)
{
KReportListItem *reportItem = dynamic_cast<KReportListItem*> (item);
@@ -776,7 +776,7 @@ void KReportsView::slotOpenReport(QListViewItem* item)
}
else if (item)
{
- // this is not a KReportListItem, so it's a regular QListViewItem, which
+ // this is not a KReportListItem, so it's a regular TQListViewItem, which
// means its a header.
//
// double-click on a header means toggle the expand/collapse state
@@ -825,7 +825,7 @@ void KReportsView::slotCloseCurrent(void)
slotClose(m_reportTabWidget->currentPage());
}
-void KReportsView::slotClose(QWidget* w)
+void KReportsView::slotClose(TQWidget* w)
{
KReportTab* tab = dynamic_cast<KReportTab*>(w);
if(tab) {
@@ -850,20 +850,20 @@ void KReportsView::addReportTab(const MyMoneyReport& report)
{
KReportTab* tab = new KReportTab(m_reportTabWidget,report);
- connect( tab->control()->buttonChart, SIGNAL(clicked()),
- this, SLOT(slotToggleChart(void )));
- connect( tab->control()->buttonConfigure, SIGNAL(clicked()),
- this, SLOT(slotConfigure(void )));
- connect( tab->control()->buttonNew, SIGNAL(clicked()),
- this, SLOT(slotDuplicate(void )));
- connect( tab->control()->buttonCopy, SIGNAL(clicked()),
- this, SLOT(slotCopyView(void )));
- connect( tab->control()->buttonExport, SIGNAL(clicked()),
- this, SLOT(slotSaveView(void )));
- connect( tab->control()->buttonDelete, SIGNAL(clicked()),
- this, SLOT(slotDelete(void )));
- connect( tab->control()->buttonClose, SIGNAL(clicked()),
- this, SLOT(slotCloseCurrent(void )));
+ connect( tab->control()->buttonChart, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotToggleChart(void )));
+ connect( tab->control()->buttonConfigure, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotConfigure(void )));
+ connect( tab->control()->buttonNew, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDuplicate(void )));
+ connect( tab->control()->buttonCopy, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCopyView(void )));
+ connect( tab->control()->buttonExport, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveView(void )));
+ connect( tab->control()->buttonDelete, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDelete(void )));
+ connect( tab->control()->buttonClose, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCloseCurrent(void )));
// if this is a default report, then you can't delete it!
if ( report.id().isEmpty() )
@@ -875,15 +875,15 @@ void KReportsView::addReportTab(const MyMoneyReport& report)
}
-void KReportsView::slotListContextMenu(KListView* lv,QListViewItem* item,const QPoint & p)
+void KReportsView::slotListContextMenu(KListView* lv,TQListViewItem* item,const TQPoint & p)
{
if ( lv == m_reportListView && item )
{
- QPopupMenu* contextmenu = new QPopupMenu(this);
- contextmenu->insertItem( i18n("&Open"), this, SLOT(slotOpenFromList()) );
- contextmenu->insertItem( i18n("&Configure"), this, SLOT(slotConfigureFromList()) );
- contextmenu->insertItem( i18n("&New report"), this, SLOT(slotNewFromList()) );
- contextmenu->insertItem( i18n("&Delete"), this, SLOT(slotDeleteFromList()) );
+ TQPopupMenu* contextmenu = new TQPopupMenu(this);
+ contextmenu->insertItem( i18n("&Open"), this, TQT_SLOT(slotOpenFromList()) );
+ contextmenu->insertItem( i18n("&Configure"), this, TQT_SLOT(slotConfigureFromList()) );
+ contextmenu->insertItem( i18n("&New report"), this, TQT_SLOT(slotNewFromList()) );
+ contextmenu->insertItem( i18n("&Delete"), this, TQT_SLOT(slotDeleteFromList()) );
contextmenu->popup(p);
}
@@ -929,7 +929,7 @@ void KReportsView::slotDeleteFromList(void)
}
}
-void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
+void KReportsView::defaultReports(TQValueList<ReportGroup>& groups)
{
{
ReportGroup list("Income and Expenses", i18n("Income and Expenses"));
@@ -1040,7 +1040,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eInstitution,
- MyMoneyReport::eQCnone,
+ MyMoneyReport::eTQCnone,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailTop,
i18n("Account Balances by Institution"),
@@ -1050,7 +1050,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eAccountType,
- MyMoneyReport::eQCnone,
+ MyMoneyReport::eTQCnone,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailTop,
i18n("Account Balances by Type"),
@@ -1064,7 +1064,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eAccount,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Transactions by Account"),
@@ -1073,7 +1073,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
//list.back().setConvertCurrency(false);
list.push_back(MyMoneyReport(
MyMoneyReport::eCategory,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Transactions by Category"),
@@ -1081,7 +1081,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
));
list.push_back(MyMoneyReport(
MyMoneyReport::ePayee,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Transactions by Payee"),
@@ -1089,7 +1089,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
));
list.push_back(MyMoneyReport(
MyMoneyReport::eMonth,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Transactions by Month"),
@@ -1097,7 +1097,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
));
list.push_back(MyMoneyReport(
MyMoneyReport::eWeek,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Transactions by Week"),
@@ -1105,7 +1105,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
));
list.push_back(MyMoneyReport(
MyMoneyReport::eAccount,
- MyMoneyReport::eQCloan,
+ MyMoneyReport::eTQCloan,
MyMoneyTransactionFilter::allDates,
MyMoneyReport::eDetailAll,
i18n("Loan Transactions"),
@@ -1114,10 +1114,10 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.back().setLoansOnly(true);
list.push_back(MyMoneyReport(
MyMoneyReport::eAccountReconcile,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance,
MyMoneyTransactionFilter::last3Months,
MyMoneyReport::eDetailAll,
- i18n("Transactions by Reconciliation Status"),
+ i18n("Transactions by Reconciliation tqStatus"),
i18n("Default Report")
));
groups.push_back(list);
@@ -1126,7 +1126,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
ReportGroup list("CashFlow", i18n("Cash Flow"));
list.push_back(MyMoneyReport(
MyMoneyReport::eCashFlow,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Cash Flow Transactions This Month"),
@@ -1139,7 +1139,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eTopAccount,
- MyMoneyReport::eQCaction|MyMoneyReport::eQCshares|MyMoneyReport::eQCprice,
+ MyMoneyReport::eTQCaction|MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Investment Transactions"),
@@ -1149,7 +1149,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eAccountByTopAccount,
- MyMoneyReport::eQCshares|MyMoneyReport::eQCprice,
+ MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Investment Holdings by Account"),
@@ -1159,7 +1159,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eEquityType,
- MyMoneyReport::eQCshares|MyMoneyReport::eQCprice,
+ MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Investment Holdings by Type"),
@@ -1169,7 +1169,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eAccountByTopAccount,
- MyMoneyReport::eQCperformance,
+ MyMoneyReport::eTQCperformance,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Investment Performance by Account"),
@@ -1179,7 +1179,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eEquityType,
- MyMoneyReport::eQCperformance,
+ MyMoneyReport::eTQCperformance,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Investment Performance by Type"),
@@ -1289,7 +1289,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.push_back(MyMoneyReport(
MyMoneyReport::eCategory,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Tax Transactions by Category"),
@@ -1298,7 +1298,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.back().setTax(true);
list.push_back(MyMoneyReport(
MyMoneyReport::ePayee,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
i18n("Tax Transactions by Payee"),
@@ -1307,7 +1307,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.back().setTax(true);
list.push_back(MyMoneyReport(
MyMoneyReport::eCategory,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::lastFiscalYear,
MyMoneyReport::eDetailAll,
i18n("Tax Transactions by Category Last Fiscal Year"),
@@ -1316,7 +1316,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.back().setTax(true);
list.push_back(MyMoneyReport(
MyMoneyReport::ePayee,
- MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount,
+ MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount,
MyMoneyTransactionFilter::lastFiscalYear,
MyMoneyReport::eDetailAll,
i18n("Tax Transactions by Payee Last Fiscal Year"),
@@ -1350,7 +1350,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups)
list.back().setShowingRowTotals(true);
list.back().setBudget("Any",true);
// in case we're in January, we show the last year
- if(QDate::currentDate().month() == 1) {
+ if(TQDate::tqcurrentDate().month() == 1) {
list.back().setDateFilter(MyMoneyTransactionFilter::lastYear);
}
diff --git a/kmymoney2/views/kreportsview.h b/kmymoney2/views/kreportsview.h
index eaa8c7c..218155a 100755
--- a/kmymoney2/views/kreportsview.h
+++ b/kmymoney2/views/kreportsview.h
@@ -33,11 +33,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
-class QVBoxLayout;
-class QListViewItem;
+class TQVBoxLayout;
+class TQListViewItem;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -77,6 +77,7 @@ namespace KReportView {
class KReportsView : public KMyMoneyViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -87,13 +88,13 @@ public:
* @author Ace Jones
*/
- class KReportTab: public QWidget
+ class KReportTab: public TQWidget
{
private:
KHTMLPart* m_part;
reports::KReportChartView* m_chartView;
kMyMoneyReportControlDecl* m_control;
- QVBoxLayout* m_layout;
+ TQVBoxLayout* m_layout;
MyMoneyReport m_report;
bool m_deleteMe;
bool m_showingChart;
@@ -101,15 +102,15 @@ public:
reports::ReportTable* m_table;
public:
- KReportTab(KTabWidget* parent, const MyMoneyReport& report );
+ KReportTab(KTabWidget* tqparent, const MyMoneyReport& report );
~KReportTab();
const MyMoneyReport& report(void) const { return m_report; }
void print(void);
void toggleChart(void);
void copyToClipboard(void);
- void saveAs( const QString& filename, bool includeCSS = false );
+ void saveAs( const TQString& filename, bool includeCSS = false );
void updateReport(void);
- QString createTable(const QString& links=QString());
+ TQString createTable(const TQString& links=TQString());
const kMyMoneyReportControlDecl* control(void) const { return m_control; }
bool isReadyToDelete(void) const { return m_deleteMe; }
void setReadyToDelete(bool f) { m_deleteMe = f; }
@@ -129,21 +130,21 @@ public:
class KReportListItem: public KListViewItem
{
private:
- QString m_id;
+ TQString m_id;
MyMoneyReport m_report;
public:
- KReportListItem( KListView* parent, const MyMoneyReport& report ):
- KListViewItem( parent, report.name(), report.comment() ),
+ KReportListItem( KListView* tqparent, const MyMoneyReport& report ):
+ KListViewItem( tqparent, report.name(), report.comment() ),
m_id( report.id() ),
m_report( report )
{}
- KReportListItem( KListViewItem* parent, const MyMoneyReport& report ):
- KListViewItem( parent, report.name(), report.comment() ),
+ KReportListItem( KListViewItem* tqparent, const MyMoneyReport& report ):
+ KListViewItem( tqparent, report.name(), report.comment() ),
m_id( report.id() ),
m_report( report )
{}
- //const QString& id(void) const { return m_id; }
+ //const TQString& id(void) const { return m_id; }
const MyMoneyReport& report(void) const { return m_report; }
};
@@ -151,11 +152,11 @@ public:
{
private:
int m_nr;
- QString m_name;
+ TQString m_name;
public:
- KReportGroupListItem( KListView* parent,const int nr,const QString name);
- virtual QString key ( int column, bool ascending ) const;
+ KReportGroupListItem( KListView* tqparent,const int nr,const TQString name);
+ virtual TQString key ( int column, bool ascending ) const;
void setNr(const int nr);
};
@@ -167,16 +168,16 @@ public:
*
* @author Ace Jones
*/
- class ReportGroup: public QValueList<MyMoneyReport>
+ class ReportGroup: public TQValueList<MyMoneyReport>
{
private:
- QString m_name; ///< the title of the group in non-translated form
- QString m_title; ///< the title of the group in i18n-ed form
+ TQString m_name; ///< the title of the group in non-translated form
+ TQString m_title; ///< the title of the group in i18n-ed form
public:
ReportGroup( void ) {}
- ReportGroup( const QString& name, const QString& title ): m_name( name ), m_title(title) {}
- const QString& name( void ) const { return m_name; }
- const QString& title(void) const { return m_title; }
+ ReportGroup( const TQString& name, const TQString& title ): m_name( name ), m_title(title) {}
+ const TQString& name( void ) const { return m_name; }
+ const TQString& title(void) const { return m_title; }
};
private:
@@ -186,22 +187,22 @@ private:
Private* const d;
KTabWidget* m_reportTabWidget;
KListView* m_reportListView;
- QWidget* m_listTab;
- QVBoxLayout* m_listTabLayout;
+ TQWidget* m_listTab;
+ TQVBoxLayout* m_listTabLayout;
bool m_needReload;
public:
/**
* Standard constructor.
*
- * @param parent The QWidget this is used in.
+ * @param tqparent The TQWidget this is used in.
* @param name The QT name.
*
* @return An object of type KReportsView
*
* @see ~KReportsView
*/
- KReportsView(QWidget *parent=0, const char *name=0);
+ KReportsView(TQWidget *tqparent=0, const char *name=0);
/**
* Standard destructor.
@@ -222,7 +223,7 @@ public:
protected:
void addReportTab(const MyMoneyReport&);
void loadView(void);
- static void defaultReports(QValueList<ReportGroup>&);
+ static void defaultReports(TQValueList<ReportGroup>&);
public slots:
void slotOpenURL(const KURL &url, const KParts::URLArgs& args);
@@ -234,21 +235,21 @@ public slots:
void slotConfigure(void);
void slotDuplicate(void);
void slotToggleChart(void);
- void slotOpenReport(QListViewItem*);
- void slotOpenReport(const QString&);
+ void slotOpenReport(TQListViewItem*);
+ void slotOpenReport(const TQString&);
void slotOpenReport(const MyMoneyReport&);
void slotCloseCurrent(void);
- void slotClose(QWidget*);
+ void slotClose(TQWidget*);
void slotCloseAll(void);
void slotDelete(void);
- void slotListContextMenu(KListView*,QListViewItem*,const QPoint &);
+ void slotListContextMenu(KListView*,TQListViewItem*,const TQPoint &);
void slotOpenFromList(void);
void slotConfigureFromList(void);
void slotNewFromList(void);
void slotDeleteFromList(void);
protected slots:
- void slotSaveFilterChanged(const QString&);
+ void slotSaveFilterChanged(const TQString&);
signals:
/**
diff --git a/kmymoney2/views/kscheduledlistitem.cpp b/kmymoney2/views/kscheduledlistitem.cpp
index 6ba0b56..d48b881 100644
--- a/kmymoney2/views/kscheduledlistitem.cpp
+++ b/kmymoney2/views/kscheduledlistitem.cpp
@@ -23,8 +23,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -42,8 +42,8 @@
#include "../kmymoneyglobalsettings.h"
#include "../kmymoneyutils.h"
-KScheduledListItem::KScheduledListItem(KListView *parent, const QString& name, const QPixmap& pixmap, const QString& sortKey) :
- KListViewItem(parent, name),
+KScheduledListItem::KScheduledListItem(KListView *tqparent, const TQString& name, const TQPixmap& pixmap, const TQString& sortKey) :
+ KListViewItem(tqparent, name),
m_sortKey(sortKey)
{
setPixmap(0, pixmap);
@@ -51,8 +51,8 @@ KScheduledListItem::KScheduledListItem(KListView *parent, const QString& name, c
m_sortKey = name;
}
-KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoneySchedule& schedule/*, bool even*/)
- : KListViewItem(parent)
+KScheduledListItem::KScheduledListItem(KScheduledListItem *tqparent, const MyMoneySchedule& schedule/*, bool even*/)
+ : KListViewItem(tqparent)
{
m_schedule = schedule;
m_sortKey = schedule.name();
@@ -63,7 +63,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney
MyMoneyTransaction transaction = schedule.transaction();
MyMoneySplit s1 = transaction.splits()[0];
MyMoneySplit s2 = transaction.splits()[1];
- QValueList<MyMoneySplit>::ConstIterator it_s;
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
MyMoneySplit split;
MyMoneyAccount acc;
@@ -130,7 +130,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney
else
setText(2, "---");
m_amount = split.shares().abs();
- setText(3, QString("%1 ").arg(m_amount.formatMoney(acc, currency)));
+ setText(3, TQString("%1 ").tqarg(m_amount.formatMoney(acc, currency)));
// Do the real next payment like ms-money etc
if (schedule.isFinished())
{
@@ -154,38 +154,38 @@ KScheduledListItem::~KScheduledListItem()
{
}
-void KScheduledListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
+void KScheduledListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
- QColor textColour = KGlobalSettings::textColor();
- QFont cellFont = KMyMoneyGlobalSettings::listCellFont();
+ TQColor textColour = KGlobalSettings::textColor();
+ TQFont cellFont = KMyMoneyGlobalSettings::listCellFont();
// avoid colorizing lines that do not contain a schedule
if(!m_schedule.id().isEmpty()) {
if (m_schedule.isFinished())
- textColour = Qt::darkGreen;
+ textColour = TQt::darkGreen;
else if (m_schedule.isOverdue())
- textColour = Qt::red;
+ textColour = TQt::red;
}
- cg2.setColor(QColorGroup::Text, textColour);
+ cg2.setColor(TQColorGroup::Text, textColour);
// display group items in bold
- if (!parent())
+ if (!tqparent())
cellFont.setBold(true);
p->setFont(cellFont);
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());
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
-int KScheduledListItem::compare(QListViewItem* i, int col, bool ascending) const
+int KScheduledListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
KScheduledListItem* item = dynamic_cast<KScheduledListItem*>(i);
int rc;
diff --git a/kmymoney2/views/kscheduledlistitem.h b/kmymoney2/views/kscheduledlistitem.h
index c5e4728..62df861 100644
--- a/kmymoney2/views/kscheduledlistitem.h
+++ b/kmymoney2/views/kscheduledlistitem.h
@@ -26,7 +26,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpixmap.h>
+#include <tqpixmap.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -56,27 +56,27 @@ public:
*
* Other types may be added in the future.
*
- * @param parent The list view to be a child of.
+ * @param tqparent The list view to be a child of.
* @param description The (translated) description.
* @param pixmap A pixmap for the entry
* @param sortKey a sortkey, if empty, @c description will be used.
*
* @see MyMoneySchedule
*/
- KScheduledListItem(KListView *parent, const QString& description, const QPixmap& pixmap = QPixmap(), const QString& sortKey = QString());
+ KScheduledListItem(KListView *tqparent, const TQString& description, const TQPixmap& pixmap = TQPixmap(), const TQString& sortKey = TQString());
/**
- * This constructor is used to create a child of one of the children
+ * This constructor is used to create a child of one of the tqchildren
* created by the above method.
*
* This child describes a schedule and represents the data in schedule.
*
- * @param parent The list view item to be a child of.
+ * @param tqparent The list view item to be a child of.
* @param schedule The schedule to be represented.
*
* @see MyMoneySchedule
*/
- KScheduledListItem(KScheduledListItem *parent, const MyMoneySchedule& schedule/*, bool even*/);
+ KScheduledListItem(KScheduledListItem *tqparent, const MyMoneySchedule& schedule/*, bool even*/);
/**
* Standard destructor.
@@ -91,16 +91,16 @@ public:
*
* @return The schedule id.
*/
- const QString& scheduleId(void) const { return m_schedule.id(); }
+ const TQString& scheduleId(void) const { return m_schedule.id(); }
- int compare(QListViewItem* i, int col, bool ascending) const;
+ int compare(TQListViewItem* i, int col, bool ascending) const;
protected:
- 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);
private:
MyMoneySchedule m_schedule;
- QString m_sortKey;
+ TQString m_sortKey;
MyMoneyMoney m_amount;
};
diff --git a/kmymoney2/views/kscheduledview.cpp b/kmymoney2/views/kscheduledview.cpp
index 42c09db..7f6ebe0 100644
--- a/kmymoney2/views/kscheduledview.cpp
+++ b/kmymoney2/views/kscheduledview.cpp
@@ -23,12 +23,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qheader.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
+#include <tqcombobox.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -55,15 +55,15 @@
#include "../kmymoney2.h"
-KScheduledView::KScheduledView(QWidget *parent, const char *name ) :
- KScheduledViewDecl(parent,name, false),
+KScheduledView::KScheduledView(TQWidget *tqparent, const char *name ) :
+ KScheduledViewDecl(tqparent,name, false),
m_openBills(true),
m_openDeposits(true),
m_openTransfers(true),
m_openLoans(true)
{
// create the searchline widget
- // and insert it into the existing layout
+ // and insert it into the existing tqlayout
m_searchWidget = new KListViewSearchLineWidget(m_qlistviewScheduled, m_listTab);
m_listTabLayout->insertWidget(0, m_searchWidget);
@@ -74,7 +74,7 @@ KScheduledView::KScheduledView(QWidget *parent, const char *name ) :
m_qlistviewScheduled->addColumn(i18n("Next Due Date"));
m_qlistviewScheduled->addColumn(i18n("Frequency"));
m_qlistviewScheduled->addColumn(i18n("Payment Method"));
- m_qlistviewScheduled->setColumnAlignment(3, Qt::AlignRight);
+ m_qlistviewScheduled->setColumnAlignment(3, TQt::AlignRight);
readConfig();
@@ -83,37 +83,37 @@ KScheduledView::KScheduledView(QWidget *parent, const char *name ) :
if(m_qlistviewScheduled->sortColumn() == -1)
m_qlistviewScheduled->setSorting(0);
- connect(m_qbuttonNew, SIGNAL(clicked()), kmymoney2->action("schedule_new"), SLOT(activate()));
+ connect(m_qbuttonNew, TQT_SIGNAL(clicked()), kmymoney2->action("schedule_new"), TQT_SLOT(activate()));
// attach popup to 'Filter...' button
m_kaccPopup = new KPopupMenu(this);
m_kaccPopup->setCheckable(true);
m_accountsCombo->setPopup(m_kaccPopup);
- connect(m_kaccPopup, SIGNAL(activated(int)), this, SLOT(slotAccountActivated(int)));
+ connect(m_kaccPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAccountActivated(int)));
m_qbuttonNew->setGuiItem(KMyMoneyUtils::scheduleNewGuiItem());
m_accountsCombo->setGuiItem(KMyMoneyUtils::accountsFilterGuiItem());
KIconLoader *il = KGlobal::iconLoader();
- m_tabWidget->setTabIconSet(m_listTab, QIconSet(il->loadIcon("contents", KIcon::Small, KIcon::SizeSmall)));
- m_tabWidget->setTabIconSet(m_calendarTab, QIconSet(il->loadIcon("calendartab", KIcon::User, KIcon::SizeSmall)));
+ m_tabWidget->setTabIconSet(m_listTab, TQIconSet(il->loadIcon("contents", KIcon::Small, KIcon::SizeSmall)));
+ m_tabWidget->setTabIconSet(m_calendarTab, TQIconSet(il->loadIcon("calendartab", KIcon::User, KIcon::SizeSmall)));
- connect(m_qlistviewScheduled, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotListViewContextMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(m_qlistviewScheduled, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotSetSelectedItem(QListViewItem*)));
+ connect(m_qlistviewScheduled, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotListViewContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(m_qlistviewScheduled, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotSetSelectedItem(TQListViewItem*)));
- connect(m_qlistviewScheduled, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotListItemExecuted(QListViewItem*, const QPoint&, int)));
- connect(m_qlistviewScheduled, SIGNAL(expanded(QListViewItem*)),
- this, SLOT(slotListViewExpanded(QListViewItem*)));
- connect(m_qlistviewScheduled, SIGNAL(collapsed(QListViewItem*)),
- this, SLOT(slotListViewCollapsed(QListViewItem*)));
+ connect(m_qlistviewScheduled, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotListItemExecuted(TQListViewItem*, const TQPoint&, int)));
+ connect(m_qlistviewScheduled, TQT_SIGNAL(expanded(TQListViewItem*)),
+ this, TQT_SLOT(slotListViewExpanded(TQListViewItem*)));
+ connect(m_qlistviewScheduled, TQT_SIGNAL(collapsed(TQListViewItem*)),
+ this, TQT_SLOT(slotListViewCollapsed(TQListViewItem*)));
- connect(m_calendar, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)), this, SLOT(slotBriefEnterClicked(const MyMoneySchedule&, const QDate&)));
- connect(m_calendar, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)), this, SLOT(slotBriefSkipClicked(const MyMoneySchedule&, const QDate&)));
+ connect(m_calendar, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SLOT(slotBriefEnterClicked(const MyMoneySchedule&, const TQDate&)));
+ connect(m_calendar, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SLOT(slotBriefSkipClicked(const MyMoneySchedule&, const TQDate&)));
- connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadView()));
+ connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadView()));
}
KScheduledView::~KScheduledView()
@@ -121,11 +121,11 @@ KScheduledView::~KScheduledView()
writeConfig();
}
-void KScheduledView::refresh(bool full, const QString& schedId)
+void KScheduledView::refresh(bool full, const TQString& schedId)
{
m_qlistviewScheduled->header()->setFont(KMyMoneyGlobalSettings::listHeaderFont());
- QPoint startPoint = QPoint(m_qlistviewScheduled->contentsX(), m_qlistviewScheduled->contentsY());
+ TQPoint startPoint = TQPoint(m_qlistviewScheduled->contentsX(), m_qlistviewScheduled->contentsY());
m_qlistviewScheduled->clear();
@@ -141,7 +141,7 @@ void KScheduledView::refresh(bool full, const QString& schedId)
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyAccount acc;
- QStringList::ConstIterator it_s;
+ TQStringList::ConstIterator it_s;
acc = file->asset();
for(it_s = acc.accountList().begin(); it_s != acc.accountList().end(); ++it_s)
@@ -163,7 +163,7 @@ void KScheduledView::refresh(bool full, const QString& schedId)
m_calendar->refresh();
MyMoneyFile *file = MyMoneyFile::instance();
- QValueList<MyMoneySchedule> scheduledItems = file->scheduleList();
+ TQValueList<MyMoneySchedule> scheduledItems = file->scheduleList();
if (scheduledItems.count() == 0)
return;
@@ -173,7 +173,7 @@ void KScheduledView::refresh(bool full, const QString& schedId)
KScheduledListItem *itemLoans = new KScheduledListItem(m_qlistviewScheduled, i18n("Loans"), KMyMoneyUtils::transferScheduleIcon(KIcon::Small), "2");
KScheduledListItem *itemTransfers = new KScheduledListItem(m_qlistviewScheduled, i18n("Transfers"), KMyMoneyUtils::transferScheduleIcon(KIcon::Small), "3");
- QValueList<MyMoneySchedule>::Iterator it;
+ TQValueList<MyMoneySchedule>::Iterator it;
KScheduledListItem *openItem=0;
@@ -183,7 +183,7 @@ void KScheduledView::refresh(bool full, const QString& schedId)
KScheduledListItem* item=0;
bool bContinue=true;
- QStringList::iterator accIt;
+ TQStringList::iterator accIt;
for (accIt=m_filterAccounts.begin(); accIt!=m_filterAccounts.end(); ++accIt)
{
if (*accIt == schedData.account().id())
@@ -196,7 +196,7 @@ void KScheduledView::refresh(bool full, const QString& schedId)
if (!bContinue)
continue;
- KScheduledListItem* parent = 0;
+ KScheduledListItem* tqparent = 0;
switch (schedData.type())
{
case MyMoneySchedule::TYPE_ANY:
@@ -204,25 +204,25 @@ void KScheduledView::refresh(bool full, const QString& schedId)
// We just sort it as bill and fall through here
case MyMoneySchedule::TYPE_BILL:
- parent = itemBills;
+ tqparent = itemBills;
break;
case MyMoneySchedule::TYPE_DEPOSIT:
- parent = itemDeposits;
+ tqparent = itemDeposits;
break;
case MyMoneySchedule::TYPE_TRANSFER:
- parent = itemTransfers;
+ tqparent = itemTransfers;
break;
case MyMoneySchedule::TYPE_LOANPAYMENT:
- parent = itemLoans;
+ tqparent = itemLoans;
break;
}
- if(parent) {
+ if(tqparent) {
if(!KMyMoneyGlobalSettings::hideFinishedSchedules() || !schedData.isFinished()) {
- item = new KScheduledListItem(parent, schedData);
+ item = new KScheduledListItem(tqparent, schedData);
if (schedData.id() == schedId)
openItem = item;
}
@@ -237,11 +237,11 @@ void KScheduledView::refresh(bool full, const QString& schedId)
// working when coming from hidden form to visible form. I assume, this
// has something to do with the delayed update of the display somehow.
resize(width(), height()-1);
- QTimer::singleShot(10, this, SLOT(slotTimerDone()));
+ TQTimer::singleShot(10, this, TQT_SLOT(slotTimerDone()));
m_qlistviewScheduled->update();
- // force repaint in case the filter is set
- m_searchWidget->searchLine()->updateSearch(QString::null);
+ // force tqrepaint in case the filter is set
+ m_searchWidget->searchLine()->updateSearch(TQString());
if (m_openBills)
itemBills->setOpen(true);
@@ -266,16 +266,16 @@ void KScheduledView::refresh(bool full, const QString& schedId)
void KScheduledView::slotTimerDone(void)
{
- QListViewItem* item;
+ TQListViewItem* item;
item = m_qlistviewScheduled->selectedItem();
if(item) {
m_qlistviewScheduled->ensureItemVisible(item);
}
- // force a repaint of all items to update the branches
+ // force a tqrepaint of all items to update the branches
for(item = m_qlistviewScheduled->firstChild(); item != 0; item = item->itemBelow()) {
- m_qlistviewScheduled->repaintItem(item);
+ m_qlistviewScheduled->tqrepaintItem(item);
}
resize(width(), height()+1);
}
@@ -290,7 +290,7 @@ void KScheduledView::slotReloadView(void)
refresh(true, m_selectedSchedule);
m_needReload = false;
- QTimer::singleShot(50, this, SLOT(slotRearrange()));
+ TQTimer::singleShot(50, this, TQT_SLOT(slotRearrange()));
}
}
@@ -304,7 +304,7 @@ void KScheduledView::show()
void KScheduledView::slotRearrange(void)
{
- resizeEvent(0);
+ resizeEvent((TQResizeEvent*)0);
}
void KScheduledView::readConfig(void)
@@ -336,14 +336,14 @@ void KScheduledView::writeConfig(void)
m_qlistviewScheduled->saveLayout(KGlobal::config(), "Schedule View Settings");
}
-void KScheduledView::slotListViewContextMenu(KListView* /* view */, QListViewItem *item, const QPoint& /* pos */)
+void KScheduledView::slotListViewContextMenu(KListView* /* view */, TQListViewItem *item, const TQPoint& /* pos */)
{
KScheduledListItem *scheduleItem = dynamic_cast<KScheduledListItem *>(item);
if (scheduleItem)
{
try
{
- QString scheduleId = scheduleItem->scheduleId();
+ TQString scheduleId = scheduleItem->scheduleId();
if (!scheduleId.isEmpty()) // Top level item
{
@@ -364,7 +364,7 @@ void KScheduledView::slotListViewContextMenu(KListView* /* view */, QListViewIte
}
}
-void KScheduledView::slotListItemExecuted(QListViewItem* item, const QPoint&, int)
+void KScheduledView::slotListItemExecuted(TQListViewItem* item, const TQPoint&, int)
{
KScheduledListItem* scheduleItem = (KScheduledListItem*)item;
if (!scheduleItem)
@@ -372,7 +372,7 @@ void KScheduledView::slotListItemExecuted(QListViewItem* item, const QPoint&, in
try
{
- QString scheduleId = scheduleItem->scheduleId();
+ TQString scheduleId = scheduleItem->scheduleId();
if (!scheduleId.isEmpty()) // Top level item
{
@@ -398,7 +398,7 @@ void KScheduledView::slotAccountActivated(int id)
int accountCount=0;
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyAccount acc;
- QStringList::ConstIterator it_s;
+ TQStringList::ConstIterator it_s;
acc = file->asset();
for(it_s = acc.accountList().begin(); it_s != acc.accountList().end(); ++it_s)
@@ -421,7 +421,7 @@ void KScheduledView::slotAccountActivated(int id)
}
}
-void KScheduledView::slotListViewExpanded(QListViewItem* item)
+void KScheduledView::slotListViewExpanded(TQListViewItem* item)
{
KScheduledListItem *scheduleItem = (KScheduledListItem*)item;
if (scheduleItem)
@@ -437,7 +437,7 @@ void KScheduledView::slotListViewExpanded(QListViewItem* item)
}
}
-void KScheduledView::slotListViewCollapsed(QListViewItem* item)
+void KScheduledView::slotListViewCollapsed(TQListViewItem* item)
{
KScheduledListItem *scheduleItem = (KScheduledListItem*)item;
if (scheduleItem)
@@ -453,12 +453,12 @@ void KScheduledView::slotListViewCollapsed(QListViewItem* item)
}
}
-void KScheduledView::slotSelectSchedule(const QString& schedule)
+void KScheduledView::slotSelectSchedule(const TQString& schedule)
{
refresh(true, schedule);
}
-void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, const QDate& date)
+void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, const TQDate& date)
{
Q_UNUSED(date);
@@ -466,7 +466,7 @@ void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, cons
emit enterSchedule();
}
-void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const QDate& date)
+void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const TQDate& date)
{
Q_UNUSED(date);
@@ -474,7 +474,7 @@ void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const
emit skipSchedule();
}
-void KScheduledView::slotSetSelectedItem(QListViewItem* item)
+void KScheduledView::slotSetSelectedItem(TQListViewItem* item)
{
emit scheduleSelected(MyMoneySchedule());
KScheduledListItem* schedItem = static_cast<KScheduledListItem*>(item);
diff --git a/kmymoney2/views/kscheduledview.h b/kmymoney2/views/kscheduledview.h
index 9eac41a..25600bd 100644
--- a/kmymoney2/views/kscheduledview.h
+++ b/kmymoney2/views/kscheduledview.h
@@ -25,8 +25,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qwidget.h>
-#include <qlistview.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -56,12 +56,13 @@ class KPopupMenu;
class KScheduledView : public KScheduledViewDecl
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * Standard constructor for QWidgets.
+ * Standard constructor for TQWidgets.
*/
- KScheduledView(QWidget *parent=0, const char *name=0);
+ KScheduledView(TQWidget *tqparent=0, const char *name=0);
/**
* Standard destructor.
@@ -74,7 +75,7 @@ public:
void show();
public slots:
- void slotSelectSchedule(const QString& schedule);
+ void slotSelectSchedule(const TQString& schedule);
void slotReloadView(void);
signals:
@@ -94,27 +95,27 @@ protected slots:
* @param pos The position to popup
* @return none
**/
- void slotListViewContextMenu(KListView* view, QListViewItem* item, const QPoint& pos);
+ void slotListViewContextMenu(KListView* view, TQListViewItem* item, const TQPoint& pos);
- void slotListItemExecuted(QListViewItem*, const QPoint&, int);
+ void slotListItemExecuted(TQListViewItem*, const TQPoint&, int);
void slotAccountActivated(int);
- void slotListViewCollapsed(QListViewItem* item);
- void slotListViewExpanded(QListViewItem* item);
+ void slotListViewCollapsed(TQListViewItem* item);
+ void slotListViewExpanded(TQListViewItem* item);
- void slotBriefSkipClicked(const MyMoneySchedule& schedule, const QDate&);
- void slotBriefEnterClicked(const MyMoneySchedule& schedule, const QDate&);
+ void slotBriefSkipClicked(const MyMoneySchedule& schedule, const TQDate&);
+ void slotBriefEnterClicked(const MyMoneySchedule& schedule, const TQDate&);
void slotTimerDone(void);
- void slotSetSelectedItem(QListViewItem* item);
+ void slotSetSelectedItem(TQListViewItem* item);
void slotRearrange(void);
private:
/// The selected schedule id in the list view.
- QString m_selectedSchedule;
+ TQString m_selectedSchedule;
/// Read config file
void readConfig(void);
@@ -125,7 +126,7 @@ private:
/**
* Refresh the view.
*/
- void refresh(bool full=true, const QString& schedId = QString());
+ void refresh(bool full=true, const TQString& schedId = TQString());
/**
* Loads the accounts into the combo box.
@@ -133,7 +134,7 @@ private:
// void loadAccounts(void);
KPopupMenu *m_kaccPopup;
- QStringList m_filterAccounts;
+ TQStringList m_filterAccounts;
bool m_openBills;
bool m_openDeposits;
bool m_openTransfers;
diff --git a/kmymoney2/views/kscheduledviewdecl.ui b/kmymoney2/views/kscheduledviewdecl.ui
index faa3fe8..215ec7f 100644
--- a/kmymoney2/views/kscheduledviewdecl.ui
+++ b/kmymoney2/views/kscheduledviewdecl.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KScheduledViewDecl</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KScheduledViewDecl</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -45,7 +45,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>80</width>
<height>20</height>
@@ -76,11 +76,11 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>m_tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_listTab</cstring>
</property>
@@ -113,7 +113,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_calendarTab</cstring>
</property>
@@ -157,5 +157,5 @@
<data format="PNG" length="824">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000002ff49444154388db59531681c4714863f992dde820cb370815b50600f54e8ca0ba43970712a8fb838438a3895634813d238a5ab80e314ae4d0a812060a4226017c27221c8a9da6b8c4fe0e00d28b0571cec82043b85611f78c12966efa4bb8bc085f29a6567df7cef9f7fdeccaec571cc2cbaddee47ae21e2385e5b9b815f1ebcfcd8de6a63ad25cb338af7c52741acb5a4a729a3d723a82ec6bd99d267bf3f23fc1c4cab2442d14a915986e792fdfa59569766573049417784f1b12e8267954dab24b78714450a28beaf941f847c2a14e70a0841035a2d45d641eb027213c210c69756320767794684d6508bef0befde1a860796e4c402333542b4256c0f0cdd1e50b97191458be6e0e27d81563a87c643d8fb2d7793d685d696413cc8a6cae46f65f7d79c7c62b87b4f2e15fd0fb0d302be0fefde4a0d557a5f35e90f84e0334014d590f855c9de4ecee17e4eb319d1ff3a00ec02f8c67299f283307c61e7d06fbf1782d082588a33e1cf1705fd81cf773f3601e1f9bec59e2f4b5c7ef5209f0ac95f16630cfd818067c103b586dd274a726229cee0fe8380d191cb4d1267d3d58aa1de7d258ceae5d7d0a78fdd269a86f0c52d414c49bbe3762c9b686de41560d7a72e41c4795a6486a78f95e4c4151481d686efbe7b3398ac58b1a23868b8c474aaa8068c8e714a8dd06c1af2a9e5d1c38c641c909dba6e08237f19b358a7ac5cf3479bc2e41f257e55d2ffc6a73833746f09e186cfa387904f2cbffc90a2aa9886d0e99464d3c5965b512cebd01f1800f67672e2a392fb0f023a3d883a053ffddcc2340dd65ab452b6074dc2cd15c1cbceb863daed413e353cdfcfd97d92333a12da6d0181ec3443cf753ef3cdd092de0e116ff1a02cdc157338ca9d7b8269461cfee1ba2139b9286e1a427f10110f2d561555b076d18a39383d4d99a4c0cd0b787f20747b214962c8266e3cdcf0e97c59126ec2f6edd089f40a92f115e0d1eb11ba238461dd6a15f32b53666de841965bb203575a3cc15a48c64a965fe57105e3635db8fa96dcffc431172b5d715d7103dc3fea7f015f373c8ee3b57f0135105a0fae7717960000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>