diff options
author | deva <deva> | 2006-05-25 18:18:48 +0000 |
---|---|---|
committer | deva <deva> | 2006-05-25 18:18:48 +0000 |
commit | d86028ba3e6c0db3c1f56077f481b3bebf883d86 (patch) | |
tree | 4d53aa133d92b40f7de46ac07f9817111379166a /client/mainwindow.cc | |
parent | 7d547a29164cf9318a7eca918705bbc30e93b81d (diff) |
*** empty log message ***
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r-- | client/mainwindow.cc | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 0e7270d..a158c09 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -133,7 +133,22 @@ MainWindow::MainWindow(Decoder *d) // Create statusbar statusbar = new QStatusBar(this); outerlayout->addWidget(statusbar, 1,0, 1,1); - statusbar->showMessage("Ready!"); + + server_diskspace = new QProgressBar(statusbar); + server_diskspace->setRange(0, 100); + server_diskspace->setValue(0); + + server_load = new QProgressBar(statusbar); + server_load->setRange(0, 100); + server_load->setValue(0); + + messagefield = new QLabel(statusbar); + + statusbar->addWidget(messagefield, 80); + statusbar->addWidget(server_diskspace, 10); + statusbar->addWidget(server_load, 10); + + // statusbar->showMessage("Ready!"); startTimer(100); show(); @@ -163,7 +178,25 @@ void MainWindow::timerEvent(QTimerEvent *event) statusmsg.prepend(next); } - statusbar->showMessage(statusmsg); + messagefield->setText(statusmsg); + + if(s.server_diskspace_max != 0xffffffff) { + server_diskspace->setRange(0, s.server_diskspace_max); + server_diskspace->setValue(s.server_diskspace); + server_diskspace->setEnabled(true); + } else { + server_diskspace->setRange(0, 0); + server_diskspace->setEnabled(false); + } + + if(s.server_load_max != 0xffffffff) { + server_load->setRange(0, s.server_load_max); + server_load->setValue(s.server_load); + server_load->setEnabled(true); + } else { + server_load->setRange(0, 0); + server_load->setEnabled(false); + } } |