Forráskód Böngészése

COMP: EventBus: Fix accidently committed diff info

Sascha Zelzer 15 éve
szülő
commit
ad088d5c3f

+ 0 - 8
Libs/PluginFramework/EventBus/ctkEventBus.h

@@ -3,10 +3,7 @@
 
 #include "ctkEvent.h"
 
-<<<<<<< Updated upstream
 
-class ctkEventBus {
-=======
 /**
  * The Event Bus service. Plugins wishing to publish events can either
  * obtain the Event Bus service and call one of the event delivery methods
@@ -14,7 +11,6 @@ class ctkEventBus {
  *
  */
 class CTK_PLUGINFW_EXPORT ctkEventBus {
->>>>>>> Stashed changes
 
 public:
 
@@ -40,9 +36,6 @@ public:
    */
   virtual void sendEvent(const ctkEvent& event) = 0;
 
-<<<<<<< Updated upstream
-  virtual void publishSignal(const QObject* publisher, const char* signal) = 0;
-=======
   /**
    * Publish (register) a Qt signal for event delivery. Emitting the signal
    * has the same effect as calling postEvent() if <code>type</code> is
@@ -90,7 +83,6 @@ public:
    * @return Returns an id which can be used to update the properties.
    */
   virtual QString subscribeSlot(const QObject* subscriber, const char* member, const ctkProperties& properties) = 0;
->>>>>>> Stashed changes
 
   /**
    * Updates the properties of a previously registered slot. This can be used

+ 14 - 2
Plugins/org.commontk.eventbus/ctkEventBusImpl.cpp

@@ -26,13 +26,16 @@ void ctkEventBusImpl::sendEvent(const ctkEvent& event)
   dispatchEvent(event, false);
 }
 
-void ctkEventBusImpl::publishSignal(const QObject* publisher, const char* signal)
+void ctkEventBusImpl::publishSignal(const QObject* publisher, const char* signal, const QString& topic,
+                                    Qt::ConnectionType type)
 {
   Q_UNUSED(publisher)
   Q_UNUSED(signal)
+  Q_UNUSED(topic)
+  Q_UNUSED(type)
 }
 
-void ctkEventBusImpl::subscribeSlot(const QObject* subscriber, const char* member, const ctkProperties& properties)
+QString ctkEventBusImpl::subscribeSlot(const QObject* subscriber, const char* member, const ctkProperties& properties)
 {
 
   // TODO check for duplicates
@@ -42,6 +45,15 @@ void ctkEventBusImpl::subscribeSlot(const QObject* subscriber, const char* membe
   {
     bucket(wrapper);
   }
+
+  // TODO return id
+  return QString();
+}
+
+void ctkEventBusImpl::updateProperties(const QString& subscriptionId, const ctkProperties& properties)
+{
+  Q_UNUSED(subscriptionId)
+  Q_UNUSED(properties)
 }
 
 void ctkEventBusImpl::dispatchEvent(const ctkEvent& event, bool isAsync)

+ 4 - 2
Plugins/org.commontk.eventbus/ctkEventBusImpl_p.h

@@ -22,9 +22,11 @@ public:
   void postEvent(const ctkEvent& event);
   void sendEvent(const ctkEvent& event);
 
-  void publishSignal(const QObject* publisher, const char* signal);
+  void publishSignal(const QObject* publisher, const char* signal, const QString& topic, Qt::ConnectionType type = Qt::QueuedConnection);
 
-  void subscribeSlot(const QObject* subscriber, const char* member, const ctkProperties& properties);
+  QString subscribeSlot(const QObject* subscriber, const char* member, const ctkProperties& properties);
+
+  void updateProperties(const QString& subscriptionId, const ctkProperties& properties);
 
 protected: