summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kmymoneycategory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/widgets/kmymoneycategory.cpp
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz
kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/widgets/kmymoneycategory.cpp')
-rw-r--r--kmymoney2/widgets/kmymoneycategory.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kmymoney2/widgets/kmymoneycategory.cpp b/kmymoney2/widgets/kmymoneycategory.cpp
index e14a5a5..7fc8c5a 100644
--- a/kmymoney2/widgets/kmymoneycategory.cpp
+++ b/kmymoney2/widgets/kmymoneycategory.cpp
@@ -18,11 +18,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qrect.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -49,42 +49,42 @@ public:
recursive(false) {}
KPushButton* splitButton;
- QFrame* frame;
+ TQFrame* frame;
bool recursive;
};
-KMyMoneyCategory::KMyMoneyCategory(QWidget* parent, const char * name, bool splitButton) :
- KMyMoneyCombo(true, parent, name),
+KMyMoneyCategory::KMyMoneyCategory(TQWidget* tqparent, const char * name, bool splitButton) :
+ KMyMoneyCombo(true, tqparent, name),
d(new Private)
{
if(splitButton) {
- d->frame = new QFrame(0);
+ d->frame = new TQFrame(0);
d->frame->setFocusProxy(this);
- QHBoxLayout* layout = new QHBoxLayout(d->frame);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(d->frame);
// make sure not to use our own overridden version of reparent() here
- KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, QPoint(0, 0), true);
- if(parent)
- d->frame->reparent(parent, QPoint(0, 0), true);
+ KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, TQPoint(0, 0), true);
+ if(tqparent)
+ d->frame->reparent(tqparent, TQPoint(0, 0), true);
// create button
KGuiItem splitButtonItem("",
- QIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small,
+ TQIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small,
KIcon::SizeSmall)), "", "");
d->splitButton = new KPushButton(splitButtonItem, d->frame, "splitButton");
- layout->addWidget(this, 5);
- layout->addWidget(d->splitButton);
+ tqlayout->addWidget(this, 5);
+ tqlayout->addWidget(d->splitButton);
}
m_completion = new kMyMoneyAccountCompletion(this, 0);
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&)));
- connect(this, SIGNAL(textChanged(const QString&)), m_completion, SLOT(slotMakeCompletion(const QString&)));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), m_completion, TQT_SLOT(slotMakeCompletion(const TQString&)));
}
KMyMoneyCategory::~KMyMoneyCategory()
{
- // make sure to wipe out the frame, button and layout
- if(d->frame && !d->frame->parentWidget())
+ // make sure to wipe out the frame, button and tqlayout
+ if(d->frame && !d->frame->tqparentWidget())
d->frame->deleteLater();
delete d;
@@ -95,19 +95,19 @@ KPushButton* KMyMoneyCategory::splitButton(void) const
return d->splitButton;
}
-void KMyMoneyCategory::setPalette(const QPalette& palette)
+void KMyMoneyCategory::setPalette(const TQPalette& palette)
{
if(d->frame)
d->frame->setPalette(palette);
KMyMoneyCombo::setPalette(palette);
}
-void KMyMoneyCategory::reparent(QWidget *parent, WFlags w, const QPoint& pos, bool showIt)
+void KMyMoneyCategory::reparent(TQWidget *tqparent, WFlags w, const TQPoint& pos, bool showIt)
{
if(d->frame)
- d->frame->reparent(parent, w, pos, showIt);
+ d->frame->reparent(tqparent, w, pos, showIt);
else
- KMyMoneyCombo::reparent(parent, w, pos, showIt);
+ KMyMoneyCombo::reparent(tqparent, w, pos, showIt);
}
kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const
@@ -115,7 +115,7 @@ kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const
return dynamic_cast<kMyMoneyAccountSelector*>(KMyMoneyCombo::selector());
}
-void KMyMoneyCategory::setCurrentTextById(const QString& id)
+void KMyMoneyCategory::setCurrentTextById(const TQString& id)
{
if(!id.isEmpty())
setCurrentText(MyMoneyFile::instance()->accountToCategory(id));
@@ -124,7 +124,7 @@ void KMyMoneyCategory::setCurrentTextById(const QString& id)
setSuppressObjectCreation(false);
}
-void KMyMoneyCategory::slotItemSelected(const QString& id)
+void KMyMoneyCategory::slotItemSelected(const TQString& id)
{
setCurrentTextById(id);
@@ -136,7 +136,7 @@ void KMyMoneyCategory::slotItemSelected(const QString& id)
}
}
-void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev)
+void KMyMoneyCategory::focusOutEvent(TQFocusEvent *ev)
{
if(isSplitTransaction()) {
KComboBox::focusOutEvent(ev);
@@ -145,14 +145,14 @@ void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev)
}
}
-void KMyMoneyCategory::focusInEvent(QFocusEvent *ev)
+void KMyMoneyCategory::focusInEvent(TQFocusEvent *ev)
{
KMyMoneyCombo::focusInEvent(ev);
// make sure, we get a clean state before we automagically move the focus to
// some other widget (like for 'split transaction'). We do this by delaying
// the emission of the focusIn signal until the next run of the event loop.
- QTimer::singleShot(0, this, SIGNAL(focusIn()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(focusIn()));
}
void KMyMoneyCategory::setSplitTransaction(void)
@@ -183,8 +183,8 @@ void KMyMoneyCategory::setDisabled(bool disable)
setEnabled(!disable);
}
-KMyMoneySecurity::KMyMoneySecurity(QWidget* parent, const char * name) :
- KMyMoneyCategory(parent, name, false)
+KMyMoneySecurity::KMyMoneySecurity(TQWidget* tqparent, const char * name) :
+ KMyMoneyCategory(tqparent, name, false)
{
}
@@ -192,7 +192,7 @@ KMyMoneySecurity::~KMyMoneySecurity()
{
}
-void KMyMoneySecurity::setCurrentTextById(const QString& id)
+void KMyMoneySecurity::setCurrentTextById(const TQString& id)
{
if(!id.isEmpty())
KMyMoneyCategory::setCurrentText(MyMoneyFile::instance()->account(id).name());