summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kmymoneyaccountcombo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/widgets/kmymoneyaccountcombo.cpp')
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcombo.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
index 8a44786..67a416f 100644
--- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp
+++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
@@ -23,10 +23,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -38,25 +38,25 @@
#include <kmymoney/kmymoneyaccountcombo.h>
#include "kmymoneyaccountcompletion.h"
-KMyMoneyAccountCombo::KMyMoneyAccountCombo( QWidget* parent, const char* name ) :
- KComboBox( parent, name ),
+KMyMoneyAccountCombo::KMyMoneyAccountCombo( TQWidget* tqparent, const char* name ) :
+ KComboBox( tqparent, name ),
m_completion(0),
m_mlbDown(false)
{
#ifndef KMM_DESIGNER
m_completion = new kMyMoneyAccountCompletion(this);
- connect(this, SIGNAL(clicked()), this, SLOT(slotButtonPressed()));
- connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSelected(const QString&)));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonPressed()));
+ connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSelected(const TQString&)));
#endif
// make sure that we can display a minimum of characters
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
setMinimumWidth(fm.maxWidth()*15);
setMaximumHeight(height());
// we only use this one item and replace the text as we have our own dropdown box
- insertItem(QString(""));
+ insertItem(TQString(""));
}
KMyMoneyAccountCombo::~KMyMoneyAccountCombo()
@@ -68,7 +68,7 @@ void KMyMoneyAccountCombo::slotButtonPressed(void)
m_completion->show();
}
-void KMyMoneyAccountCombo::slotSelected(const QString& id)
+void KMyMoneyAccountCombo::slotSelected(const TQString& id)
{
try {
MyMoneyAccount acc = MyMoneyFile::instance()->account(id);
@@ -79,7 +79,7 @@ void KMyMoneyAccountCombo::slotSelected(const QString& id)
}
}
-void KMyMoneyAccountCombo::setSelected(const QString& id)
+void KMyMoneyAccountCombo::setSelected(const TQString& id)
{
if(!id.isEmpty()) {
try {
@@ -90,7 +90,7 @@ void KMyMoneyAccountCombo::setSelected(const QString& id)
delete e;
}
} else {
- setText(QString());
+ setText(TQString());
m_completion->setSelected(id);
}
}
@@ -101,12 +101,12 @@ void KMyMoneyAccountCombo::setSelected(const MyMoneyAccount& acc)
setText(acc.name());
}
-void KMyMoneyAccountCombo::setText(const QString& txt)
+void KMyMoneyAccountCombo::setText(const TQString& txt)
{
changeItem(txt, currentItem());
}
-int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QString>& accountIdList, const bool clear)
+int KMyMoneyAccountCombo::loadList(const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear)
{
AccountSet set;
@@ -116,7 +116,7 @@ int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QSt
int KMyMoneyAccountCombo::loadList(KMyMoneyUtils::categoryTypeE typeMask)
{
AccountSet set;
- QValueList<int> typeList;
+ TQValueList<int> typeList;
if(typeMask & KMyMoneyUtils::asset) {
set.addAccountGroup(MyMoneyAccount::Asset);
@@ -143,13 +143,13 @@ int KMyMoneyAccountCombo::loadList(MyMoneyAccount::accountTypeE type)
return set.load(m_completion->selector());
}
-void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k)
+void KMyMoneyAccountCombo::keyPressEvent(TQKeyEvent* k)
{
switch(k->key()) {
- case Qt::Key_Tab:
+ case TQt::Key_Tab:
break;
- case Qt::Key_Space:
+ case TQt::Key_Space:
emit clicked();
break;
@@ -159,22 +159,22 @@ void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k)
return;
}
-void KMyMoneyAccountCombo::mousePressEvent(QMouseEvent *e)
+void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e)
{
- if ( e->button() != LeftButton ) {
+ if ( e->button() != Qt::LeftButton ) {
e->ignore();
return;
}
- bool hit = rect().contains( e->pos() );
+ bool hit = TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() );
if ( hit ) { // mouse press on button
m_mlbDown = TRUE; // left mouse button down
emit pressed();
}
}
-void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e)
+void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e)
{
- if ( e->button() != LeftButton ) {
+ if ( e->button() != Qt::LeftButton ) {
e->ignore();
return;
}
@@ -182,7 +182,7 @@ void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e)
return;
m_mlbDown = FALSE; // left mouse button up
emit released();
- if ( rect().contains( e->pos() ) ) { // mouse release on button
+ if ( TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) { // mouse release on button
emit clicked();
}
}
@@ -192,25 +192,25 @@ int KMyMoneyAccountCombo::count(void) const
return m_completion->selector()->accountList().count();
}
-QStringList KMyMoneyAccountCombo::accountList(const QValueList<MyMoneyAccount::accountTypeE>& list) const
+TQStringList KMyMoneyAccountCombo::accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list) const
{
return m_completion->selector()->accountList(list);
};
-int KMyMoneyAccountCombo::loadList(const QValueList<int>& list)
+int KMyMoneyAccountCombo::loadList(const TQValueList<int>& list)
{
// FIXME make the caller construct the AccountSet directly
AccountSet set;
- QValueList<int>::const_iterator it;
+ TQValueList<int>::const_iterator it;
for(it = list.begin(); it != list.end(); ++it) {
set.addAccountType(static_cast<MyMoneyAccount::accountTypeE>(*it));
}
return set.load(m_completion->selector());
};
-QStringList KMyMoneyAccountCombo::selectedAccounts(void) const
+TQStringList KMyMoneyAccountCombo::selectedAccounts(void) const
{
- QStringList list;
+ TQStringList list;
m_completion->selector()->selectedItems(list);
return list;
};