mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
-changend order of the columns
-set correct Alignment for each column git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@348 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3f582afe5a
commit
0234c5f5cf
@ -93,7 +93,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
||||
multi *= 1024.0;
|
||||
}
|
||||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, temp);
|
||||
painter->drawText(option.rect, Qt::AlignRight, temp);
|
||||
break;
|
||||
case UTRANSFERRED:
|
||||
transferred = index.data().toLongLong();
|
||||
@ -112,14 +112,14 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
||||
multi *= 1024.0;
|
||||
}
|
||||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, temp);
|
||||
painter->drawText(option.rect, Qt::AlignRight, temp);
|
||||
break;
|
||||
case ULSPEED:
|
||||
ulspeed = index.data().toDouble();
|
||||
temp.clear();
|
||||
temp.sprintf("%.2f", ulspeed/1024.);
|
||||
temp += " KB/s";
|
||||
painter->drawText(option.rect, Qt::AlignCenter, temp);
|
||||
painter->drawText(option.rect, Qt::AlignRight, temp);
|
||||
break;
|
||||
case UPROGRESS:
|
||||
progress = index.data().toDouble();
|
||||
@ -153,6 +153,9 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
||||
}
|
||||
painter->drawText(option.rect.translated(pixmap.size().width(), 0), Qt::AlignLeft, index.data().toString());
|
||||
break;
|
||||
case USTATUS:
|
||||
painter->drawText(option.rect.translated(pixmap.size().width(), 0), Qt::AlignLeft, index.data().toString());
|
||||
break;
|
||||
default:
|
||||
painter->drawText(option.rect, Qt::AlignCenter, index.data().toString());
|
||||
}
|
||||
|
@ -25,14 +25,13 @@
|
||||
#include <QAbstractItemDelegate>
|
||||
|
||||
// Defines for upload list list columns
|
||||
#define UNAME 0
|
||||
#define USERNAME 1
|
||||
#define USIZE 2
|
||||
#define UPROGRESS 3
|
||||
#define ULSPEED 4
|
||||
#define USERNAME 0
|
||||
#define UNAME 1
|
||||
#define ULSPEED 2
|
||||
#define UTRANSFERRED 3
|
||||
#define UPROGRESS 4
|
||||
#define USTATUS 5
|
||||
#define UTRANSFERRED 6
|
||||
|
||||
#define USIZE 6
|
||||
|
||||
|
||||
#define MAX_CHAR_TMP 128
|
||||
|
Loading…
Reference in New Issue
Block a user