diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/global/progress_monitor.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/global/progress_monitor.cpp')
-rw-r--r-- | src/common/global/progress_monitor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/global/progress_monitor.cpp b/src/common/global/progress_monitor.cpp index fcd0cec..f86d236 100644 --- a/src/common/global/progress_monitor.cpp +++ b/src/common/global/progress_monitor.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "progress_monitor.h" -ProgressMonitor::ProgressMonitor(QObject* parent) - : QObject(parent, "progress_monitor") +ProgressMonitor::ProgressMonitor(TQObject* tqparent) + : TQObject(tqparent, "progress_monitor") { _current = _tasks.end(); } @@ -21,7 +21,7 @@ void ProgressMonitor::clear() emit showProgress(false); } -void ProgressMonitor::appendTask(const QString &label, uint nbSteps) +void ProgressMonitor::appendTask(const TQString &label, uint nbSteps) { Task task; task.label = label; @@ -30,7 +30,7 @@ void ProgressMonitor::appendTask(const QString &label, uint nbSteps) _tasks.append(task); } -void ProgressMonitor::insertTask(const QString &label, uint nbSteps) +void ProgressMonitor::insertTask(const TQString &label, uint nbSteps) { Task task; task.label = label; @@ -57,7 +57,7 @@ uint ProgressMonitor::nbDoneSteps() const void ProgressMonitor::update() { - QString label = (_current==_tasks.end() ? QString::null : (*_current).label); + TQString label = (_current==_tasks.end() ? TQString() : (*_current).label); emit setLabel(label); emit setTotalProgress(nbSteps()); emit setProgress(nbDoneSteps()); @@ -79,6 +79,6 @@ void ProgressMonitor::addTaskProgress(uint nbSteps) uint nb = (*_current).nbDoneSteps + nbSteps; Q_ASSERT( nb<=(*_current).nbSteps ); if ( nb>(*_current).nbSteps ) qDebug("%s %i+%i > %i", (*_current).label.latin1(), (*_current).nbDoneSteps, nbSteps, (*_current).nbSteps); - (*_current).nbDoneSteps = QMIN(nb, (*_current).nbSteps); + (*_current).nbDoneSteps = TQMIN(nb, (*_current).nbSteps); update(); } |