소스 검색

Change signal names and signatures

These should be more consistent with Qt style
Steve Pieper 13 년 전
부모
커밋
f56fc6d767
4개의 변경된 파일30개의 추가작업 그리고 22개의 파일을 삭제
  1. 1 1
      Libs/DICOM/Core/ctkDICOMQuery.cpp
  2. 10 6
      Libs/DICOM/Core/ctkDICOMQuery.h
  3. 3 3
      Libs/DICOM/Core/ctkDICOMRetrieve.cpp
  4. 16 12
      Libs/DICOM/Core/ctkDICOMRetrieve.h

+ 1 - 1
Libs/DICOM/Core/ctkDICOMQuery.cpp

@@ -73,7 +73,7 @@ public:
       if (this->query)
         {
         logger.debug ( "FIND RESPONSE" );
-        emit this->query->queryResponseHandled("Got a find response!");
+        emit this->query->debug("Got a find response!");
         return this->ctkDcmSCU::handleFINDResponse(presID, response, waitForNextResponse);
         }
     };

+ 10 - 6
Libs/DICOM/Core/ctkDICOMQuery.h

@@ -61,7 +61,7 @@ public:
   /// 0 by default.
   void setPort ( int port );
   int port()const;
-  
+
   /// Query a remote DICOM Image Store SCP
   /// You must at least set the host and port before calling query()
   bool query(ctkDICOMDatabase& database);
@@ -79,7 +79,7 @@ public:
   /// Key         DICOM Tag                Type        Example
   /// -----------------------------------------------------------
   /// Name        DCM_PatientName         QString     JOHNDOE
-  /// Study       DCM_StudyDescription     QString     
+  /// Study       DCM_StudyDescription     QString
   /// Series      DCM_SeriesDescription    QString
   /// ID          DCM_PatientID            QString
   /// Modalities  DCM_ModalitiesInStudy    QStringList CT, MR, MN
@@ -96,10 +96,14 @@ Q_SIGNALS:
   /// Signal is emitted inside the query() function. It sends the different step
   /// the function is at.
   void progress(const QString& message);
-  /// Signal is emitted from the private SCU class when dicom query responses
-  /// arrive
-  void queryResponseHandled( const QString message );
-
+  /// Signal is emitted inside the query() function. It sends 
+  /// detailed feedback for debugging
+  void debug(const QString& message);
+  /// Signal is emitted inside the query() function. It send any error messages
+  void error(const QString& message);
+  /// Signal is emitted inside the query() function when finished with value 
+  /// true for success or false for error
+  void done(const bool& error);
 
 protected:
   QScopedPointer<ctkDICOMQueryPrivate> d_ptr;

+ 3 - 3
Libs/DICOM/Core/ctkDICOMRetrieve.cpp

@@ -74,7 +74,7 @@ public:
     {
       if (this->retrieve)
         {
-        emit this->retrieve->moveResponseHandled("Got one!");
+        emit this->retrieve->debug("Got one!");
         return this->ctkDcmSCU::handleMOVEResponse(
                         presID, response, waitForNextResponse);
         }
@@ -90,7 +90,7 @@ public:
     {
       if (this->retrieve)
         {
-        emit this->retrieve->storeRequested("Got a store request!");
+        emit this->retrieve->debug("Got a store request!");
         if (this->retrieve && this->retrieve->database())
           {
           this->retrieve->database()->insert(incomingObject);
@@ -113,7 +113,7 @@ public:
     {
       if (this->retrieve)
         {
-        emit this->retrieve->retrieveStatusChanged("Got a cget response!");
+        emit this->retrieve->debug("Got a cget response!");
         return this->ctkDcmSCU::handleCGETResponse(presID, response, continueCGETSession);
         }
       return false;

+ 16 - 12
Libs/DICOM/Core/ctkDICOMRetrieve.h

@@ -76,7 +76,7 @@ public:
   Q_INVOKABLE void setDatabase(QSharedPointer<ctkDICOMDatabase> dicomDatabase);
   Q_INVOKABLE QSharedPointer<ctkDICOMDatabase> database()const;
 
-public slots:
+public Q_SLOTS:
   /// Use CMOVE to ask peer host to store data to move destination
   bool moveSeries( const QString& studyInstanceUID,
                        const QString& seriesInstanceUID );
@@ -88,22 +88,26 @@ public slots:
   /// Use CGET to ask peer host to store data to us
   bool getStudy( const QString& studyInstanceUID );
 
-signals:
-  //TODO: the signature of these signals will change
-  //from string to a more specific format when we decide
-  //what information to send
-  /// emitted when a move response has been received from dcmtk
-  void moveResponseHandled( const QString message );
-  /// emitted when a dataset is incoming from a CGET
-  void storeRequested( const QString message );
-  /// emitted when remote server sends us CGET responses
-  void retrieveStatusChanged( const QString message );
+Q_SIGNALS:
+  /// Signal is emitted inside the retrieve() function. It ranges from 0 to 100.
+  /// In case of an error, you are assured that the progress value 100 is fired
+  void progress(int progress);
+  /// Signal is emitted inside the retrieve() function. It sends the different step
+  /// the function is at.
+  void progress(const QString& message);
+  /// Signal is emitted inside the retrieve() function. It sends 
+  /// detailed feedback for debugging
+  void debug(const QString& message);
+  /// Signal is emitted inside the retrieve() function. It send any error messages
+  void error(const QString& message);
+  /// Signal is emitted inside the retrieve() function when finished with value 
+  /// true for success or false for error
+  void done(const bool& error);
 
 protected:
   QScopedPointer<ctkDICOMRetrievePrivate> d_ptr;
 
 private:
-
   Q_DECLARE_PRIVATE(ctkDICOMRetrieve);
   Q_DISABLE_COPY(ctkDICOMRetrieve);