diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-19 10:06:28 +0200 |
---|---|---|
committer | deva <deva@solar.(none)> | 2011-10-19 10:06:59 +0200 |
commit | 611f9ce04145d9934dc3c8dc451f0a38721f89dc (patch) | |
tree | c6fff54c49835b6b901fb2457bf1e34cbefd6db7 /client | |
parent | 305ae3dc902594a597161b8243e7a590572374cc (diff) |
Some reorganisation, preparing for much more pcpview stuff.
Diffstat (limited to 'client')
-rw-r--r-- | client/client.pro | 4 | ||||
-rw-r--r-- | client/pcpviewer/pcpviewer.cc (renamed from client/pcpviewer.cc) | 22 | ||||
-rw-r--r-- | client/pcpviewer/pcpviewer.h (renamed from client/pcpviewer.h) | 6 | ||||
-rw-r--r-- | client/pracro.cc | 2 |
4 files changed, 27 insertions, 7 deletions
diff --git a/client/client.pro b/client/client.pro index dd926a9..c6c7e86 100644 --- a/client/client.pro +++ b/client/client.pro @@ -49,13 +49,13 @@ HEADERS += \ macrodrawer.h \ messagebox.h \ netcom.h \ - pcpviewer.h \ praxisd.h \ resumewidget.h \ template.h \ widgets.h \ expandbutton.h \ aboutbox.h \ + pcpviewer/pcpviewer.h \ widgets/common.h \ widgets/widget.h \ widgets/label.h \ @@ -92,12 +92,12 @@ SOURCES += \ macrodrawer.cc \ messagebox.cc \ netcom.cc \ - pcpviewer.cc \ praxisd.cc \ resumewidget.cc \ template.cc \ expandbutton.cc \ aboutbox.cc \ + pcpviewer/pcpviewer.cc \ widgets/common.cc \ widgets/widget.cc \ widgets/label.cc \ diff --git a/client/pcpviewer.cc b/client/pcpviewer/pcpviewer.cc index f5347d6..739a681 100644 --- a/client/pcpviewer.cc +++ b/client/pcpviewer/pcpviewer.cc @@ -33,10 +33,26 @@ PCPViewer::PCPViewer(QString patientid) : praxisd("localhost", 10000) { this->patientid = patientid; - // QString j = praxisd.journal_get_by_cpr(patientid); - // printf("%s\n", j.toStdString().c_str()); + connect(&praxisd, SIGNAL(networkError(QString)), + this, SLOT(networkError(QString))); - DokMenuVector d = praxisd.dokmenu_get_all_by_cpr(patientid); + /* + connect(&praxisd, SIGNAL(gotPatient(Patient)), + this, SLOT(gotPatient(Patient))); + */ + connect(&praxisd, SIGNAL(gotDokMenu(DokMenuVector)), + this, SLOT(gotDokMenu(DokMenuVector))); + + praxisd.dokmenu_get_all_by_cpr(patientid); +} + +void PCPViewer::networkError(QString text) +{ + printf("ERROR: %s\n", text.toStdString().c_str()); +} + +void PCPViewer::gotDokMenu(DokMenuVector d) +{ DokMenuVector::iterator di = d.begin(); while(di != d.end()) { printf("%s %s %s %d %s\n", diff --git a/client/pcpviewer.h b/client/pcpviewer/pcpviewer.h index 479b587..35459a1 100644 --- a/client/pcpviewer.h +++ b/client/pcpviewer/pcpviewer.h @@ -37,8 +37,12 @@ Q_OBJECT public: PCPViewer(QString patientid); +public slots: + void networkError(QString text); + void gotDokMenu(DokMenuVector d); + private: - PraxisdSync praxisd; + Praxisd praxisd; QString patientid; }; diff --git a/client/pracro.cc b/client/pracro.cc index 50ec007..2c9c141 100644 --- a/client/pracro.cc +++ b/client/pracro.cc @@ -38,7 +38,7 @@ #include "netcom.h" #include "mainwindow.h" #include "launcherwindow.h" -#include "pcpviewer.h" +#include "pcpviewer/pcpviewer.h" #include "debug.h" |