diff options
| author | senator <senator> | 2010-10-13 13:58:32 +0000 | 
|---|---|---|
| committer | senator <senator> | 2010-10-13 13:58:32 +0000 | 
| commit | 0a2bc3a119bd105d5f338faedc96962ee9395212 (patch) | |
| tree | a7f095098d07889af734ad3bcc93ab27011abf1b /client | |
| parent | dc10e3ed389989c93188a924ce4dbf81cdce0057 (diff) | |
added cpr lineedit focus functionality to ease use with keyboard
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; | 
