diff options
author | Weblate <noreply@weblate.org> | 2018-01-02 20:53:45 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2018-01-02 20:53:45 +0000 |
commit | 42e4f35c9a2ea2689b62ef8c5461b14a2b820e4f (patch) | |
tree | a92f81f73b37b7de76cc5238f1ec393ae5a18ecd /src-qt5/desktop-utils/lumina-fm/transferd.cpp | |
parent | Translated using Weblate (Dutch) (diff) | |
parent | Updated project files for plugin system (diff) | |
download | lumina-42e4f35c9a2ea2689b62ef8c5461b14a2b820e4f.tar.gz lumina-42e4f35c9a2ea2689b62ef8c5461b14a2b820e4f.tar.bz2 lumina-42e4f35c9a2ea2689b62ef8c5461b14a2b820e4f.zip |
Merge remote-tracking branch 'origin/master'
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? +} |