diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/statusbar.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/statusbar.cpp')
-rw-r--r-- | src/statusbar.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/statusbar.cpp b/src/statusbar.cpp index a21baca..2e8ef67 100644 --- a/src/statusbar.cpp +++ b/src/statusbar.cpp @@ -22,49 +22,49 @@ #include <kpushbutton.h> #include <kiconloader.h> -#include <qobjectlist.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqobjectlist.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqtimer.h> +#include <tqtooltip.h> using Tellico::StatusBar; StatusBar* StatusBar::s_self = 0; -StatusBar::StatusBar(QWidget* parent_) : KStatusBar(parent_) { +StatusBar::StatusBar(TQWidget* tqparent_) : KStatusBar(tqparent_) { s_self = this; // don't care about text and id - m_mainLabel = new KStatusBarLabel(QString(), 0, this); + m_mainLabel = new KStatusBarLabel(TQString(), 0, this); m_mainLabel->setIndent(4); - m_mainLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + m_mainLabel->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); addWidget(m_mainLabel, 3 /*stretch*/, true /*permanent*/); - m_countLabel = new KStatusBarLabel(QString(), 1, this); - m_countLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + m_countLabel = new KStatusBarLabel(TQString(), 1, this); + m_countLabel->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); m_countLabel->setIndent(4); addWidget(m_countLabel, 0, true); m_progress = new GUI::Progress(100, this); addWidget(m_progress, 1, true); - m_cancelButton = new KPushButton(SmallIcon(QString::fromLatin1("cancel")), QString::null, this); - QToolTip::add(m_cancelButton, i18n("Cancel")); + m_cancelButton = new KPushButton(SmallIcon(TQString::tqfromLatin1("cancel")), TQString(), this); + TQToolTip::add(m_cancelButton, i18n("Cancel")); addWidget(m_cancelButton, 0, true); m_progress->hide(); m_cancelButton->hide(); ProgressManager* pm = ProgressManager::self(); - connect(pm, SIGNAL(signalTotalProgress(uint)), SLOT(slotProgress(uint))); - connect(m_cancelButton, SIGNAL(clicked()), pm, SLOT(slotCancelAll())); + connect(pm, TQT_SIGNAL(signalTotalProgress(uint)), TQT_SLOT(slotProgress(uint))); + connect(m_cancelButton, TQT_SIGNAL(clicked()), pm, TQT_SLOT(slotCancelAll())); } void StatusBar::polish() { KStatusBar::polish(); int h = 0; - QObjectList* list = queryList("QWidget", 0, false, false); - for(QObject* o = list->first(); o; o = list->next()) { - int _h = static_cast<QWidget*>(o)->minimumSizeHint().height(); + TQObjectList* list = queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false); + for(TQObject* o = list->first(); o; o = list->next()) { + int _h = TQT_TQWIDGET(o)->tqminimumSizeHint().height(); if(_h > h) { h = _h; } @@ -72,23 +72,23 @@ void StatusBar::polish() { h -= 4; // hint from amarok, it's too big usually - for(QObject* o = list->first(); o; o = list->next()) { - static_cast<QWidget*>(o)->setFixedHeight(h); + for(TQObject* o = list->first(); o; o = list->next()) { + TQT_TQWIDGET(o)->setFixedHeight(h); } delete list; } -void StatusBar::clearStatus() { - setStatus(i18n("Ready.")); +void StatusBar::cleartqStatus() { + settqStatus(i18n("Ready.")); } -void StatusBar::setStatus(const QString& status_) { +void StatusBar::settqStatus(const TQString& status_) { // always add a space for asthetics m_mainLabel->setText(status_ + ' '); } -void StatusBar::setCount(const QString& count_) { +void StatusBar::setCount(const TQString& count_) { m_countLabel->setText(count_ + ' '); } @@ -110,10 +110,10 @@ void StatusBar::slotUpdate() { /* myDebug() << "StatusBar::slotUpdate() - " << m_progress->isShown() << endl; if(m_progressBox->isEmpty()) { - QTimer::singleShot(0, m_progress, SLOT(hide())); + TQTimer::singleShot(0, m_progress, TQT_SLOT(hide())); // m_progressBox->hide(); } else { - QTimer::singleShot(0, m_progress, SLOT(show())); + TQTimer::singleShot(0, m_progress, TQT_SLOT(show())); // m_progressBox->show(); } */ |