aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/transferd.cpp
blob: c5a0a156b7e0fd9e79917239e9fa540be991b893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28


int totaltransactions = sel.length();
QList<TransactionInfo> transaction;
for(int i=0;i<sel.length();i++){
    QStringList info;
    info << sel[i] << sel[i].size() << false;
    totalsize = totalsize + sel[i].size();
}
bool paused = false;
for(int i=0; i<transaction.length(); i++){

while(paused = 1 ){
  pausetimer = new QTimer(this);
  pausetimer->start(5000);
}
QElapsedTimer timer;
timer.start();
//copy/move file
timer.elapsed(); // "milliseconds"
transferTime = transferTime + timer.elapsed()
transaction[i].value(2) = true;
currentTransfered++;
currentTransferedSize = currentTransferedSize + transaction[i].value(1);
//calculate transfer data rate from transferTime and currentTransferedSize
avgTransferRate = ( currentTransferedSize / (transferTime * 1000) )
//can do estimates on potential time?
}
bgstack15