diff options
author | deva <deva> | 2005-05-23 19:30:36 +0000 |
---|---|---|
committer | deva <deva> | 2005-05-23 19:30:36 +0000 |
commit | 764d85a9a398cb37e7b5c3eb2e4e5bfc9ff26cd3 (patch) | |
tree | b61dc339d4161d5b67273357f30aaddb8117cfc5 /src | |
parent | 6afe92e834bebe7fa3cbc441444652f917419df6 (diff) |
Made some cleanup in the status bar.
Diffstat (limited to 'src')
-rw-r--r-- | src/cprquerydialog.cc | 11 | ||||
-rw-r--r-- | src/mainwindow.cc | 14 | ||||
-rw-r--r-- | src/mainwindow.h | 6 |
3 files changed, 23 insertions, 8 deletions
diff --git a/src/cprquerydialog.cc b/src/cprquerydialog.cc index 0da4101..c683cf4 100644 --- a/src/cprquerydialog.cc +++ b/src/cprquerydialog.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.12 2005/05/23 19:30:36 deva + * Made some cleanup in the status bar. + * * Revision 1.11 2005/05/23 18:08:02 deva * Name is now overwritten if non-valid cpr is used. * @@ -366,7 +369,7 @@ void CPRQueryDialog::cprSocket_error(int errnum) break; } - if(statusbar) statusbar->message(msg); + if(statusbar) statusbar->message(msg, 5000); MessageBox(this, "Fejl", msg, TYPE_OK, ICON_ERROR).exec(); accept(); } @@ -387,7 +390,7 @@ void CPRQueryDialog::cprSocket_readyRead() if (!cprSocket->canReadLine()) return; QString msg = QString("Recieving name from cpr database..."); - if(statusbar) statusbar->message(msg); + if(statusbar) statusbar->message(msg, 5000); timer->stop(); while(cprSocket->canReadLine()) { @@ -428,7 +431,7 @@ void CPRQueryDialog::cprSocket_readyRead() void CPRQueryDialog::cprSocket_connected() { QString msg = QString("Connected to cpr database, sending cpr number..."); - if(statusbar) statusbar->message(msg); + if(statusbar) statusbar->message(msg, 5000); timer->stop(); cprSocket->writeBlock(internalCpr, 10); @@ -466,7 +469,7 @@ void CPRQueryDialog::cprSocket_timeout() break; } - if(statusbar) statusbar->message(msg); + if(statusbar) statusbar->message(msg, 5000); MessageBox(this, "Fejl", msg, TYPE_OK, ICON_ERROR).exec(); accept(); } diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 496817b..4acf391 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.27 2005/05/23 19:30:36 deva + * Made some cleanup in the status bar. + * * Revision 1.26 2005/05/16 16:00:56 deva * * Lots of stuff! @@ -263,8 +266,12 @@ void MainWindow::createGui() status->setSizeGripEnabled(FALSE); g0->addMultiCellWidget(status, 4, 4, 0, 1); + lbl_recordtime = createLabel("", 18, 1); + lbl_recordtime->setFixedWidth(265); + status->addWidget(lbl_recordtime, 0, TRUE); + lbl_version = createLabel("MIaV-Grab v" VERSION, 18, 1); - lbl_version->setFixedWidth(300); + lbl_version->setFixedWidth(265); status->addWidget(lbl_version, 0, TRUE); status->message( TXT_READY ); @@ -296,8 +303,8 @@ void MainWindow::taskbar_update() char msg[256]; int l = camera->getQueueLength(); - sprintf(msg, "Recording time: %d:%d:%d - Queue length: %d", h, m, s, l); - message(msg); + sprintf(msg, TXT_TIME " %.02d:%.02d:%.02d " TXT_QUEUELENGTH " %d", h, m, s, l); + lbl_recordtime->setText(msg); } #define GREY 160 @@ -329,7 +336,6 @@ QLabel *MainWindow::createLabel(char *caption, int width, int height) void MainWindow::message(char *msg) { - // lbl_status->setText(msg); status->message(msg); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 4f0d2d2..1348b5f 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.14 2005/05/23 19:30:36 deva + * Made some cleanup in the status bar. + * * Revision 1.13 2005/05/16 16:00:57 deva * * Lots of stuff! @@ -88,6 +91,8 @@ using namespace std; #define TXT_STOP_RECORDING_TITLE "Stop optagelsen" #define TXT_STOP_RECORDING "Optagelsen skal standses, inden et nyt cpr nummer kan indtastes.\n\ Optagelsen standses ved tryk på den røde cirkel med gul streg over." +#define TXT_TIME "Tid:" +#define TXT_QUEUELENGTH "Buffer størelse:" /** * Images @@ -141,6 +146,7 @@ private: QLabel *lbl_version; QLabel *lbl_cpr; QLabel *lbl_name; + QLabel *lbl_recordtime; QTimer *taskbartimer; |