diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/launcherwindow.cc | 8 | ||||
-rw-r--r-- | client/launcherwindow.h | 3 |
2 files changed, 10 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(); +} diff --git a/client/launcherwindow.h b/client/launcherwindow.h index fc7670f..234a016 100644 --- a/client/launcherwindow.h +++ b/client/launcherwindow.h @@ -42,6 +42,9 @@ public: QString getCpr(); QString getTemplate(); +private slots: + void focusCpr(int); + private: QLineEdit *cprLineEdit; QComboBox *templates; |