diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-03 11:28:29 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-03 11:28:29 +0100 |
commit | 140d002d641d22d2dc9e9a1e7c234b747c979a16 (patch) | |
tree | 12c128340e3aab8d01b3edec67575e82fe971d3c /client | |
parent | f8e858a204bdcfc955ebcec20a78d7a41f6076f5 (diff) |
Added -n/--name parameter for displaying patient name in title bar of the mainwindow.
Diffstat (limited to 'client')
-rw-r--r-- | client/mainwindow.cc | 5 | ||||
-rw-r--r-- | client/pracro.cc | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc index ece1572..27d8486 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -53,6 +53,9 @@ #include "debug.h" +// Declared in pracro.cc +extern QString patientname; + class Dbg : public QLabel { public: Dbg() { @@ -99,7 +102,7 @@ MainWindow::MainWindow(QString patientid, QString course, QString templ, this->course = course; this->templ = templ; - setWindowTitle("Pracro - " + patientid); + setWindowTitle("Pracro - " + patientid + ": " + patientname); setWindowIcon(QIcon(":/icons/icon.png")); QStatusBar *status = statusBar(); diff --git a/client/pracro.cc b/client/pracro.cc index a2f06f3..abc2374 100644 --- a/client/pracro.cc +++ b/client/pracro.cc @@ -46,6 +46,7 @@ #define CONFIG_DEFAULT "pracro.ini" QString cpr; +QString patientname; QString user = USER_DEFAULT; QString config = CONFIG_DEFAULT; QString host; @@ -65,6 +66,7 @@ static void print_usage() " Server.\n"); printf(" -C --course COURSE Lists templates in COURSE.\n"); printf(" -P, --patient PATIENTID Defines the patientid for use with the macro.\n"); + printf(" -n, --name PATIENTNAME Defines the patient name for display in the window header.\n"); printf(" -c, --config FILE The configfile to use. Default is \""CONFIG_DEFAULT"\"\n"); printf(" -u, -U, --user USER Defines the requesting user(not the patient),\n" " defaults to \""USER_DEFAULT"\"\n"); @@ -118,6 +120,10 @@ int main(int argc, char *argv[]) *arg == "-V") { show_viewer = true; } + else if(*arg == "--name" || + *arg == "-n") { + patientname = getParam(args, arg); + } else if(*arg == "--user" || *arg == "-U" || *arg == "-u") { |