summaryrefslogtreecommitdiff
path: root/client/launcherwindow.cc
diff options
context:
space:
mode:
authorsenator <senator>2010-10-12 12:18:26 +0000
committersenator <senator>2010-10-12 12:18:26 +0000
commit159d4a25168090718d30965f8ab3d9eadb701c46 (patch)
tree8da6c8bc0f0f3e3e91fddaa201770f8ca72e1115 /client/launcherwindow.cc
parent9ba471ac654ff18178723ef0a84c46a03fa20b6f (diff)
added template functionality, not done but i need to continue work on a windows pc so i will commit anyways
Diffstat (limited to 'client/launcherwindow.cc')
-rw-r--r--client/launcherwindow.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/client/launcherwindow.cc b/client/launcherwindow.cc
index d2d5436..cea9b72 100644
--- a/client/launcherwindow.cc
+++ b/client/launcherwindow.cc
@@ -31,7 +31,7 @@
#include <QPushButton>
#include "launcherwindow.h"
-LauncherWindow::LauncherWindow(QWidget *parent)
+LauncherWindow::LauncherWindow(QString cpr, QString templ, QWidget *parent)
: QDialog(parent)
{
setWindowTitle("Pracro Starter");
@@ -52,16 +52,23 @@ LauncherWindow::LauncherWindow(QWidget *parent)
cprLineEdit = new QLineEdit();
cprLineEdit->setValidator(new QRegExpValidator(QRegExp("^[0-9]{10,10}$"), this));
+ QLabel *templatesLabel = new QLabel("Template:");
+ templates = new QComboBox();
+ templates->addItem("Refraktiv kirurgi: Forundersøgelse",
+ "ref_forunders");
+ templates->addItem("Refraktiv kirurgi: Førstedagskontrol",
+ "ref_foerstedagskontrol");
+ templates->addItem("Refraktiv kirurgi: Efterkontrol",
+ "ref_efterkontrol");
+
QPushButton *ok = new QPushButton("Ok");
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
QPushButton *cancel = new QPushButton("Annuller");
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
QGridLayout *layout = new QGridLayout();
- /*
- layout->addWidget(userLabel, 1, 1);
- layout->addWidget(user, 1, 2, 1, 2);
- */
+ layout->addWidget(templatesLabel, 1, 1);
+ layout->addWidget(templates, 1, 2, 1, 2);
layout->addWidget(cprLabel, 2, 1);
layout->addWidget(cprLineEdit, 2, 2, 1, 2);
layout->addWidget(ok, 3, 2);
@@ -74,7 +81,12 @@ LauncherWindow::~LauncherWindow()
{
}
-QString LauncherWindow::cpr()
+QString LauncherWindow::getCpr()
{
return cprLineEdit->text();
}
+
+QString LauncherWindow::getTemplate()
+{
+ return templates->itemData(currentIndex());
+}