summaryrefslogtreecommitdiffstats
path: root/kaudiocreator/jobqueimp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kaudiocreator/jobqueimp.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaudiocreator/jobqueimp.cpp')
-rw-r--r--kaudiocreator/jobqueimp.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kaudiocreator/jobqueimp.cpp b/kaudiocreator/jobqueimp.cpp
index 81c0431d..fc580a29 100644
--- a/kaudiocreator/jobqueimp.cpp
+++ b/kaudiocreator/jobqueimp.cpp
@@ -46,11 +46,11 @@
/**
* Constructor, set up signals.
- * @param parent - parent widget
+ * @param tqparent - tqparent widget
* @param name - widget name
*/
-JobQueImp::JobQueImp( TQWidget* parent, const char* name) :
- JobQue(parent,name),highestNumber(DEFAULT_HIGHEST_NUMBER), currentId(0){
+JobQueImp::JobQueImp( TQWidget* tqparent, const char* name) :
+ JobQue(tqparent,name),highestNumber(DEFAULT_HIGHEST_NUMBER), currentId(0){
connect(removeSelected,TQT_SIGNAL(clicked()), this, TQT_SLOT( removeSelectedJob()));
connect(removeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeAllJobs()));
connect(removeDoneJobs, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearDoneJobs()));
@@ -64,7 +64,7 @@ JobQueImp::JobQueImp( TQWidget* parent, const char* name) :
*/
TQString JobQueImp::getStringFromNumber(int number){
if(number > highestNumber){
- int diff = TQString("%1").arg(number).length() - TQString("%1").arg(highestNumber).length();
+ int diff = TQString("%1").tqarg(number).length() - TQString("%1").tqarg(highestNumber).length();
highestNumber = number;
if(diff > 0){
// We have to update all of the cells.
@@ -77,7 +77,7 @@ TQString JobQueImp::getStringFromNumber(int number){
}
TQString buffer = "";
- uint newLength = TQString("%1").arg(highestNumber).length() - TQString("%1").arg(number).length();
+ uint newLength = TQString("%1").tqarg(highestNumber).length() - TQString("%1").tqarg(number).length();
for(uint i=0; i < newLength; i++)
buffer += "0";
return buffer;
@@ -92,9 +92,9 @@ void JobQueImp::addJob(Job*job, const TQString &name ){
if(!job)
return;
job->id = ++currentId;
- QueListViewItem *currentItem = new QueListViewItem(todoQue, TQString("%1%2").arg(getStringFromNumber(currentId)).arg(currentId), "0", name);
+ QueListViewItem *currentItem = new QueListViewItem(todoQue, TQString("%1%2").tqarg(getStringFromNumber(currentId)).tqarg(currentId), "0", name);
currentItem->setPixmap(ICON_LOC, SmallIcon("player_pause", currentItem->height()-2));
- queLabel->setText(i18n("Number of jobs in the queue: %1").arg(todoQue->childCount()));
+ queLabel->setText(i18n("Number of jobs in the queue: %1").tqarg(todoQue->childCount()));
}
/**
@@ -106,7 +106,7 @@ void JobQueImp::updateProgress(int id, int progress){
int currentJobCount = numberOfJobsNotFinished();
QueListViewItem * currentItem = (QueListViewItem*)todoQue->firstChild();
TQString buffer = getStringFromNumber(id);
- buffer += TQString("%1").arg(id);
+ buffer += TQString("%1").tqarg(id);
// Find the current item
while( currentItem != NULL ){
@@ -124,7 +124,7 @@ void JobQueImp::updateProgress(int id, int progress){
return;
currentItem->percentDone = progress;
- currentItem->repaint();
+ currentItem->tqrepaint();
// Update the icon if needed
if(progress > 0 && progress < 100 && !currentItem->progressing ){
@@ -158,7 +158,7 @@ bool JobQueImp::removeJob(QueListViewItem *item, bool kill, bool prompt){
if(!item)
return false;
- if(item->percentDone < 100 && item->percentDone > -1 && (prompt && KMessageBox::questionYesNo(this, i18n("KAudioCreator has not finished %1. Remove anyway?").arg(item->text(HEADER_DESCRIPTION)), i18n("Unfinished Job in Queue"), KStdGuiItem::del(), i18n("Keep"))
+ if(item->percentDone < 100 && item->percentDone > -1 && (prompt && KMessageBox::questionYesNo(this, i18n("KAudioCreator has not finished %1. Remove anyway?").tqarg(item->text(HEADER_DESCRIPTION)), i18n("Unfinished Job in Queue"), KStdGuiItem::del(), i18n("Keep"))
== KMessageBox::No ))
return false;
@@ -180,7 +180,7 @@ bool JobQueImp::removeJob(QueListViewItem *item, bool kill, bool prompt){
currentId = 0;
}
else
- queLabel->setText(i18n("Number of jobs in the queue: %1").arg(todoQue->childCount()));
+ queLabel->setText(i18n("Number of jobs in the queue: %1").tqarg(todoQue->childCount()));
return true;
}
@@ -248,7 +248,7 @@ void JobQueImp::clearDoneJobs(){
currentId = 0;
}
else
- queLabel->setText(i18n("Number of jobs in the queue: %1").arg(todoQue->childCount()));
+ queLabel->setText(i18n("Number of jobs in the queue: %1").tqarg(todoQue->childCount()));
}
/**
@@ -270,7 +270,7 @@ int JobQueImp::numberOfJobsNotFinished(){
}
/**
- * The repaint function overloaded so that we can have a built in progressbar.
+ * The tqrepaint function overloaded so that we can have a built in progressbar.
*/
void QueListViewItem::paintCell (TQPainter * p,const TQColorGroup &cg,int column,
int width,int align){
@@ -303,7 +303,7 @@ void QueListViewItem::paintCell (TQPainter * p,const TQColorGroup &cg,int column
/**
* Header for built in treelist item so we can have a progress bar in them.
*/
-QueListViewItem::QueListViewItem(TQListView *parent, const TQString id, const TQString p , const TQString name, const TQString d, const TQString e) : TQListViewItem(parent, id, p, name,d,e), percentDone(0), progressing(false) {
+QueListViewItem::QueListViewItem(TQListView *tqparent, const TQString id, const TQString p , const TQString name, const TQString d, const TQString e) : TQListViewItem(tqparent, id, p, name,d,e), percentDone(0), progressing(false) {
}
#include "jobqueimp.moc"