Преглед на файлове

ENH: hosting server startup

Marco Nolden преди 14 години
родител
ревизия
617ec6541a

+ 5 - 1
Applications/ctkExampleHost/ctkExampleHostMain.cpp

@@ -23,6 +23,8 @@
 #include <ctkPluginFramework.h>
 #include <ctkPluginException.h>
 
+#include <ctkDicomExampleHost.h>
+
 #include <QApplication>
 #include <QString>
 #include <QStringList>
@@ -66,7 +68,7 @@ int main(int argv, char** argc)
     try
     {
       QString fileLocation = dirIter.next();
-      if (fileLocation.contains("org_commontk_dicom_wg23"))
+      if (fileLocation.contains("org_commontk_dicom"))
       {
         ctkPlugin* plugin = framework->getPluginContext()->installPlugin(QUrl::fromLocalFile(fileLocation));
         plugin->start(ctkPlugin::START_TRANSIENT);
@@ -80,6 +82,8 @@ int main(int argv, char** argc)
 
   framework->start();
 
+  ctkDicomExampleHost* host = new ctkDicomExampleHost();
+
   QWidget placeholder;
   placeholder.show();
 

+ 2 - 2
Applications/ctkExampleHost/target_libraries.cmake

@@ -5,6 +5,6 @@
 # 
 
 SET(target_libraries
-  CTKPluginFramework
-  org_commontk_dicom_wg23_host
+  org_commontk_dicom_examplehost
+
   )

+ 1 - 1
Plugins/org.commontk.dicom.examplehost/ctkDicomExampleHost.cpp

@@ -1,5 +1,5 @@
 #include "ctkDicomExampleHost.h"
 
-ctkDicomExampleHost::ctkDicomExampleHost()
+ctkDicomExampleHost::ctkDicomExampleHost() : ctkDicomAbstractHost(8080)
 {
 }

+ 9 - 1
Plugins/org.commontk.dicom.examplehost/ctkDicomExampleHost.h

@@ -2,11 +2,19 @@
 #define CTKDICOMEXAMPLEHOST_H
 
 #include <ctkDicomAbstractHost.h>
+#include <org_commontk_dicom_examplehost_Export.h>
 
-class ctkDicomExampleHost : public ctkDicomAbstractHost
+class org_commontk_dicom_examplehost_EXPORT ctkDicomExampleHost : public ctkDicomAbstractHost
 {
 public:
     ctkDicomExampleHost();
+
+    virtual QString generateUID() { return ""; }
+    virtual QRect getAvailableScreen(const QRect& preferredScreen) { return QRect(); }
+    virtual QString getOutputLocation(const QStringList& preferredProtocols) { return ""; }
+    virtual void notifyStateChanged(ctkDicomWG23::State state) {}
+    virtual void notifyStatus(const ctkDicomWG23::Status& status) {}
+
 };
 
 #endif // CTKDICOMEXAMPLEHOST_H

+ 1 - 0
Plugins/org.commontk.dicom.wg23.core/ctkDicomExchangeInterface.h

@@ -48,6 +48,7 @@ public:
 //    8.3.6 releaseData(objectUUIDs : ArrayOfUUID): void	35
 //    8.3.7 releaseModels(objectUUIDs : ArrayOfUUID): void
 
+  virtual ~ctkDicomExchangeInterface() {}
 };
 
 #endif // ctkDicomExchangeInterface_H

+ 3 - 1
Plugins/org.commontk.dicom.wg23.host/ctkDicomAbstractHost.h

@@ -4,6 +4,8 @@
 #include <ctkDicomHostInterface.h>
 #include <QScopedPointer>
 
+#include <org_commontk_dicom_wg23_host_Export.h>
+
 class ctkDicomAbstractHostPrivate;
 
 /**
@@ -15,7 +17,7 @@ class ctkDicomAbstractHostPrivate;
   * The methods of the ctkDicomHostInterface have to be implemented for the business logic,
   *
   */
-class ctkDicomAbstractHost : public ctkDicomHostInterface
+class org_commontk_dicom_wg23_host_EXPORT ctkDicomAbstractHost : public ctkDicomHostInterface
 {
 public:
     /**