summaryrefslogtreecommitdiff
path: root/client/pracro.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-10-12 08:08:15 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2011-10-12 08:08:15 +0200
commit29b92e2906823878a7c516dc454d9ae8654de8fb (patch)
tree425fc23c0b73bea0d317274b50c930aadc39b10a /client/pracro.cc
parent1200aa5154c9a1a35156d659818ab631a79f4b0d (diff)
Initial work on pcp viewer including a new Praxisd class based on Qt-only components.
Diffstat (limited to 'client/pracro.cc')
-rw-r--r--client/pracro.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/client/pracro.cc b/client/pracro.cc
index 57a8da7..50ec007 100644
--- a/client/pracro.cc
+++ b/client/pracro.cc
@@ -38,6 +38,7 @@
#include "netcom.h"
#include "mainwindow.h"
#include "launcherwindow.h"
+#include "pcpviewer.h"
#include "debug.h"
@@ -67,6 +68,7 @@ static void print_usage()
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");
+ printf(" -V, --viewer Show PCPraxis viewer.\n");
printf(" -v, --version Print version information and exit.\n");
printf(" -d, --debug Make debug console available.\n");
printf(" Show the viewer only (no pracro editor window) with TEMPLATES.\n");
@@ -95,6 +97,7 @@ int main(int argc, char *argv[])
QString templ;
QString course;
QString templs;
+ bool show_viewer = false;
QStringList args = app.arguments();
QStringList::iterator arg = args.begin();
@@ -111,6 +114,10 @@ int main(int argc, char *argv[])
print_version();
return 0;
}
+ else if(*arg == "--viewer" ||
+ *arg == "-V") {
+ show_viewer = true;
+ }
else if(*arg == "--user" ||
*arg == "-U" ||
*arg == "-u") {
@@ -175,10 +182,15 @@ int main(int argc, char *argv[])
}
*/
- MainWindow mainwindow(cpr, course, templ, host, port, user);
- mainwindow.show();
-
- return app.exec();
+ if(show_viewer) {
+ PCPViewer pcpviewer(cpr);
+ pcpviewer.show();
+ return app.exec();
+ } else {
+ MainWindow mainwindow(cpr, course, templ, host, port, user);
+ mainwindow.show();
+ return app.exec();
+ }
}
#endif/*TESTING*/