diff options
Diffstat (limited to 'client/launcherwindow.cc')
-rw-r--r-- | client/launcherwindow.cc | 8 |
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(); +} |