diff --git a/retroshare-gui/src/gui/Preferences/ServerDialog.ui b/retroshare-gui/src/gui/Preferences/ServerDialog.ui index ea5febb75..ffeec6874 100644 --- a/retroshare-gui/src/gui/Preferences/ServerDialog.ui +++ b/retroshare-gui/src/gui/Preferences/ServerDialog.ui @@ -5,8 +5,8 @@ 0 0 - 416 - 345 + 459 + 409 @@ -498,376 +498,259 @@ Qt::NoContextMenu - - - - 0 - 270 - 411 - 71 - - - - Transfer Rates - - - - - 10 - 20 - 170 - 23 - - - - - 6 + + + + + Network Address Configuration (takes effect after restart) - - 0 - - - 0 - - - 0 - - - 0 - - - - - Total Rate (KB/s) - - - - - - - 1 - - - 4096 - - - 1 - - - - - - - - - 200 - 20 - 170 - 23 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Per Person - - - - - - - 1 - - - 1024 - - - 1 - - - - - - - - - - 0 - 40 - 411 - 41 - - - - External Visibility / Discovery Configuration - - - - - 30 - 10 - 161 - 22 - - - - - DHT Enabled - - - - - DHT Disabled - - - - - - - 220 - 10 - 161 - 22 - - - - - Discovery Enabled - - - - - Discovery Disabled - - - - - - - - 0 - 0 - 411 - 41 - - - - Network Address Configuration (takes effect after restart) - - - - - 30 - 10 - 351 - 22 - - - - - Automatic (Firewalled) - - - - - Firewalled + No UPnP - - - - - External (Forwarded) Port - - - - - - - - 0 - 80 - 411 - 191 - - - - Server Status And Network Settings - - - - - 93 - 20 - 291 - 152 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - - - 0 - - - 65535 - - - 7812 - - - - - + + + + - Port: + Automatic (Firewalled) - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - - - 0 - - - 65535 - - - 7812 - - - - - + + - Port: + Firewalled + No UPnP - - - - - - - - - - 10 - 150 - 91 - 21 - - - - External Address - - - - - - 10 - 30 - 80 - 21 - - - - Network Status - - - - - - 10 - 130 - 81 - 21 - - - - Local Address - - - + + + + External (Forwarded) Port + + + + + + + + + + + External Visibility / Discovery Configuration + + + + + + + DHT Enabled + + + + + DHT Disabled + + + + + + + + + Discovery Enabled + + + + + Discovery Disabled + + + + + + + + + + + Server Status And Network Settings + + + + + + + + + + Network Status + + + + + + + + + + + + + + + + Local Address + + + + + + + External Address + + + + + + + + + + + + + + Port: + + + + + + + 0 + + + 65535 + + + 7812 + + + + + + + + + + Port: + + + + + + + 0 + + + 65535 + + + 7812 + + + + + + + + + + + + + + + + Transfer Rates + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Total Rate (KB/s) + + + + + + + 1 + + + 4096 + + + 1 + + + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Per Person + + + + + + + 1 + + + 1024 + + + 1 + + + + + + + + + localAddress diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index b6e070f25..63fdff9c7 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -203,11 +203,37 @@ int TransfersDialog::addItem(QString symbol, QString name, QString coreID, qlong return row; } + +int TransfersDialog::addUploadItem(QString symbol, QString name, QString coreID, qlonglong fileSize, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining) +{ + int row; + QString sl; + //QIcon icon(symbol); + name.insert(0, " "); + row = ULListModel->rowCount(); + ULListModel->insertRow(row); + + ULListModel->setData(ULListModel->index(row, UNAME), QVariant((QString)name), Qt::DisplayRole); + ULListModel->setData(ULListModel->index(row, USIZE), QVariant((qlonglong)fileSize)); + ULListModel->setData(ULListModel->index(row, USERNAME), QVariant((QString)sources)); + ULListModel->setData(ULListModel->index(row, UPROGRESS), QVariant((double)progress)); + ULListModel->setData(ULListModel->index(row, ULSPEED), QVariant((double)dlspeed)); + ULListModel->setData(ULListModel->index(row, USTATUS), QVariant((QString)status)); + ULListModel->setData(ULListModel->index(row, UTRANSFERRED), QVariant((qlonglong)remaining)); + + return row; +} + void TransfersDialog::delItem(int row) { DLListModel->removeRow(row, QModelIndex()); } +void TransfersDialog::delUploadItem(int row) +{ + ULListModel->removeRow(row, QModelIndex()); +} + void TransfersDialog::editItem(int row, int column, QVariant data) { //QIcon *icon; @@ -259,6 +285,11 @@ void TransfersDialog::insertTransfers() { delItem(i); } + + for(int i = ULListModel->rowCount(); i >= 0; i--) + { + delUploadItem(i); + } //nun aktuelle DownloadListe hinzufügen @@ -309,8 +340,17 @@ void TransfersDialog::insertTransfers() completed = it->transfered; progress = it->transfered * 100.0 / it->size; remaining = (it->size - it->transfered) / (it->tfRate * 1024.0); - - addItem(symbol, name, coreId, fileSize, progress, dlspeed, sources, status, completed, remaining); + + if (it->download) + { + addItem(symbol, name, coreId, fileSize, progress, + dlspeed, sources, status, completed, remaining); + } + else + { + addUploadItem(symbol, name, coreId, fileSize, progress, + dlspeed, sources, status, completed, remaining); + } } rsiface->unlockData(); /* UnLock Interface */ diff --git a/retroshare-gui/src/gui/TransfersDialog.h b/retroshare-gui/src/gui/TransfersDialog.h index 055dfc315..a1718f430 100644 --- a/retroshare-gui/src/gui/TransfersDialog.h +++ b/retroshare-gui/src/gui/TransfersDialog.h @@ -97,6 +97,10 @@ private: public slots: int addItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining); void delItem(int row); + + int addUploadItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining); + void delUploadItem(int row); + void editItem(int row, int column, QVariant data); void updateProgress(int value);