summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/registersearchline.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/registersearchline.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/registersearchline.cpp')
-rw-r--r--kmymoney2/widgets/registersearchline.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kmymoney2/widgets/registersearchline.cpp b/kmymoney2/widgets/registersearchline.cpp
index f0ef6e9..6acace3 100644
--- a/kmymoney2/widgets/registersearchline.cpp
+++ b/kmymoney2/widgets/registersearchline.cpp
@@ -17,10 +17,10 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqtimer.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -47,21 +47,21 @@ public:
status(0) {}
Register* reg;
- QComboBox* combo;
- QString search;
+ TQComboBox* combo;
+ TQString search;
int queuedSearches;
int status;
};
-RegisterSearchLine::RegisterSearchLine(QWidget* parent, Register* reg, const char* name) :
- KLineEdit(parent, name),
+RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, Register* reg, const char* name) :
+ KLineEdit(tqparent, name),
d(new RegisterSearchLinePrivate)
{
init(reg);
}
-RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) :
- KLineEdit(parent, name),
+RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, const char* name) :
+ KLineEdit(tqparent, name),
d(new RegisterSearchLinePrivate)
{
init(0);
@@ -70,10 +70,10 @@ RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) :
void RegisterSearchLine::init(Register *reg)
{
d->reg = reg;
- connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(queueSearch(const QString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(queueSearch(const TQString&)));
- QLabel* label = new QLabel(i18n("label for status combo", "Stat&us"), parentWidget());
- d->combo = new QComboBox(parentWidget());
+ TQLabel* label = new TQLabel(i18n("label for status combo", "Stat&us"), tqparentWidget());
+ d->combo = new TQComboBox(tqparentWidget());
// don't change the order of the following lines unless updating
// the case labels in RegisterSearchLine::itemMatches() at the same time
d->combo->insertItem(SmallIcon("run"), i18n("Any status"));
@@ -84,13 +84,13 @@ void RegisterSearchLine::init(Register *reg)
d->combo->insertItem(i18n("Not reconciled"));
d->combo->insertItem(i18n("Cleared"));
d->combo->setCurrentItem(0);
- connect(d->combo, SIGNAL(activated(int)), this, SLOT(slotStatusChanged(int)));
+ connect(d->combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStatusChanged(int)));
label->setBuddy(d->combo);
if(reg) {
- connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
} else {
setEnabled(false);
}
@@ -104,15 +104,15 @@ RegisterSearchLine::~RegisterSearchLine()
void RegisterSearchLine::setRegister(Register* reg)
{
if(d->reg) {
- disconnect(d->reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- disconnect(d->reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ disconnect(d->reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ disconnect(d->reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
}
d->reg = reg;
if(reg) {
- connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed()));
- connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*)));
+ connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed()));
+ connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*)));
}
setEnabled(reg != 0);
@@ -124,11 +124,11 @@ void RegisterSearchLine::slotStatusChanged(int status)
updateSearch();
}
-void RegisterSearchLine::queueSearch(const QString& search)
+void RegisterSearchLine::queueSearch(const TQString& search)
{
d->queuedSearches++;
d->search = search;
- QTimer::singleShot(200, this, SLOT(activateSearch()));
+ TQTimer::singleShot(200, this, TQT_SLOT(activateSearch()));
}
void RegisterSearchLine::activateSearch(void)
@@ -138,7 +138,7 @@ void RegisterSearchLine::activateSearch(void)
updateSearch(d->search);
}
-void RegisterSearchLine::updateSearch(const QString& s)
+void RegisterSearchLine::updateSearch(const TQString& s)
{
if(!d->reg)
return;
@@ -167,7 +167,7 @@ void RegisterSearchLine::updateSearch(const QString& s)
d->reg->updateContents();
d->reg->ensureItemVisible(focusItem);
} else
- d->reg->repaintContents();
+ d->reg->tqrepaintContents();
d->reg->updateScrollBars();
@@ -177,7 +177,7 @@ void RegisterSearchLine::updateSearch(const QString& s)
}
}
-bool RegisterSearchLine::itemMatches(const RegisterItem* item, const QString& s) const
+bool RegisterSearchLine::itemMatches(const RegisterItem* item, const TQString& s) const
{
const Transaction* t = dynamic_cast<const Transaction*>(item);
if(t && !t->transaction().id().isEmpty()) {
@@ -247,17 +247,17 @@ class RegisterSearchLineWidget::RegisterSearchLineWidgetPrivate
Register* reg;
RegisterSearchLine* searchLine;
- QToolButton* clearButton;
+ TQToolButton* clearButton;
};
-RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, QWidget* parent, const char* name) :
- QHBox(parent, name),
+RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, TQWidget* tqparent, const char* name) :
+ TQHBox(tqparent, name),
d(new RegisterSearchLineWidgetPrivate)
{
d->reg = reg;
setSpacing(5);
- QTimer::singleShot(0, this, SLOT(createWidgets()));
+ TQTimer::singleShot(0, this, TQT_SLOT(createWidgets()));
}
RegisterSearchLineWidget::~RegisterSearchLineWidget()
@@ -275,14 +275,14 @@ RegisterSearchLine* RegisterSearchLineWidget::createSearchLine(Register* reg)
void RegisterSearchLineWidget::createWidgets(void)
{
if(!d->clearButton) {
- d->clearButton = new QToolButton(this);
- QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
+ d->clearButton = new TQToolButton(this);
+ TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
d->clearButton->setIconSet(icon);
}
d->clearButton->show();
- QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget");
d->searchLine = createSearchLine(d->reg);
d->searchLine->show();
@@ -290,7 +290,7 @@ void RegisterSearchLineWidget::createWidgets(void)
label->setBuddy(d->searchLine);
label->show();
- connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(reset()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(reset()));
}
RegisterSearchLine* RegisterSearchLineWidget::searchLine(void) const