aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp1
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.ui12
-rw-r--r--src-qt5/desktop-utils/lumina-fm/transferd.cpp28
-rw-r--r--src-qt5/desktop-utils/lumina-fm/transferd.h13
4 files changed, 53 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index 28bfa20b..8455e3aa 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -118,6 +118,7 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize();
connect(TRAY, SIGNAL(JobsFinished()), this, SLOT(TrayJobsFinished()) );
if(DEBUG){ qDebug() << " - Done with init"; }
ui->actionOpen_as_Root->setVisible(LUtils::isValidBinary("qsudo"));
+ ui->transferTreeView->setVisible(false);
}
MainUI::~MainUI(){
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui
index a15f91c9..5f067786 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui
@@ -69,7 +69,7 @@
<x>0</x>
<y>0</y>
<width>567</width>
- <height>359</height>
+ <height>161</height>
</rect>
</property>
<layout class="QHBoxLayout" name="BrowserLayout">
@@ -98,6 +98,16 @@
<widget class="QWidget" name="page_image"/>
</widget>
</item>
+ <item>
+ <widget class="QTreeView" name="transferTreeView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
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?
+}
diff --git a/src-qt5/desktop-utils/lumina-fm/transferd.h b/src-qt5/desktop-utils/lumina-fm/transferd.h
new file mode 100644
index 00000000..291541e8
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm/transferd.h
@@ -0,0 +1,13 @@
+class transactionInfo{
+public:
+ QString filepath;
+ qint64 filesize;
+ Bool finished;
+};
+
+
+QStringList sel;
+int totaltransactions currentTransfered;
+qint64 totalsize, currentTransferedSize, transferTime, avgTransferRate;
+bool paused;
+QElapsedTimer timer;
bgstack15