diff options
author | q5sys <jt@xsystems.com> | 2017-12-13 15:23:22 -0500 |
---|---|---|
committer | q5sys <jt@xsystems.com> | 2017-12-13 15:23:22 -0500 |
commit | 03cf431990803e19142f23b55826278ea13e15e6 (patch) | |
tree | a964b84903d7ffae23a07767b72cd7bd3d454340 /src-qt5/desktop-utils/lumina-fm/transferd.cpp | |
parent | Merge branch 'master' of http://github.com/trueos/lumina (diff) | |
download | lumina-03cf431990803e19142f23b55826278ea13e15e6.tar.gz lumina-03cf431990803e19142f23b55826278ea13e15e6.tar.bz2 lumina-03cf431990803e19142f23b55826278ea13e15e6.zip |
add skeleton for file transfer dialog
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/transferd.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/transferd.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/transferd.cpp b/src-qt5/desktop-utils/lumina-fm/transferd.cpp new file mode 100644 index 00000000..c5a0a156 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/transferd.cpp @@ -0,0 +1,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? +} |