summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cprquerydialog.cc38
-rw-r--r--src/cprquerydialog.h2
2 files changed, 20 insertions, 20 deletions
diff --git a/src/cprquerydialog.cc b/src/cprquerydialog.cc
index d5d3c44..23f508c 100644
--- a/src/cprquerydialog.cc
+++ b/src/cprquerydialog.cc
@@ -53,7 +53,6 @@ CPRQueryDialog::CPRQueryDialog(QLabel *lcpr,
cprSocket = new QSocket(this);
connect(cprSocket, SIGNAL(readyRead()), SLOT(cprSocket_readyRead()));
connect(cprSocket, SIGNAL(connected()), SLOT(cprSocket_connected()));
- ccw = new MessageBox(this, "Confirm", "Ugyldigt CPR nummer, brug det alligevel?", TYPE_YES_NO_CANCEL);
/*
// connect(btn_cpr, SIGNAL(clicked()), SLOT(bcancel_clicked()));
@@ -67,25 +66,28 @@ CPRQueryDialog::CPRQueryDialog(QLabel *lcpr,
// Generate input buttons
//digits = pos;
+ QHBoxLayout *bl = new QHBoxLayout(this);
+ /*
QFrame *topf = new QFrame(this);
topf->setFrameStyle(QFrame::Box | QFrame::Raised);
topf->setLineWidth(3);
- QHBoxLayout *bl = new QHBoxLayout(this);
bl->addWidget(topf);
-
- QGridLayout *gl = new QGridLayout(topf, 4, 3, 10, 2);
- QButton *b1 = createButton(topf, "1", 1);
- QButton *b2 = createButton(topf, "2", 2);
- QButton *b3 = createButton(topf, "3", 3);
- QButton *b4 = createButton(topf, "4", 4);
- QButton *b5 = createButton(topf, "5", 5);
- QButton *b6 = createButton(topf, "6", 6);
- QButton *b7 = createButton(topf, "7", 7);
- QButton *b8 = createButton(topf, "8", 8);
- QButton *b9 = createButton(topf, "9", 9);
- QButton *b0 = createButton(topf, "0", 0);
- QButton *bbs = createButton(topf, "<-", 10);
- QButton *bca = createButton(topf, "CA", 11);
+ */
+ QGridLayout *gl = new QGridLayout(this, 4, 3, 10, 2);
+ bl->addLayout(gl);
+
+ QButton *b1 = createButton(this, "1", 1);
+ QButton *b2 = createButton(this, "2", 2);
+ QButton *b3 = createButton(this, "3", 3);
+ QButton *b4 = createButton(this, "4", 4);
+ QButton *b5 = createButton(this, "5", 5);
+ QButton *b6 = createButton(this, "6", 6);
+ QButton *b7 = createButton(this, "7", 7);
+ QButton *b8 = createButton(this, "8", 8);
+ QButton *b9 = createButton(this, "9", 9);
+ QButton *b0 = createButton(this, "0", 0);
+ QButton *bbs = createButton(this, "<-", 10);
+ QButton *bca = createButton(this, "CA", 11);
gl->addWidget(b1, 0,0);
gl->addWidget(b2, 0,1);
@@ -120,7 +122,6 @@ CPRQueryDialog::CPRQueryDialog(QLabel *lcpr,
CPRQueryDialog::~CPRQueryDialog()
{
- delete ccw;
}
QPushButton *CPRQueryDialog::createButton(QWidget *parent, const char *text, int value)
@@ -255,7 +256,8 @@ void CPRQueryDialog::verifycpr(char *cpr)
internalCpr[10] = 0;
if (!(test_cpr(internalCpr))) {
- switch(ccw->exec()) {
+ MessageBox ccw(this, "Bekræft", "Ugyldigt CPR nummer, brug det alligevel?", TYPE_YES_NO_CANCEL);
+ switch(ccw.exec()) {
case MSG_CANCEL:
bedit_clicked();
break;
diff --git a/src/cprquerydialog.h b/src/cprquerydialog.h
index 56f800c..303d69a 100644
--- a/src/cprquerydialog.h
+++ b/src/cprquerydialog.h
@@ -92,8 +92,6 @@ private:
QLabel *lbl_cpr;
QLabel *lbl_name;
- MessageBox *ccw;
-
QSocket *cprSocket;
char cpr[12];
char internalCpr[11];