summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cc42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 1fd7b4a..f7ba33d 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -27,6 +27,11 @@
*/
/*
* $Log$
+ * Revision 1.21 2005/05/02 18:47:21 deva
+ *
+ * Cpr now sent to decoder. And saved prioer to editing, in order to be able
+ * to disable editing session and revert to old cpr.
+ *
* Revision 1.20 2005/05/01 12:17:41 deva
* *** empty log message ***
*
@@ -56,6 +61,8 @@
#include <qbitmap.h>
#include <qimage.h>
#include <qlayout.h>
+#include <qgroupbox.h>
+
#include <qstatusbar.h>
#include <math.h>
@@ -172,8 +179,17 @@ void MainWindow::createGui()
QGridLayout *g0 = new QGridLayout(this, 2, 2, 0, -1);
QGridLayout *g1 = new QGridLayout(3, 4, -1);
g0->addLayout(g1, 0, 0);
- QGridLayout *g2 = new QGridLayout(1, NUM_HISTORY, -1);
- g0->addLayout(g2, 0, 1);
+
+ QGroupBox *gb = new QGroupBox(this);
+ // gb->setRows(NUM_HISTORY);
+ gb->setColumns(1);
+ // gb->setTitle("fisk");
+ // QGridLayout *g2 = new QGridLayout(1, NUM_HISTORY, -1);
+ // QVBoxLayout *g2 = new QVBoxLayout(this);
+ // g0->addLayout(g2, 0, 1);
+ gb->setInsideMargin(25);
+ gb->setFlat(true);
+ g0->addWidget(gb, 0, 1);
img_recedge = new QLabel(this);
img_recedge->setBackgroundColor(QColor(160,160,160));
@@ -217,10 +233,11 @@ void MainWindow::createGui()
// History widgets
for(int i = 0; i < NUM_HISTORY; i++) {
- img_history[i] = new QLabel(this);
+ img_history[i] = new QLabel(gb);
img_history[i]->setPixmap(*pix_dummy);
img_history[i]->setFixedSize(240,192);
- g2->addWidget(img_history[i], i, 0, Qt::AlignHCenter);
+ // g2->addWidget(img_history[i], i, 0, Qt::AlignHCenter & Qt::AlignVCenter);
+ // g2->addWidget(img_history[i]);
}
// Statusbar
@@ -270,18 +287,23 @@ void MainWindow::message(char *msg)
void MainWindow::cpr_clicked()
{
- {
- // TODO: Save CPR and name, from the labels.
- }
+ char oldcpr[256];
+ char oldname[256];
+
+ // Save CPR and name, from the labels.
+ strcpy(oldname, lbl_name->text().ascii());
+ strcpy(oldcpr, lbl_cpr->text().ascii());
// Create and call the CPRQueryDialog.
CPRQueryDialog dlg(lbl_cpr, lbl_name, this, TXT_CPRDLG_TITLE, status);
if(dlg.exec() == 0) {
- // TODO: Restore old CPR and name, in the labels.
+ // Restore old CPR and name, in the labels.
+ lbl_name->setText(oldname);
+ lbl_cpr->setText(oldcpr);
} else {
- // TODO: Change CPR camera.
- camera->setCpr("fisk");
+ // Change CPR camera.
+ camera->setCpr((char*)lbl_cpr->text().ascii());
}
}