summaryrefslogtreecommitdiff
path: root/client/launcherwindow.cc
diff options
context:
space:
mode:
authorsenator <senator>2010-10-13 13:58:32 +0000
committersenator <senator>2010-10-13 13:58:32 +0000
commit0a2bc3a119bd105d5f338faedc96962ee9395212 (patch)
treea7f095098d07889af734ad3bcc93ab27011abf1b /client/launcherwindow.cc
parentdc10e3ed389989c93188a924ce4dbf81cdce0057 (diff)
added cpr lineedit focus functionality to ease use with keyboard
Diffstat (limited to 'client/launcherwindow.cc')
-rw-r--r--client/launcherwindow.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/launcherwindow.cc b/client/launcherwindow.cc
index e1c62eb..68f8e50 100644
--- a/client/launcherwindow.cc
+++ b/client/launcherwindow.cc
@@ -45,9 +45,9 @@ absolutePath() + "/templates.ini", QSettings::IniFormat);
QLabel *cprLabel = new QLabel(tr("Patient ID:"));
cprLineEdit = new QLineEdit();
cprLineEdit->setValidator(new QRegExpValidator(QRegExp("^[0-9]{10,10}$"), this));
-
QLabel *templatesLabel = new QLabel(tr("Template:"));
templates = new QComboBox();
+ connect(templates, SIGNAL(currentIndexChanged(int)), this, SLOT(focusCpr(int)));
QStringList groups = templateConfig.childGroups();
QStringList::iterator i = groups.begin();
while(i != groups.end()) {
@@ -93,6 +93,7 @@ absolutePath() + "/templates.ini", QSettings::IniFormat);
}
setLayout(layout);
+ cprLineEdit->setFocus();
}
LauncherWindow::~LauncherWindow()
@@ -108,3 +109,8 @@ QString LauncherWindow::getTemplate()
{
return templates->itemData(templates->currentIndex()).toString();
}
+
+void LauncherWindow::focusCpr(int)
+{
+ cprLineEdit->setFocus();
+}