-fixed statusPeers output string to the correct place to out2

-redesigned the outputs for statusbar

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@603 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-06-14 21:37:46 +00:00
parent 34f6bd812a
commit d5c21b5b4a

View File

@ -258,9 +258,10 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
#endif
//statusBar()->addWidget(new QLabel(tr("Users: 0 Files: 0 ")));
statusBar()->addPermanentWidget(statusRates = new QLabel(tr("Down: 0.0 Up: 0.0 ")));
statusBar()->addPermanentWidget(statusPeers = new QLabel(tr("Connections: 0/0/0 ")));
statusBar()->addWidget(statusPeers = new QLabel(tr("Online: 0 |Friends: 0|Network: 0")));
//statusPeers->setPixmap(QPixmap::QPixmap(":/images/.png"));
statusBar()->addPermanentWidget(statusRates = new QLabel(tr("Down: 0.0 | Up: 0.0 ")));
//statusBar()->addPermanentWidget(statusPeers = new QLabel(tr("Online: 0 |Friends: 0|Network: 0")));
//servicegrp->actions()[0]->setChecked(true);
@ -324,7 +325,7 @@ void MainWindow::updateStatus()
rsicontrol -> ConfigGetDataRates(downKb, upKb);
std::ostringstream out;
out << "Down: " << std::setprecision(2) << std::fixed << downKb << " (kB/s)| Up: " << std::setprecision(2) << std::fixed << upKb << " (kB/s) ";
out << "Down: " << std::setprecision(2) << std::fixed << downKb << " (kB/s) | Up: " << std::setprecision(2) << std::fixed << upKb << " (kB/s) ";
std::list<std::string> ids;
rsPeers->getOnlineList(ids);
@ -339,7 +340,7 @@ void MainWindow::updateStatus()
int others = 1 + ids.size();
std::ostringstream out2;
out << "Online/Friends/Network: " << online << "/" << friends << "/" << others << " ";
out2 << "Online: " << online << "| Friends: " << friends << "| Network: " << others << " ";
/* set uploads/download rates */